:root {
  --bg: #eef6ff;
  --panel: #f7fbff;
  --panel-border: #cfe6ff;
  --tab: #dcedff;
  --tab-active: #f7fbff;
  --button: #cfe7ff;
  --button-border: #abd0f5;
  --text: #0b2748;
  --muted: #46617f;
  --grid: #d3d3d3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.route-restoring-project #projects-view {
  visibility: hidden;
}

.auth-page {
  display: grid;
  min-height: 100vh;
  padding: 16px;
  place-items: center;
}

.auth-page-card {
  display: grid;
  gap: 12px;
  width: min(560px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid var(--button-border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 26px rgba(20, 63, 112, 0.14);
}

.auth-page-titlebar {
  display: grid;
  gap: 4px;
  text-align: center;
}

.auth-page-titlebar h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.auth-page-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
}

.service-error-details {
  margin-top: 6px;
  color: var(--muted);
}

.service-error-user-text {
  display: block;
  white-space: pre-wrap;
}

.service-error-details summary {
  cursor: pointer;
  font-weight: 700;
}

.service-error-details pre {
  max-width: 100%;
  max-height: 140px;
  margin: 6px 0;
  padding: 8px;
  overflow: auto;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #ffffff;
  color: #2b4058;
  white-space: pre-wrap;
}

.service-error-copy-button {
  min-height: 26px;
  padding: 3px 10px;
  border: 1px solid #7da9d5;
  border-radius: 6px;
  background: #e2f0ff;
  color: #143a64;
  font-weight: 700;
}

.auth-page-tabs {
  width: 100%;
}

.auth-page-panel {
  border: 1px solid var(--panel-border);
  background: #f7fbff;
}

.app-shell {
  min-height: 100vh;
  padding: 16px;
}

.app-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4px;
  height: 38px;
}

.top-tabs {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
}

.top-tab {
  min-width: 110px;
  height: 38px;
  border: 1px solid var(--panel-border);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: var(--tab);
  color: var(--text);
  font-weight: 600;
}

.top-tab.active {
  background: var(--tab-active);
  height: 40px;
}

.user-panel {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  height: 38px;
  margin: 0 0 0 16px;
  padding: 0;
  background: transparent;
  white-space: nowrap;
}

.current-user-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 320px;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #123d70;
  font-family: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.access-until-badge-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.access-until-badge {
  display: inline;
  max-width: 300px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #123d70;
  font: inherit;
  font-weight: 600;
  line-height: 36px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.access-until-badge:hover {
  text-decoration: underline;
}

.access-until-badge:focus-visible {
  outline: 2px solid #6aa9e9;
  outline-offset: 1px;
}

.access-until-tooltip {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  display: none;
  width: 280px;
  padding: 8px 10px;
  border: 1px solid var(--button-border);
  border-radius: 6px;
  background: #f7fbff;
  box-shadow: 0 4px 12px rgba(35, 83, 130, 0.18);
  color: var(--text);
  line-height: 1.25;
  text-align: left;
  white-space: normal;
}

.access-until-tooltip a {
  display: block;
  margin-top: 4px;
  color: #064f9e;
  font-weight: 600;
  text-decoration: underline;
}

.access-until-badge-wrap:hover .access-until-tooltip,
.access-until-badge-wrap:focus-within .access-until-tooltip {
  display: block;
}

.logout-button {
  min-width: 78px;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid var(--button-border);
  border-radius: 8px;
  background: var(--button);
  color: #123d70;
  font-family: inherit;
  font-weight: 600;
}

.logout-button:hover {
  filter: brightness(0.98);
}

.project-tab {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 300px;
  max-width: 360px;
  padding: 0 8px 0 14px;
}

.project-tab-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-tab-close {
  color: #1f3f67;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.window-panel {
  min-height: calc(100vh - 54px);
  border: 1px solid var(--panel-border);
  background: var(--panel);
  padding: 16px;
}

.projects-view,
.project-detail-view,
.settings-view,
.training-view,
.sessions-view {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 88px);
}

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.projects-main,
.project-list-panel {
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #f8fbff;
}

.projects-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 14px 18px;
}

.sessions-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 10px;
  min-height: calc(100vh - 120px);
}

.sessions-main,
.settings-side {
  border: 1px solid #9aa7b8;
  background: #f6f7f9;
  padding: 10px;
}

.sessions-main h1,
.settings-side h2 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
}

.settings-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-sessions-panel {
  background: #f3f8ff;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 328px);
  min-height: 300px;
  padding: 0;
}

.account-sessions-panel {
  height: calc(100vh - 120px);
  min-height: 520px;
}

.project-billing-panel.billing-disabled .billing-layout {
  display: none;
}

.project-billing-panel:not(.billing-disabled) .billing-disabled-placeholder {
  display: none;
}

.project-sessions-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  min-height: 0;
  padding: 0;
}

.project-sessions-title {
  margin: 8px 0 0;
  border: 1px solid #cfe3fa;
  border-bottom: 0;
  background: #fff;
  color: #0c3865;
  font-size: 18px;
  font-weight: 700;
  line-height: 30px;
  min-height: 32px;
  padding: 0 8px;
  text-align: center;
}

.project-sessions-filter {
  border: 1px solid #d7e8fb;
  border-radius: 0 0 10px 10px;
  background: #fff;
  padding: 8px 14px 10px;
}

.project-sessions-filter-grid {
  display: grid;
  grid-template-columns: 130px minmax(160px, 1fr) 90px minmax(210px, 1.2fr) 160px minmax(210px, 1.2fr);
  gap: 8px 10px;
  align-items: center;
}

.project-sessions-filter-grid label,
.project-sessions-filter-grid select,
.project-sessions-filter-grid input,
.project-sessions-balance {
  height: 31px;
  min-width: 0;
  border: 1px solid #cfe3fa;
  border-radius: 10px;
  background: #fff;
  color: #102f55;
  font: inherit;
}

.project-sessions-filter-grid label {
  display: flex;
  align-items: center;
  padding: 0 4px;
}

.project-sessions-filter-grid select,
.project-sessions-filter-grid input {
  padding: 0 8px;
}

.project-sessions-balance {
  display: flex;
  align-items: center;
  color: #1d4f82;
  font-weight: 600;
  padding: 0 8px;
}

.project-sessions-filter-grid button {
  height: 31px;
  min-width: 0;
  border: 1px solid #b8d6fa;
  border-radius: 9px;
  background: #d9ebff;
  color: #1f4f80;
  font: inherit;
  font-weight: 600;
  padding: 0 12px;
}

.project-sessions-filter-grid button:hover {
  background: #c9e2ff;
}

.project-sessions-filter-grid button:disabled {
  opacity: 0.65;
}

#project-sessions-reset-button,
#account-sessions-reset-button {
  grid-column: 4;
  width: 100%;
}

#project-sessions-show-button,
#account-sessions-show-button {
  grid-column: 6;
  width: 100%;
}

.project-sessions-table-area {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  position: relative;
}

.project-sessions-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid #c7d0dc;
  background: #fff;
}

.project-sessions-table {
  width: max-content;
  border-collapse: collapse;
  color: #102f55;
  font-size: 13px;
}

.project-sessions-table th,
.project-sessions-table td {
  height: 29px;
  border-right: 1px solid #d4d4d4;
  border-bottom: 1px solid #d4d4d4;
  white-space: nowrap;
  text-align: left;
  padding: 0 4px;
}

.project-sessions-table th {
  background: #f0f5fb;
  font-weight: 700;
  position: relative;
  text-align: center;
}

.project-sessions-table tbody tr:nth-child(even) {
  background: #f2f2f2;
}

.project-sessions-column-header {
  cursor: grab;
  user-select: none;
}

.project-sessions-column-header.dragging {
  opacity: 0.55;
}

.project-sessions-row-number-header {
  cursor: default;
}

.project-sessions-column-title {
  display: block;
  padding-right: 8px;
}

.project-sessions-column-resizer {
  bottom: 0;
  cursor: col-resize;
  position: absolute;
  right: -3px;
  top: 0;
  width: 8px;
  z-index: 2;
}

.project-sessions-column-resizer:hover {
  background: rgba(31, 115, 209, 0.16);
}

.project-sessions-table th[data-project-sessions-column-key="rowNumber"],
.project-sessions-table td[data-project-sessions-column-key="rowNumber"] {
  padding-left: 3px;
  padding-right: 3px;
  text-align: center;
}

.project-sessions-table td[data-project-sessions-column-key$="Tokens"],
.project-sessions-table td[data-project-sessions-column-key$="Cost"],
.project-sessions-table td[data-project-sessions-column-key="id"] {
  text-align: right;
}

.project-sessions-columns-button {
  position: absolute;
  right: 0;
  top: -24px;
  z-index: 5;
  width: 26px;
  height: 24px;
  border: 1px solid #b8c9dc;
  border-radius: 4px;
  background: #edf3f9;
  color: #244f7b;
  font-size: 13px;
  line-height: 20px;
  padding: 0;
}

.project-sessions-columns-menu {
  position: absolute;
  right: 0;
  top: 0;
  z-index: 6;
  width: 240px;
  max-height: 310px;
  overflow: auto;
  border: 1px solid #bfd5ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(38, 75, 118, 0.16);
  color: #143d69;
  font-size: 13px;
  padding: 8px;
}

.project-sessions-columns-menu label {
  display: block;
  margin: 5px 0;
}

.project-sessions-summary {
  bottom: 0;
  z-index: 7;
  min-height: 21px;
  margin: 0;
  border: 1px solid #cfe3fa;
  background: #f9fcff;
  color: #2b5f8f;
  font-size: 15px;
  font-weight: 600;
  font-style: italic;
  line-height: 20px;
  overflow: hidden;
  padding: 0 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-grid {
  display: grid;
  gap: 10px;
}

.settings-block {
  min-height: 150px;
}

.settings-block h2 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
}

.settings-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 13px;
}

.settings-table th,
.settings-table td {
  border: 1px solid #b8c0cc;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

.settings-table th {
  background: #edf1f6;
  font-weight: 600;
}

.settings-table tbody tr:hover {
  background: #eef5ff;
}

.settings-view {
  border: 1px solid #d7e8fb;
  background: #eef6ff;
  padding: 16px 16px 14px;
  overflow: hidden;
}

.training-view {
  border: 1px solid #d7e8fb;
  background: #eef6ff;
  gap: 12px;
  padding: 16px;
  overflow: hidden;
}

.training-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.training-header h1,
.training-lesson-text h2,
.training-progress h2 {
  color: #00356d;
  margin: 0;
}

.training-header p,
.training-lesson-text p,
.training-progress p {
  color: #1e4f80;
  margin: 4px 0 0;
}

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

.training-layout {
  display: grid;
  gap: 12px;
  grid-template-columns: 230px minmax(420px, 1fr) 250px;
  min-height: 0;
}

.training-sidebar,
.training-main,
.training-progress {
  border: 1px solid #b9d9f8;
  background: #f8fcff;
  min-height: 0;
}

.training-sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
}

.training-nav-item {
  align-items: center;
  background: #e5f2ff;
  border: 1px solid #b7d8f7;
  color: #00356d;
  cursor: pointer;
  display: grid;
  gap: 8px;
  grid-template-columns: 34px 1fr;
  min-height: 42px;
  padding: 6px 8px;
  text-align: left;
}

.training-nav-item.active,
.training-nav-item:hover {
  background: #cfe8ff;
  border-color: #79b7ec;
}

.training-nav-item span {
  align-items: center;
  background: #ffffff;
  border: 1px solid #b7d8f7;
  display: inline-flex;
  font-weight: 700;
  height: 26px;
  justify-content: center;
  width: 30px;
}

.training-video-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}

.training-video-stage {
  background: linear-gradient(135deg, #143f6f, #246ba6 52%, #dbefff);
  border: 1px solid #75aee5;
  color: #ffffff;
  min-height: 320px;
  position: relative;
}

.training-video-bar {
  align-items: center;
  background: rgba(0, 28, 62, 0.72);
  display: flex;
  font-weight: 700;
  justify-content: space-between;
  padding: 10px 12px;
}

.training-video-play {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 53, 109, 0.35);
  color: #0a4f93;
  display: flex;
  font-size: 30px;
  height: 64px;
  justify-content: center;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
}

.training-video-timeline {
  background: rgba(255, 255, 255, 0.42);
  bottom: 14px;
  height: 6px;
  left: 16px;
  position: absolute;
  right: 16px;
}

.training-video-timeline span {
  background: #ffffff;
  display: block;
  height: 100%;
  width: 38%;
}

.training-lesson-tabs {
  display: flex;
  gap: 6px;
}

.training-lesson-tab {
  background: #dcecff;
  border: 1px solid #b7d8f7;
  color: #00356d;
  cursor: pointer;
  font-weight: 700;
  min-height: 32px;
  padding: 4px 14px;
}

.training-lesson-tab.active {
  background: #ffffff;
  border-bottom-color: #ffffff;
}

.training-lesson-text {
  border: 1px solid #d7e8fb;
  background: #ffffff;
  padding: 12px;
}

.training-progress {
  color: #00356d;
  padding: 12px;
}

.training-progress-meter {
  background: #dbe9f8;
  border: 1px solid #b9d9f8;
  height: 12px;
  margin: 10px 0;
}

.training-progress-meter span {
  background: #48b478;
  display: block;
  height: 100%;
}

.training-progress ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.training-progress li {
  border-bottom: 1px solid #d7e8fb;
  padding: 7px 0;
}

.training-progress li.done {
  color: #16804d;
  font-weight: 700;
}

.training-progress li.active {
  color: #0a4f93;
  font-weight: 700;
}

@media (max-width: 1050px) {
  .training-layout {
    grid-template-columns: 1fr;
  }

  .training-video-stage {
    min-height: 240px;
  }
}

.settings-primary-tabs,
.settings-llm-tabs {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-height: 34px;
}

.settings-primary-tab,
.settings-llm-tab {
  min-height: 34px;
  border: 1px solid #c4ddf8;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  background: #dcefff;
  color: #163f70;
  font-weight: 600;
  padding: 0 14px;
}

.settings-primary-tab.active,
.settings-llm-tab.active {
  background: #f7fbff;
  color: #102f55;
}

.settings-tab-page {
  flex: 1;
  min-height: calc(100vh - 170px);
  border: 1px solid #d7e8fb;
  background: #f3f8ff;
  padding: 16px 16px 14px;
  overflow: hidden;
}

.settings-llm-tabs {
  margin-bottom: 0;
}

.final-llm-page {
  min-height: calc(100vh - 235px);
  border: 1px solid #d7e8fb;
  background: #f3f8ff;
  padding: 8px 16px 16px;
  overflow: hidden;
}

.special-llm-page {
  min-height: calc(100vh - 235px);
  border: 1px solid #d7e8fb;
  background: #f3f8ff;
  padding: 8px 16px 16px;
  overflow: hidden;
}

.final-llm-content {
  display: block;
  min-height: 0;
  height: calc(100vh - 450px);
}

.qt-group {
  position: relative;
  border: 1px solid #c8def6;
  border-radius: 10px;
  background: #f7fbff;
  padding: 18px 10px 10px;
}

.final-models-group {
  padding-left: 10px;
  padding-right: 8px;
}

.payment-settings-group {
  min-height: calc(100vh - 245px);
}

.payment-overview {
  display: grid;
  gap: 12px;
}

.payment-tariffs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.payment-tariff-card {
  border: 1px solid #c8def6;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 8px;
}

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

.payment-table-wrap {
  overflow: auto;
  border: 1px solid #c8def6;
  background: #fff;
}

.payment-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.payment-table th,
.payment-table td {
  border: 1px solid #d8e6f5;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

.payment-table th {
  background: #e7f2fc;
}

.payment-history {
  border: 1px solid #c8def6;
  background: #fff;
  padding: 8px;
  min-height: 34px;
}

.qt-group > h2 {
  position: absolute;
  top: -9px;
  left: 12px;
  margin: 0;
  background: #f3f8ff;
  color: #143f70;
  font-size: 13px;
  font-weight: 700;
  padding: 0 7px;
}

.final-models-group > h2 {
  position: static;
  top: auto;
  left: auto;
  margin: 0 0 5px;
  background: transparent;
  color: #143f70;
  font-size: 18px;
  font-weight: 700;
  padding: 0;
  text-align: center;
}

.final-models-group {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
}

.final-models-table-and-add {
  align-items: start;
  display: grid;
  grid-template-columns: minmax(0, 705px) 190px;
  gap: 10px;
  min-height: 0;
}

.final-models-table-column {
  min-width: 0;
}

.final-models-table-wrap {
  height: calc(100vh - 360px);
  min-height: 388px;
  width: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  border: 1px solid #d0d0d0;
  background: #fff;
}

.final-models-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: #071d39;
  font-size: 13px;
}

.final-models-table th,
.final-models-table td {
  border: 1px solid #d3d3d3;
  padding: 3px 3px;
  vertical-align: middle;
}

.final-models-table th {
  height: 25px;
  background: #f8fbff;
  font-weight: 700;
  text-align: center;
}

.final-models-table th:nth-child(1),
.final-models-table td:nth-child(1) {
  width: 35px;
  text-align: center;
}

.final-models-table th:nth-child(2),
.final-models-table td:nth-child(2) {
  width: 92px;
}

.final-models-table th:nth-child(3),
.final-models-table td:nth-child(3) {
  width: 270px;
}

.final-models-table th:nth-child(4),
.final-models-table td:nth-child(4) {
  width: 270px;
  text-align: center;
}

.final-models-table tbody tr:nth-child(even) {
  background: #f2f2f2;
}

.final-models-table tbody tr.selected {
  background: #cfe7ff;
  outline: 1px solid #8fbce9;
}

.final-models-table .row-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.final-models-table .row-actions button,
.final-models-add-inline {
  min-height: 34px;
  border-color: #a9cff3;
  border-radius: 9px;
  background: #d4eaff;
  color: #164575;
  font-weight: 600;
}

.final-models-table .row-actions button {
  min-width: 0;
  padding: 0 6px;
  font-size: 13px;
}

.final-models-table .row-actions button:disabled {
  color: #7190ad;
  opacity: 0.65;
}

.final-models-hint {
  min-height: 0;
  margin: 0 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #204c7d;
  font-size: 13px;
  font-weight: 600;
  padding: 0;
  text-align: left;
  width: 100%;
}

.final-models-add-inline {
  margin-top: 29px;
  width: 182px;
}

.final-models-summary {
  margin: 7px 0 0;
  color: #204c7d;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.final-models-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 190px;
}

.final-models-status {
  min-height: 72px;
  margin: 0;
  border: 1px solid #cfe3fa;
  border-radius: 8px;
  background: #f7fbff;
  color: #204c7d;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.25;
  padding: 7px 8px;
  white-space: normal;
}

.special-llm-group {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: calc(100vh - 330px);
  padding-left: 10px;
  padding-right: 8px;
}

.special-llm-group > h2 {
  position: static;
  top: auto;
  left: auto;
  margin: 0 0 5px;
  background: transparent;
  color: #143f70;
  font-size: 18px;
  font-weight: 700;
  padding: 0;
  text-align: center;
}

.special-llm-table-and-side {
  align-items: start;
  display: grid;
  grid-template-columns: minmax(0, 900px) 190px;
  gap: 10px;
  min-height: 0;
}

.special-llm-table-wrap {
  min-height: 210px;
  width: 100%;
  overflow: hidden;
  border: 1px solid #d0d0d0;
  background: #fff;
}

.special-llm-table th:nth-child(1),
.special-llm-table td:nth-child(1) {
  width: 35px;
  text-align: center;
}

.special-llm-table th:nth-child(2),
.special-llm-table td:nth-child(2) {
  width: 345px;
}

.special-llm-table th:nth-child(3),
.special-llm-table td:nth-child(3) {
  width: 100px;
}

.special-llm-table th:nth-child(4),
.special-llm-table td:nth-child(4) {
  width: 230px;
}

.special-llm-table th:nth-child(5),
.special-llm-table td:nth-child(5) {
  width: 185px;
  text-align: center;
}

.special-llm-table td:nth-child(2) strong,
.special-llm-table td:nth-child(2) span {
  display: block;
}

.special-llm-table td:nth-child(2) span {
  color: #315c89;
  font-size: 12px;
  font-weight: 400;
  margin-top: 2px;
}

.final-models-table .special-llm-row-actions {
  grid-template-columns: 1fr;
  gap: 6px;
}

.special-llm-table .special-llm-row-actions button {
  justify-self: center;
  padding: 0 4px;
  width: 128px;
}

.special-llm-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 190px;
}

.custom-endpoint-page {
  min-height: calc(100vh - 235px);
  border: 1px solid #d7e8fb;
  background: #f3f8ff;
  padding: 0;
}

.custom-endpoint-card {
  margin: 0;
  border: 1px solid #c8def6;
  border-radius: 12px;
  background: #f7fbff;
  padding: 14px 18px;
}

.custom-endpoint-card h1 {
  height: 35px;
  margin: 0 0 8px;
  border: 1px solid #cfe3fa;
  border-radius: 10px;
  background: #fff;
  color: #163f70;
  font-size: 24px;
  font-weight: 700;
  line-height: 33px;
  padding: 0 8px;
}

.custom-endpoint-grid {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  gap: 8px 10px;
}

.custom-endpoint-grid label,
.custom-endpoint-grid input,
.custom-endpoint-grid select,
.custom-endpoint-status {
  min-height: 37px;
  border: 1px solid #cfe3fa;
  border-radius: 10px;
  background: #fff;
  color: #102f55;
  font: inherit;
}

.custom-endpoint-grid label {
  display: flex;
  align-items: center;
  padding: 0 6px;
}

.custom-endpoint-grid input,
.custom-endpoint-grid select {
  width: 100%;
  padding: 0 9px;
  outline: none;
}

.custom-endpoint-grid input::placeholder {
  color: #7c90a9;
}

.custom-endpoint-save {
  min-height: 36px;
  border-color: #a9cff3;
  border-radius: 9px;
  background: #d4eaff;
  color: #164575;
  font-weight: 600;
}

.custom-endpoint-status {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0 3px;
  color: #204c7d;
  font-weight: 600;
}

.polza-page,
.openrouter-page {
  min-height: calc(100vh - 235px);
  border: 1px solid #d7e8fb;
  background: #f3f8ff;
  padding: 0;
}

.polza-top-card,
.openrouter-top-card {
  margin: 0 0 12px;
  border: 1px solid #c8def6;
  border-radius: 12px;
  background: #f7fbff;
  padding: 14px 18px;
}

.polza-top-card h1,
.openrouter-top-card h1 {
  height: 35px;
  margin: 0 0 8px;
  border: 1px solid #cfe3fa;
  border-radius: 10px;
  background: #fff;
  color: #163f70;
  font-size: 24px;
  font-weight: 700;
  line-height: 33px;
  padding: 0 8px;
}

.openrouter-top-card {
  padding: 10px 18px;
}

.openrouter-top-card h1 {
  height: 30px;
  margin: 0 0 4px;
  border: 0;
  background: transparent;
  line-height: 30px;
}

.polza-top-card label,
.polza-top-card input,
.polza-status,
.openrouter-top-card label,
.openrouter-top-card input,
.openrouter-status,
.polza-form-group input,
.polza-form-group label,
.polza-rate-hint,
.openrouter-form-group input {
  border: 1px solid #cfe3fa;
  background: #fff;
  color: #102f55;
  font: inherit;
}

.polza-top-card > label,
.openrouter-top-card label {
  display: block;
  width: 50%;
  min-height: 19px;
  padding: 0 4px;
}

.polza-key-row,
.openrouter-key-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 150px minmax(0, 1fr);
  min-height: 35px;
  margin: 8px 0;
}

.openrouter-key-row {
  min-height: 31px;
  margin: 3px 0;
}

.polza-key-row label,
.openrouter-key-row label {
  background: transparent;
  border: 0;
  min-height: 19px;
  padding: 0 4px;
  white-space: nowrap;
  width: auto;
}

.polza-key-row input,
.openrouter-key-row input {
  border-radius: 6px;
  margin: 0;
  min-height: 35px;
  width: 100%;
}

.openrouter-key-row input {
  min-height: 31px;
}

.api-key-input-wrap {
  display: grid;
  min-width: 0;
  position: relative;
}

.api-key-input-wrap input {
  padding-right: 38px;
}

.api-key-reset-button {
  align-items: center;
  background: #eef6ff;
  border: 1px solid #8fc5ff;
  border-radius: 5px;
  color: #8a1f11;
  display: flex;
  font-size: 17px;
  font-weight: 700;
  height: 24px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  z-index: 1;
}

.api-key-reset-button:hover {
  background: #ffecef;
  border-color: #ff9aac;
}

.polza-top-card > input,
.openrouter-top-card input {
  width: 100%;
  min-height: 36px;
  margin: 8px 0;
  border-radius: 10px;
  padding: 0 9px;
  outline: none;
}

.polza-top-actions,
.openrouter-top-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

.polza-top-actions .action-button,
.polza-form-group .action-button,
.polza-refresh-bottom,
.openrouter-top-actions .action-button,
.openrouter-form-group .action-button,
.openrouter-refresh-bottom {
  min-height: 35px;
  border-color: #a9cff3;
  border-radius: 8px;
  background: #d4eaff;
  color: #164575;
  font-weight: 600;
}

.polza-status,
.openrouter-status {
  min-height: 19px;
  margin: 0;
  padding: 1px 4px;
  color: #204c7d;
  font-weight: 600;
}

.openrouter-status:empty {
  display: none;
}

.openrouter-status {
  font-weight: 400;
  line-height: 1.25;
}

.polza-content,
.openrouter-content {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 8px minmax(240px, 348px);
  gap: 6px;
  min-height: 0;
  height: calc(100vh - 490px);
  overflow: hidden;
}

.polza-layout-resizer,
.openrouter-layout-resizer {
  align-self: stretch;
  cursor: col-resize;
  min-height: 255px;
  border-left: 1px solid #b8d5f4;
  border-right: 1px solid #e2f0ff;
  background: linear-gradient(90deg, #d7ebff, #f4faff);
}

.polza-layout-resizer:hover,
.polza-layout-resizer.dragging,
.openrouter-layout-resizer:hover,
.openrouter-layout-resizer.dragging {
  background: #b9dcff;
}

.polza-models-group,
.openrouter-models-group {
  box-sizing: border-box;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: visible;
}

.openrouter-models-group {
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding-top: 8px;
}

.polza-models-group {
  margin-top: 12px;
  height: calc(100% - 12px);
  max-height: calc(100% - 12px);
}

.openrouter-models-group h2 {
  font-size: 1.125em;
  line-height: 1.25;
  margin: 0 0 7px;
  padding: 0;
  position: static;
  text-align: center;
}

.polza-models-table-wrap,
.openrouter-models-table-wrap {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid #d0d0d0;
  background: #fff;
  scrollbar-gutter: stable;
}

.polza-models-table,
.openrouter-models-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: #071d39;
  font-size: 13px;
}

.polza-models-table th,
.polza-models-table td,
.openrouter-models-table th,
.openrouter-models-table td {
  border: 1px solid #d3d3d3;
  padding: 3px 4px;
  vertical-align: middle;
}

.polza-models-table th,
.openrouter-models-table th {
  height: 25px;
  background: #f8fbff;
  font-weight: 700;
  text-align: left;
}

.polza-models-table th:nth-child(1),
.polza-models-table td:nth-child(1),
.openrouter-models-table th:nth-child(1),
.openrouter-models-table td:nth-child(1) {
  width: 35px;
  text-align: center;
}

.polza-models-table th:nth-child(2),
.polza-models-table td:nth-child(2),
.openrouter-models-table th:nth-child(2),
.openrouter-models-table td:nth-child(2) {
  width: 178px;
}

.polza-models-table th:nth-child(3),
.polza-models-table td:nth-child(3),
.polza-models-table th:nth-child(4),
.polza-models-table td:nth-child(4),
.openrouter-models-table th:nth-child(3),
.openrouter-models-table td:nth-child(3),
.openrouter-models-table th:nth-child(4),
.openrouter-models-table td:nth-child(4) {
  width: 116px;
}

.polza-models-table th:nth-child(5),
.polza-models-table td:nth-child(5),
.polza-models-table th:nth-child(6),
.polza-models-table td:nth-child(6),
.openrouter-models-table th:nth-child(5),
.openrouter-models-table td:nth-child(5),
.openrouter-models-table th:nth-child(6),
.openrouter-models-table td:nth-child(6) {
  width: 112px;
  text-align: right;
}

.polza-models-table th:nth-child(7),
.polza-models-table td:nth-child(7),
.openrouter-models-table th:nth-child(7),
.openrouter-models-table td:nth-child(7) {
  width: 86px;
  text-align: center;
}

.polza-models-table tbody tr:nth-child(even),
.openrouter-models-table tbody tr:nth-child(even) {
  background: #f2f2f2;
}

.polza-models-table button,
.openrouter-models-table button {
  min-height: 31px;
  width: 76px;
  border: 1px solid #a9cff3;
  border-radius: 8px;
  background: #d4eaff;
  color: #164575;
  font-weight: 600;
}

.polza-refresh-bottom,
.openrouter-refresh-bottom {
  width: 100%;
  margin-top: 10px;
  align-self: end;
}

.polza-form-group,
.openrouter-form-group {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-self: stretch;
  height: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overflow-wrap: anywhere;
}

.polza-form-group h2,
.openrouter-form-group h2 {
  font-size: 21px;
  line-height: 25px;
  margin: 0;
  text-align: center;
}

.polza-form-heading,
.openrouter-form-heading {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: stretch;
}

.polza-form-heading h2,
.polza-form-heading .polza-status,
.openrouter-form-heading h2 {
  margin: 0;
}

.polza-form-group input,
.openrouter-form-group input {
  width: 100%;
  max-width: 100%;
  min-height: 36px;
  border-radius: 10px;
  padding: 0 9px;
  outline: none;
}

.polza-form-group label,
.polza-rate-hint {
  min-height: 19px;
  padding: 1px 4px;
}

.polza-rate-hint {
  min-height: 100px;
  border-radius: 10px;
  color: #204c7d;
  font-weight: 600;
  line-height: 1.25;
  white-space: normal;
}

@media (max-width: 900px) {
  .polza-content,
  .openrouter-content {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
  }

  .polza-layout-resizer,
  .openrouter-layout-resizer {
    display: none;
  }

  .polza-form-group {
    min-height: 0;
  }
}

.section-header {
  margin-bottom: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.3;
}

h2 {
  font-size: 15px;
  margin-bottom: 12px;
}

.section-header p {
  margin-top: 2px;
  border: 1px solid var(--panel-border);
  padding: 2px 4px;
  color: var(--muted);
}

.project-list-panel {
  flex: 1;
  overflow: hidden;
  background: #f8fbff;
  border-radius: 0;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.project-list-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 10px;
  flex: 1;
  min-height: 0;
}

.project-list-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.project-list-left-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 3fr) minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  min-height: 0;
}

.project-list-left-column > .project-list-search-row {
  align-self: start;
  margin-left: 0;
}

.project-list-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 190px;
}

.project-list-toolbar-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-left: auto;
  width: 190px;
}

.project-list-status {
  margin: 0;
  width: 190px;
  min-height: calc(3em + 14px);
  height: auto;
  box-sizing: border-box;
  border: 1px solid #cfe6ff;
  padding: 6px 8px;
  background: #ffffff;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.project-list-limit-button.active {
  background: var(--button);
  border-color: var(--button-border);
  font-weight: 700;
}

.project-list-search-row {
  display: inline-grid;
  grid-template-columns: 38px minmax(260px, 1fr) 132px;
  align-items: center;
  gap: 8px;
  width: min(620px, 100%);
  min-width: 430px;
  color: var(--text);
}

.project-list-search-row input {
  min-width: 0;
  height: 30px;
  border: 1px solid #cfe6ff;
  border-radius: 0;
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 4px 7px;
}

.project-list-table-wrap {
  width: 100%;
  min-height: 0;
  overflow: auto;
  border: 1px solid #cfe6ff;
  background: #ffffff;
}

.project-list-bottom-spacer {
  min-height: 0;
}

.project-list-pagination {
  align-self: end;
}

.project-list-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  table-layout: fixed;
}

.project-list-table th,
.project-list-table td {
  border: 1px solid transparent;
  padding: 7px 8px;
  text-align: left;
  vertical-align: top;
}

.project-list-table th {
  font-weight: 700;
  color: var(--text);
  background: #ffffff;
}

.project-list-table th:nth-child(1),
.project-list-table td:nth-child(1) {
  width: 58%;
  padding-left: 46px;
}

.project-list-table th:nth-child(2),
.project-list-table td:nth-child(2) {
  width: 32%;
}

.project-list-table th:nth-child(3),
.project-list-table td:nth-child(3) {
  width: 10%;
}

.project-list-table .project-list-settings-heading,
.project-list-table .project-list-settings-cell {
  border-color: transparent;
  background: transparent;
  text-align: right;
  padding-right: 0;
  vertical-align: middle;
}

.project-settings-button {
  min-width: 28px;
  min-height: 24px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #06335f;
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  padding: 0 5px 4px;
}

.project-settings-button:hover {
  background: #e4f2ff;
}

.project-settings-button:focus {
  outline: 2px solid #7ebdff;
  outline-offset: 1px;
}

.project-list-item {
  cursor: pointer;
  outline: none;
  background: #ffffff;
}

.project-list-item:hover,
.project-list-item:focus {
  background: #e8f3ff;
}

.project-list-item.selected {
  background: #cfe7ff;
  outline: 1px solid var(--button-border);
  outline-offset: -1px;
}

.project-document-constructor-panel {
  background: #f7fbff;
  border: 1px solid #b8dcff;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 14px 18px;
}

.project-document-constructor-header {
  border: 1px solid #b8dcff;
  border-radius: 6px;
  margin-bottom: 14px;
  padding: 8px;
}

.project-document-constructor-header h2 {
  margin: 0;
}

.project-document-constructor-header p {
  border: 1px solid #c7dfff;
  margin: 4px 0 0;
  padding: 2px 4px;
}

.project-document-constructor-layout {
  display: grid;
  flex: 1;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 190px;
  min-height: 520px;
}

.project-document-constructor-list-column {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(180px, 3fr) minmax(0, 1fr) auto;
  min-height: 0;
  min-width: 0;
}

.project-document-constructor-list-wrap {
  border: 1px solid #b8dcff;
  min-height: 0;
  overflow: auto;
}

.project-document-constructor-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.project-document-constructor-table th,
.project-document-constructor-table td {
  padding: 8px 10px;
  text-align: left;
}

.project-document-constructor-table th {
  border-bottom: 1px solid #b8dcff;
  color: #003366;
  font-weight: 700;
}

.project-document-constructor-table th:nth-child(1),
.project-document-constructor-table td:nth-child(1) {
  width: 51%;
}

.project-document-constructor-table th:nth-child(1) {
  padding-left: 46px;
}

.project-document-constructor-table td:nth-child(1) {
  padding-left: 46px;
}

.project-document-constructor-table th:nth-child(2),
.project-document-constructor-table td:nth-child(2) {
  width: 29%;
}

.project-document-constructor-table th:nth-child(3),
.project-document-constructor-table td:nth-child(3) {
  text-align: center;
  width: 12%;
}

.project-document-constructor-table th:nth-child(4),
.project-document-constructor-table td:nth-child(4) {
  text-align: right;
  width: 8%;
}

.project-document-constructor-table .project-document-constructor-settings-heading,
.project-document-constructor-table .project-document-constructor-settings-cell {
  border-color: transparent;
  background: transparent;
  padding-right: 6px;
  vertical-align: middle;
}

.project-document-constructor-item {
  background: #ffffff;
  cursor: pointer;
  outline: none;
}

.project-document-constructor-item:hover,
.project-document-constructor-item:focus {
  background: #e8f3ff;
}

.project-document-constructor-item.selected {
  background: #cfe7ff;
  outline: 1px solid var(--button-border);
  outline-offset: -1px;
}

.project-document-constructor-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-document-constructor-status {
  border: 1px solid #c7dfff;
  min-height: 58px;
  padding: 8px;
}

.project-document-constructor-pagination {
  align-self: end;
}

.project-document-constructor-dialog-form {
  min-width: 480px;
}

.project-document-constructor-dialog-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 700;
}

.project-document-constructor-dialog-form input {
  border: 1px solid #b8dcff;
  box-sizing: border-box;
  font: inherit;
  padding: 8px;
}

#project-document-info-dialog {
  border: 1px solid #b8dcff;
  border-radius: 6px;
  padding: 0;
  width: min(620px, 92vw);
}

#project-document-info-dialog::backdrop {
  background: rgba(0, 27, 54, 0.28);
}

.project-document-info-form {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.project-document-info-form h3 {
  color: #003366;
  margin: 0;
}

.project-document-info-form label {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 130px minmax(0, 1fr);
}

.project-document-info-form input {
  background: #f7fbff;
  border: 1px solid #b8dcff;
  box-sizing: border-box;
  color: #003366;
  font: inherit;
  padding: 8px;
  width: 100%;
}

.project-document-info-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr 1fr;
}

.project-document-info-form .dialog-actions.project-document-info-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 4px;
}

.project-document-info-form .dialog-actions.project-document-info-actions .action-button,
.project-document-info-form .dialog-actions.project-document-info-actions .secondary-button {
  min-height: 30px;
  padding: 6px 10px;
}

.project-list-pagination {
  justify-content: flex-start;
  min-height: 32px;
}

#projects-page-label {
  display: inline-block;
  min-width: 170px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.project-list-page-edge-button {
  flex: 0 0 44px !important;
  min-width: 44px !important;
  padding-left: 6px;
  padding-right: 6px;
  white-space: nowrap;
  width: 44px !important;
}

.project-subtabs {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 0;
}

.project-subtabs-row {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-height: 39px;
  flex-wrap: wrap;
}

.project-subtab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-width: 84px;
  max-width: 148px;
  height: 50px;
  min-height: 50px;
  max-height: 50px;
  border: 1px solid #cfe3fa;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #e8f3ff;
  color: #1e4f82;
  cursor: grab;
  font-weight: 600;
  line-height: 1.15;
  padding: 7px 10px 8px;
  text-align: center;
  white-space: normal;
}

.project-subtab[data-project-section="chronology"] {
  min-width: 176px;
  max-width: 176px;
}

.project-subtab-two-line {
  min-width: 146px;
}

.project-subtab:hover {
  background: #dcedff;
}

.project-subtab.active {
  background: #fff;
  color: #0c3865;
}

.project-subtab.dragging {
  cursor: grabbing;
  opacity: 0.55;
}

.project-subtab-drop-indicator {
  width: 3px;
  align-self: stretch;
  min-height: 34px;
  border-radius: 1px;
  background: #1f73d1;
}

.project-placeholder-panel {
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.project-placeholder-frame {
  min-height: calc(100vh - 320px);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px 14px;
}

.project-placeholder-frame h2 {
  margin-bottom: 8px;
  text-align: center;
}

.project-analytics-panel {
  border: 1px solid var(--panel-border);
  background: #f8fbff;
  padding: 12px;
}

.project-analytics-inner-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid #9fcfff;
  margin-bottom: 10px;
}

.project-analytics-inner-tab {
  min-height: 34px;
  border: 1px solid #9fcfff;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  background: #e8f4ff;
  color: #003b70;
  font-weight: 700;
  padding: 7px 14px;
  cursor: pointer;
}

.project-analytics-inner-tab.active {
  background: #fff;
  color: #001f3d;
  position: relative;
  top: 1px;
}

.project-analytics-layout,
.project-analytics-tab-panels {
  min-height: 470px;
}

.project-analytics-tab-panel {
  min-height: 470px;
}

.project-analytics-main,
.project-analytics-side {
  border: 1px solid var(--panel-border);
  background: #f8fbff;
  padding: 10px 12px;
}

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

.project-analytics-title-row h2,
.project-analytics-side h3 {
  margin: 0;
}

.project-analytics-status {
  min-width: 140px;
  text-align: right;
  color: #003b70;
  font-weight: 700;
}

.project-analytics-status.error {
  color: #8a1c1c;
}

.marketing-ai-placeholder {
  display: grid;
  gap: 10px;
}

.marketing-ai-placeholder p {
  margin: 0;
}

.marketing-ai-preview {
  position: relative;
  min-height: 360px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background-image: url("assets/marketing-ai-dialog-preview-cropped.png");
  background-position: top center;
  background-repeat: no-repeat;
  background-size: cover;
  overflow: hidden;
}

.marketing-ai-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(248, 251, 255, 0.18);
}

.marketing-ai-preview::after {
  content: "Образец";
  position: absolute;
  left: 50%;
  top: 50%;
  color: rgba(150, 22, 22, 0.36);
  font-size: 86px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
  transform: translate(-50%, -50%) rotate(-28deg);
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.project-analytics-form {
  display: grid;
  gap: 10px;
}

.project-analytics-form label {
  display: grid;
  gap: 4px;
  color: #002b55;
  font-weight: 700;
}

.project-analytics-form input,
.project-analytics-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #b8dcff;
  border-radius: 4px;
  background: #fff;
  padding: 6px 8px;
  color: #001f3d;
  font: inherit;
}

.project-analytics-form textarea {
  resize: vertical;
  line-height: 1.35;
}

.project-analytics-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.project-analytics-actions button,
.project-analytics-result button,
.project-analytics-files-table button,
.project-analytics-modal button {
  min-height: 34px;
  border: 1px solid #8fc4ff;
  border-radius: 6px;
  background: #e8f4ff;
  color: #003b70;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
}

.project-analytics-actions button:disabled {
  opacity: 0.6;
  cursor: default;
}

.project-analytics-result {
  border: 1px solid #b8dcff;
  background: #fff;
  min-height: 160px;
  padding: 8px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.math-analysis-wizard-messages {
  border: 1px solid #b8dcff;
  background: #fff;
  min-height: 260px;
  max-height: 430px;
  overflow: auto;
  padding: 8px;
  color: #103054;
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.42;
  text-rendering: auto;
  -webkit-font-smoothing: auto;
  white-space: normal;
}

.math-analysis-wizard-empty {
  color: #5f6f80;
  line-height: 1.45;
}

.math-analysis-wizard-message {
  border: 0;
  background: transparent;
  box-sizing: border-box;
  min-width: 0;
  padding: 0;
  width: 100%;
  max-width: 98%;
}

.math-analysis-wizard-message.user {
  margin-left: auto;
  text-align: right;
}

.math-analysis-wizard-message.assistant {
  margin-right: auto;
}

.math-analysis-wizard-message-role {
  color: inherit;
}

.math-analysis-wizard-message-content {
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  overflow-wrap: anywhere;
}

.math-analysis-table-scroll {
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-color: #579bdd #e7f3ff;
  scrollbar-width: auto;
  touch-action: pan-x pan-y;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.math-analysis-table-scroll:focus-visible {
  outline: 2px solid #579bdd;
  outline-offset: 2px;
}

.math-analysis-table-scroll::-webkit-scrollbar {
  height: 12px;
}

.math-analysis-table-scroll::-webkit-scrollbar-track {
  background: #e7f3ff;
  border-radius: 6px;
}

.math-analysis-table-scroll::-webkit-scrollbar-thumb {
  background: #579bdd;
  border: 2px solid #e7f3ff;
  border-radius: 6px;
}

.math-analysis-table-scroll .ai-dialog-markdown-table {
  min-width: 100%;
  width: var(--ai-dialog-table-preferred-width, 100%);
}

.math-analysis-answer-actions {
  justify-content: flex-start;
}

.math-analysis-message-artifacts {
  margin-top: 8px;
}

.math-analysis-wizard-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.math-analysis-wizard-quick-replies button {
  min-height: 32px;
  border: 1px solid #8fc4ff;
  border-radius: 6px;
  background: #f2f8ff;
  color: #003b70;
  font-weight: 700;
  padding: 5px 10px;
  cursor: pointer;
}

.math-analysis-wizard-input-label {
  display: grid;
  gap: 4px;
}

.math-analysis-wizard-input-row {
  align-items: stretch;
  box-sizing: border-box;
  display: grid;
  gap: 8px;
  grid-template-columns: 50% minmax(0, 1fr);
  min-width: 0;
  width: 100%;
}

.math-analysis-wizard-input-wrap {
  grid-template-columns: minmax(0, 1fr) 24px;
  height: 110px;
}

.math-analysis-wizard-input-wrap textarea {
  overflow-y: auto;
  padding-right: 4px;
  resize: none;
}

.math-analysis-wizard-input-row > textarea {
  min-height: 110px;
  width: 100%;
}

.math-analysis-wizard-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.math-analysis-wizard-controls .ai-dialog-split {
  grid-column: 1 / 2;
}

.math-analysis-wizard-controls #math-analysis-wizard-send-button {
  grid-column: 1 / 2;
}

.math-analysis-wizard-controls #math-analysis-wizard-reset-button {
  grid-column: 2 / 3;
}

.math-analysis-message-artifact-item {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.math-analysis-wizard-input-label-row {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.math-analysis-wizard-input-label-row .project-analytics-status {
  flex: 0 1 auto;
  max-width: 58%;
  text-align: right;
}

.math-analysis-wizard-inline-question {
  margin-top: 2px;
}

.math-analysis-inline-question-card {
  margin: 0 0 8px;
}

.math-analysis-technical-plan {
  border: 1px solid #d6eaff;
  background: #f8fbff;
  padding: 8px;
}

.math-analysis-technical-plan summary {
  color: #003b70;
  cursor: pointer;
  font-weight: 700;
}

.math-analysis-sql-runtime {
  display: none;
}

.math-dynamic-layout {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
}

.math-dynamic-controls,
.math-dynamic-workspace {
  background: #f8fbff;
  border: 1px solid #b8dcff;
  padding: 10px;
}

.math-dynamic-controls {
  display: grid;
  gap: 9px;
  align-content: start;
}

.math-dynamic-controls h3,
.math-dynamic-workspace h3 {
  margin: 0 0 4px;
}

.math-dynamic-controls label {
  display: grid;
  gap: 3px;
}

.math-dynamic-controls select {
  min-width: 0;
  width: 100%;
}

.math-dynamic-radio-group {
  border: 1px solid #cfe6ff;
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 8px;
}

.math-dynamic-radio-group legend {
  color: #003b70;
  font-weight: 700;
  padding: 0 4px;
}

.math-dynamic-radio-group label {
  align-items: center;
  display: flex;
  gap: 6px;
}

.math-dynamic-workspace {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.math-dynamic-summary {
  background: #fff;
  border: 1px solid #cfe6ff;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 7px 8px;
}

.math-dynamic-chart {
  background: #fff;
  border: 1px solid #cfe6ff;
  height: 360px;
  max-width: 100%;
  width: 100%;
}

.math-dynamic-table-wrap {
  border: 1px solid #b8dcff;
  max-height: 260px;
  overflow: auto;
}

.math-dynamic-table {
  background: #fff;
  border-collapse: collapse;
  width: 100%;
}

.math-dynamic-table th,
.math-dynamic-table td {
  border: 1px solid #cfe6ff;
  padding: 5px 7px;
}

.math-dynamic-table th {
  background: #e8f4ff;
  color: #003b70;
  text-align: center;
}

.project-analytics-file-profiles {
  min-height: 110px;
  max-height: 220px;
  overflow: auto;
}

.project-analytics-file-description {
  min-height: 360px;
  max-height: 65vh;
  overflow: auto;
  white-space: pre-wrap;
}

.project-analytics-files-table-wrap {
  border: 1px solid #b8dcff;
  background: #fff;
  max-height: 430px;
  overflow: auto;
}

.project-analytics-files-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.project-analytics-files-table th,
.project-analytics-files-table td {
  border: 1px solid #d6eaff;
  padding: 6px;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.project-analytics-files-table th {
  background: #e8f4ff;
  color: #002b55;
}

.project-analytics-files-table {
  table-layout: fixed;
}

.project-analytics-files-table th {
  position: relative;
  text-align: center;
}

.project-analytics-files-table th:first-child,
.project-analytics-files-table td:first-child {
  text-align: center;
}

.project-analytics-files-table th:nth-child(5),
.project-analytics-files-table td:nth-child(5) {
  text-align: right;
}

.math-analysis-files-column-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 7px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
  z-index: 2;
}

.math-analysis-files-column-resizer:hover {
  background: rgba(0, 96, 180, 0.16);
}

.project-analytics-files-table tbody tr[data-math-analysis-file-index] {
  cursor: pointer;
}

.project-analytics-files-table tbody tr.selected {
  background: #dff0ff;
}

.project-analytics-file-actions {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  gap: 6px;
}

.project-analytics-file-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.project-analytics-file-actions button {
  flex: 0 1 auto;
}

.project-analytics-file-progress {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 22px;
  padding: 2px 4px;
  color: #003f73;
  font-size: 13px;
  line-height: 1.25;
  text-align: right;
}

.project-analytics-spinner {
  width: 13px;
  height: 13px;
  box-sizing: border-box;
  border: 2px solid #9dccff;
  border-top-color: #005ca8;
  border-radius: 50%;
  flex: 0 0 auto;
  animation: project-analytics-spin 0.8s linear infinite;
}

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

.project-analytics-files-table .danger {
  border-color: #e6a0a0;
  background: #fff0f0;
  color: #8a1c1c;
  min-width: 72px;
  white-space: nowrap;
}

.project-analytics-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 31, 61, 0.28);
  padding: 24px;
}

.project-analytics-modal.hidden {
  display: none;
}

.project-analytics-modal-card {
  width: min(840px, 96vw);
  max-height: 88vh;
  border: 1px solid var(--panel-border);
  background: #f8fbff;
  padding: 12px;
  box-shadow: 0 12px 36px rgba(0, 31, 61, 0.22);
}

.project-analytics-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.project-analytics-modal-header h3 {
  margin: 0;
}

.project-analytics-modal-header button {
  min-width: 34px;
  padding: 2px 10px;
  font-size: 20px;
  line-height: 1;
}

.project-analytics-profile-item {
  border-bottom: 1px solid #d6eaff;
  padding: 6px 0;
}

.project-analytics-profile-item:last-child {
  border-bottom: 0;
}

.project-analytics-profile-item h4 {
  margin: 0 0 4px;
  color: #002b55;
}

.project-analytics-profile-item p {
  margin: 0;
  white-space: pre-wrap;
}

.project-analytics-suggestions-table-wrap {
  border: 1px solid #b8dcff;
  background: #fff;
  max-height: 520px;
  overflow: auto;
}

.project-analytics-suggestions-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.project-analytics-suggestions-table th,
.project-analytics-suggestions-table td {
  border: 1px solid #d6eaff;
  padding: 6px;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.project-analytics-suggestions-table th {
  background: #e8f4ff;
  color: #002b55;
}

.project-analytics-suggestions-table th:first-child,
.project-analytics-suggestions-table td:first-child {
  width: 34px;
  text-align: center;
}

.project-analytics-suggestions-table tbody tr {
  cursor: pointer;
}

.project-analytics-suggestions-table tbody tr:hover {
  background: #f0f8ff;
}

.project-analytics-results-panel {
  border: 1px solid var(--panel-border);
  background: #f8fbff;
  margin-top: 12px;
  padding: 10px 12px;
}

.project-analytics-results-panel h3 {
  margin: 0 0 8px;
}

@media (max-width: 900px) {
  .project-analytics-inner-tab {
    flex: 1 1 220px;
  }

  .project-analytics-files-table th:nth-child(5),
  .project-analytics-files-table td:nth-child(5) {
    width: 260px;
  }

  .project-analytics-file-actions {
    flex-wrap: wrap;
  }
}

.project-start-panel {
  border: 1px solid var(--panel-border);
  border-radius: 0;
  background: #f8fbff;
  padding: 10px 14px 12px;
  margin-top: 0;
}

.project-chronology-panel {
  border: 1px solid var(--panel-border);
  border-radius: 0;
  background: #f8fbff;
  padding: 10px 14px 12px;
  min-height: calc(100vh - 370px);
}

.project-top-panel {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(360px, 5fr);
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #f8fbff;
  padding: 14px 18px;
}

.project-top-left,
.project-top-right {
  min-width: 0;
}

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

.project-title-row h1 {
  height: 36px;
  margin: 0;
  border: 1px solid var(--panel-border);
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
  font-size: 24px;
  line-height: 34px;
  padding: 0 7px;
}

.project-endpoint-balances {
  display: grid;
  grid-template-columns: repeat(2, 222px);
  align-items: baseline;
  gap: 2px 6px;
  justify-content: start;
  min-width: 0;
  max-width: 450px;
  overflow: hidden;
}

.project-context-volume-summary {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 1px 10px;
  min-width: 0;
  color: #003366;
  font: inherit;
  font-size: 12px;
  line-height: 1.05;
}

.project-context-volume-summary strong {
  color: #003366;
}

.project-context-volume-delta {
  flex-basis: 100%;
}

.project-endpoint-balance-card {
  display: grid;
  grid-template-columns: max-content max-content max-content 18px;
  align-items: baseline;
  column-gap: 5px;
  min-height: 20px;
  min-width: 0;
  width: 222px;
  border: 0;
  background: transparent;
  padding: 0;
}

.project-endpoint-balance-name {
  font-weight: 700;
  margin-right: 0;
  white-space: nowrap;
}

.project-endpoint-balance-value {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  margin-right: 0;
  min-width: 0;
  overflow: hidden;
  text-align: right;
  white-space: nowrap;
}

.project-endpoint-balance-amount {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-endpoint-balance-warning {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  border: 1px solid #c00000;
  border-radius: 3px;
  background: #fff2cc;
  color: #c00000;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}

.project-endpoint-balance-delta {
  color: #005bbb;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  white-space: nowrap;
}

.project-balance-refresh-button {
  display: inline-flex;
  align-items: baseline;
  margin-left: 2px;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #06335f;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  min-height: 18px;
  min-width: 18px;
  padding: 0 2px;
}

.project-balance-refresh-button:hover {
  background: #e4f2ff;
}

.project-balance-refresh-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.project-meta-row,
.project-window-actions,
.model-select-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.project-meta-row {
  display: grid;
  grid-template-columns: 186px minmax(0, 1fr);
  align-items: baseline;
  gap: 6px;
  margin-top: 8px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.project-meta-row .action-button {
  width: 186px;
  max-width: 100%;
}

.project-top-right {
  padding: 0;
}

.project-window-actions {
  justify-content: flex-end;
  margin-bottom: 8px;
}

.project-clock {
  min-width: 180px;
  color: #2f5d8a;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.model-select-row {
  justify-content: flex-end;
  gap: 38px;
  font-weight: 400;
  white-space: nowrap;
}

.model-select-row select {
  width: min(420px, 62%);
  min-width: 180px;
  min-height: 37px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400 !important;
  padding: 0 8px;
  text-shadow: none;
}

.model-select-row select option {
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400 !important;
}

#project-model-select,
#ai-dialog-fullscreen-model-select {
  font-weight: 400 !important;
}

.project-start-panel h2 {
  min-height: 22px;
  margin: 0 0 8px;
  border: 1px solid var(--panel-border);
  background: #fff;
  color: #174372;
  font-size: 16px;
  line-height: 20px;
  padding: 0 4px;
  text-align: center;
}

.project-start-title-row {
  align-items: stretch;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  margin-bottom: 8px;
}

.project-start-title-row h2 {
  margin: 0;
}

.project-start-training-button {
  min-height: 24px;
}

.chronology-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 192px;
  gap: 6px;
  min-height: calc(100vh - 395px);
}

.chronology-left-frame,
.chronology-right-frame,
.billing-left-frame,
.billing-right-frame,
.context-left-frame,
.context-right-frame {
  min-width: 0;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px;
}

.context-api-refresh-form {
  width: min(720px, 92vw);
  gap: 12px;
}

.context-api-refresh-form h2 {
  margin-bottom: 4px;
  text-align: center;
}

.context-api-refresh-mode {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.context-api-refresh-mode button {
  flex: 1 1 260px;
}

.context-api-refresh-mode button.active {
  background: #0f766e;
  border-color: #0d665f;
  color: #fff;
}

.context-api-provider-fieldset {
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px 12px;
}

.context-api-provider-fieldset legend {
  color: #174372;
  font-weight: 700;
  padding: 0 6px;
}

.context-api-provider-fieldset label {
  align-items: center;
  display: flex;
  gap: 8px;
  min-height: 28px;
}

.context-api-refresh-progress {
  height: 16px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #e8f3ff;
}

#context-api-refresh-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1f73d1, #0f766e);
  transition: width 160ms ease;
}

.chronology-left-frame {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.chronology-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
}

.billing-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.context-title-row,
.api-loads-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.chronology-title-row h2,
.billing-title-row h2,
.billing-right-frame h2,
.context-title-row h2,
.api-loads-title-row h2,
.context-right-frame h2 {
  flex: 1;
  margin: 0;
  border: 1px solid var(--panel-border);
  background: #fff;
  color: #174372;
  font-size: 16px;
  line-height: 20px;
  min-height: 22px;
  padding: 0 4px;
  text-align: center;
}

.chronology-ai-generated-label {
  min-height: 20px;
  margin: 0 0 2px;
  color: #174372;
  font-size: 14px;
  line-height: 18px;
  text-align: left;
}

.chronology-right-frame h2 {
  margin: 0;
  border: 1px solid var(--panel-border);
  background: #fff;
  color: #174372;
  font-size: 16px;
  line-height: 20px;
  min-height: 45px;
  padding: 3px 4px;
  text-align: center;
}

.icon-button {
  width: 34px;
  height: 29px;
  border: 1px solid var(--button-border);
  border-radius: 6px;
  background: var(--button);
  color: var(--text);
}

.columns-menu {
  position: absolute;
  z-index: 5;
  right: 166px;
  margin-top: -6px;
  min-width: 240px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(9, 35, 63, 0.16);
  padding: 8px;
}

.columns-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  margin-bottom: 6px;
}

.columns-menu-header p {
  margin: 0;
  font-weight: 700;
}

.columns-menu-close {
  width: 24px;
  height: 24px;
  border: 1px solid var(--button-border);
  border-radius: 5px;
  background: var(--button);
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
  line-height: 18px;
  padding: 0;
}

.columns-menu label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.hidden-column {
  display: none;
}

.chronology-right-frame {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}

.chronology-right-frame .action-button {
  min-height: 36px;
  width: 100%;
}

#chronology-status {
  min-height: 118px;
  max-height: 118px;
  margin-bottom: 0;
  overflow: auto;
  padding-right: 4px;
  white-space: pre-wrap;
}

.chronology-count-label {
  min-height: 32px;
  margin-top: 0;
}

.chronology-delete-gap {
  height: 20px;
}

.chronology-table-panel {
  height: auto;
  min-height: 360px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #d0d0d0;
  background: #fff;
}

.chronology-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  background: #fff;
  font-size: 100%;
  table-layout: fixed;
}

.project-billing-panel {
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.billing-layout {
  display: grid;
  grid-template-columns: minmax(0, 87fr) minmax(130px, 13fr);
  gap: 12px;
  min-height: calc(100vh - 320px);
}

.project-context-panel {
  border: 1px solid var(--panel-border);
  border-radius: 0;
  background: #f8fbff;
  padding: 10px 14px 12px;
}

.context-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 6px;
  min-height: calc(100vh - 334px);
}

.api-loads-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 8px;
  min-height: calc(100vh - 334px);
}

.api-loads-left-frame {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 8px;
}

.api-loads-right-frame h2 {
  margin: 0;
  text-align: center;
}

.api-loads-filters {
  display: grid;
  grid-template-columns: minmax(145px, 1.15fr) minmax(145px, 1.05fr) minmax(115px, 0.8fr) minmax(125px, 0.9fr) minmax(125px, 0.9fr);
  column-gap: 28px;
  row-gap: 8px;
  min-width: 0;
}

.api-loads-columns-menu {
  right: 176px;
  margin-top: -4px;
}

.api-loads-filters label {
  color: #174372;
  display: grid;
  gap: 3px;
  font-weight: 700;
  min-width: 0;
}

.api-loads-filters input,
.api-loads-filters select {
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  font: inherit;
  min-height: 28px;
  min-width: 0;
  padding: 4px 6px;
  width: 100%;
}

.api-loads-table-panel {
  overflow-x: hidden;
}

.api-loads-table {
  table-layout: fixed;
  width: 100%;
}

.api-loads-table th,
.api-loads-table td {
  font-size: 13px;
  vertical-align: top;
}

.api-loads-table th {
  position: relative;
}

.api-loads-table [data-api-load-column-key="rowNumber"] {
  width: 1%;
}

.api-loads-table th[data-api-load-column-key="rowNumber"],
.api-loads-table td[data-api-load-column-key="rowNumber"],
.api-loads-table td[data-api-load-column-key="age"],
.api-loads-table td[data-api-load-column-key="refreshAction"],
.api-loads-table td[data-api-load-column-key="size"] {
  padding-left: 3px;
  padding-right: 3px;
  text-align: center;
  white-space: nowrap;
}

.api-loads-table td[data-api-load-column-key="size"] {
  text-align: right;
  white-space: nowrap;
}

.api-load-row-refresh-button {
  background: #0f8a5f;
  border: 1px solid #0b744f;
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 24px;
  padding: 2px 9px;
  white-space: nowrap;
}

.api-load-row-refresh-button:hover {
  background: #0b744f;
}

.api-loads-table td[data-api-load-column-key="provider"],
.api-loads-table td[data-api-load-column-key="created"],
.api-loads-table td[data-api-load-column-key="refreshed"],
.api-loads-table td[data-api-load-column-key="age"] {
  white-space: nowrap;
}

.api-loads-table tr.selected td {
  background: #cfe8ff;
}

.api-load-column-title {
  display: block;
  padding-right: 8px;
}

.api-load-column-resizer {
  bottom: 0;
  cursor: col-resize;
  position: absolute;
  right: -3px;
  top: 0;
  width: 8px;
  z-index: 2;
}

.api-loads-table th:last-child .api-load-column-resizer {
  display: none;
}

.api-load-column-resizer:hover {
  background: rgba(31, 115, 209, 0.2);
}

.api-load-create-form {
  width: min(780px, 94vw);
  gap: 12px;
}

.api-load-subject-panel,
.api-load-directions-panel {
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 10px 12px;
}

.api-load-subject-panel legend,
.api-load-directions-panel legend {
  color: #174372;
  font-weight: 700;
  padding: 0 6px;
}

.api-load-directions-panel legend {
  align-items: center;
  display: flex;
  gap: 12px;
}

.api-load-select-all-button {
  font-size: 13px;
  min-height: 28px;
  padding: 3px 12px;
}

.api-load-create-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  justify-items: stretch;
}

.api-load-create-actions #api-load-create-run-button {
  grid-column: 2;
  justify-self: center;
}

.api-load-create-actions #api-load-create-close-button {
  grid-column: 3;
  justify-self: end;
}

.api-load-subject-panel label {
  display: grid;
  gap: 4px;
}

.api-load-inn-row {
  align-items: end;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 10px;
}

.api-load-subject-panel input {
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  font: inherit;
  min-height: 30px;
  padding: 4px 7px;
}

.api-load-operation-grid {
  display: grid;
  align-items: start;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.api-load-operation-column {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.api-load-operation-grid .api-load-operation-choice {
  align-items: start;
  display: flex;
  gap: 10px;
  min-height: 30px;
}

.api-load-operation-grid .api-load-operation-choice input[type="checkbox"] {
  flex: 0 0 18px;
  height: 18px;
  margin: 1px 0 0;
  min-height: 0;
  width: 18px;
}

.api-load-operation-grid .api-load-operation-text {
  display: grid;
  gap: 3px;
  line-height: 18px;
  min-width: 0;
}

.api-load-operation-title {
  cursor: pointer;
  min-width: 0;
}

.api-load-operation-description {
  color: #39536e;
  display: grid;
  font-size: 12px;
  font-weight: 400;
  gap: 3px;
  line-height: 1.28;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: justify;
  text-justify: inter-word;
  white-space: normal;
  word-break: normal;
}

.api-load-operation-description span {
  display: block;
  text-indent: 18px;
}

.api-load-operation-description a {
  color: #0b63c7;
  text-decoration: underline;
}

.api-load-operation-description a:hover {
  color: #074c99;
}

.api-load-participant-form {
  width: min(940px, 94vw);
  gap: 10px;
}

.api-load-participant-table-wrap {
  border: 1px solid #d0d0d0;
  max-height: 340px;
  overflow-y: auto;
  overflow-x: hidden;
}

.api-load-participant-table {
  table-layout: fixed;
  width: 100%;
}

.api-load-participant-table th {
  position: relative;
}

.api-load-participant-table th,
.api-load-participant-table td {
  overflow-wrap: anywhere;
  vertical-align: top;
}

.api-load-participant-table th:nth-child(1),
.api-load-participant-table td:nth-child(1) {
  text-align: center;
  white-space: nowrap;
}

.api-load-participant-column-title {
  display: block;
  overflow: hidden;
  padding-right: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-load-participant-column-resizer {
  bottom: 0;
  cursor: col-resize;
  position: absolute;
  right: -4px;
  top: 0;
  width: 8px;
  z-index: 2;
}

.api-load-participant-table th:last-child .api-load-participant-column-resizer {
  display: none;
}

.api-load-participant-column-resizer:hover {
  background: rgba(31, 115, 209, 0.2);
}

.api-load-participant-table td:first-child {
  white-space: nowrap;
}

.api-load-participant-table tr.selected td {
  background: #cfe8ff;
}

.context-left-frame {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.context-right-frame {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px 7px;
  justify-content: flex-start;
  align-self: start;
}

.context-right-frame .action-button {
  min-height: 52px;
  width: 100%;
}

.context-delete-gap {
  height: 12px;
}

.context-service-status {
  border: 1px solid var(--panel-border);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  margin: 2px 0 0;
  min-height: 56px;
  overflow-wrap: anywhere;
  padding: 6px;
}

.context-api-bulk-control {
  align-items: center;
  background: #fff;
  border: 1px solid var(--panel-border);
  color: #174372;
  display: flex;
  flex-direction: column;
  font-size: 12px;
  font-weight: 700;
  gap: 7px;
  line-height: 1.25;
  padding: 8px 5px;
  text-align: center;
}

.context-upload-dropzone {
  display: none;
  gap: 4px;
  margin-bottom: 10px;
  border: 1px dashed var(--button-border);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  color: var(--text);
  cursor: pointer;
}

.context-upload-dropzone strong,
.context-upload-dropzone span {
  display: block;
}

.context-upload-dropzone span {
  color: var(--muted);
}

.context-upload-dropzone.drag-over {
  border-style: solid;
  background: #e8f3ff;
  outline: 2px solid #cfe7ff;
}

.context-table-panel {
  height: auto;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #d0d0d0;
  background: #fff;
}

.context-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
  table-layout: fixed;
}

.context-table th,
.context-table td {
  background: #ffffff;
  border: 1px solid var(--grid);
  padding: 4px 4px;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.context-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6fbff;
  font-weight: 700;
  text-align: center;
}

.context-column-header {
  cursor: grab;
  user-select: none;
}

.context-row-number-header {
  cursor: default;
}

.context-table th[data-context-column-key="rowNumber"],
.context-table td[data-context-column-key="rowNumber"] {
  width: 1%;
  min-width: 24px;
  padding-left: 3px;
  padding-right: 3px;
  text-align: center;
  white-space: nowrap;
}

.context-table td[data-context-column-key="size"] {
  text-align: right;
}

.context-table td.context-ai-excluded-cell {
  background: #ffd6e2;
}

.context-ai-toggle-cell {
  padding: 4px !important;
  text-align: center;
}

.context-ai-toggle {
  cursor: pointer;
  display: inline-flex;
  position: relative;
  vertical-align: middle;
}

.context-ai-toggle input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.context-ai-toggle-track {
  background: #d6dde5;
  border: 1px solid #9aa9b8;
  border-radius: 11px;
  box-sizing: border-box;
  display: inline-flex;
  height: 22px;
  padding: 2px;
  transition: background-color 120ms ease, border-color 120ms ease;
  width: 40px;
}

.context-ai-toggle-thumb {
  background: #fff;
  border: 1px solid #8795a4;
  border-radius: 50%;
  box-sizing: border-box;
  height: 16px;
  transform: translateX(0);
  transition: transform 120ms ease;
  width: 16px;
}

.context-ai-toggle input:checked + .context-ai-toggle-track {
  background: #68d391;
  border-color: #2f9e5b;
}

.context-ai-toggle input:checked + .context-ai-toggle-track .context-ai-toggle-thumb {
  border-color: #23844a;
  transform: translateX(18px);
}

.context-ai-toggle input:focus-visible + .context-ai-toggle-track {
  outline: 2px solid #1f6feb;
  outline-offset: 2px;
}

.context-ai-toggle input:disabled + .context-ai-toggle-track {
  cursor: wait;
  opacity: 0.55;
}

.context-column-header.dragging {
  opacity: 0.55;
}

.context-column-title {
  display: block;
  padding-right: 8px;
}

.context-column-resizer {
  bottom: 0;
  cursor: col-resize;
  position: absolute;
  right: -3px;
  top: 0;
  width: 8px;
  z-index: 2;
}

.context-column-resizer:hover {
  background: rgba(31, 115, 209, 0.16);
}

.context-table tbody tr:hover,
.context-table tbody tr:focus {
  background: #e8f3ff;
}

.context-table tbody tr:hover td,
.context-table tbody tr:focus td {
  background: #e8f3ff;
}

.context-table tbody tr:hover td.context-ai-excluded-cell,
.context-table tbody tr:focus td.context-ai-excluded-cell {
  background: #ffbfd2;
}

.context-table tbody tr.selected {
  background: #cfe7ff;
  outline: 1px solid var(--button-border);
}

.context-table tbody tr.selected td {
  background: #cfe7ff;
}

.context-table tbody tr.selected td.context-ai-excluded-cell {
  background: #ffabc3;
}

.context-summary {
  border: 1px solid var(--panel-border);
  background: #fff;
  color: #174372;
  font-weight: 600;
  font-style: italic;
  line-height: 20px;
  margin: 9px 0 0;
  min-height: 22px;
  overflow: hidden;
  padding: 0 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-ai-panel {
  min-height: 580px;
  padding: 0;
}

#project-ai-dialogs-section {
  flex: 1 1 auto;
  min-height: 0;
}

.project-account-context-panel {
  min-height: 560px;
}

.account-context-layout {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 180px;
  height: calc(100vh - 418px);
  min-height: 520px;
}

.account-context-main,
.account-context-side {
  background: #f7fbff;
  border: 1px solid #b8d7f4;
}

.account-context-main {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-height: 0;
  padding: 8px 10px 10px;
  position: relative;
}

.account-context-title-row {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  gap: 8px;
}

.account-context-title-row h2 {
  justify-self: center;
  text-align: center;
  color: #174372;
  display: block;
  font-size: 18px;
  font-weight: 700;
  line-height: 30px;
  margin: 0;
  padding: 0 6px;
  width: fit-content;
}

.account-context-title-row .icon-button {
  justify-self: end;
}

.account-context-help {
  background: #fff;
  border: 1px solid #c5def7;
  color: #174372;
  font-weight: 600;
  line-height: 20px;
  margin: 6px 0 8px;
  min-height: 22px;
  padding: 0 4px;
}

.account-context-table-wrap {
  background: #ffffff;
  border: 1px solid #d6e8fa;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
}

.account-context-table {
  background: #ffffff;
  border-collapse: collapse;
  color: #0b2d52;
  font-size: 14px;
  width: 100%;
}

.account-context-table th,
.account-context-table td {
  background: #ffffff;
  border: 1px solid #c7cfd9;
  padding: 4px 6px;
  vertical-align: top;
}

.account-context-table th {
  background: #edf2f7;
  font-weight: 700;
  text-align: left;
}

.account-context-table th[data-account-column-key="title"] {
  text-align: center;
}

.account-context-table th[data-account-column-key="rowNumber"],
.account-context-table td[data-account-column-key="rowNumber"] {
  min-width: 24px;
  padding-left: 3px;
  padding-right: 3px;
  text-align: center;
  white-space: nowrap;
  width: 1%;
}

.account-context-table th[data-account-column-key="size"],
.account-context-table td[data-account-column-key="size"] {
  text-align: right;
  white-space: nowrap;
}

.account-context-table th[data-account-column-key="updated"],
.account-context-table td[data-account-column-key="updated"] {
  white-space: nowrap;
}

.account-context-table tbody tr:hover,
.account-context-table tbody tr:focus {
  background: #e8f3ff;
}

.account-context-table tbody tr:hover td,
.account-context-table tbody tr:focus td {
  background: #e8f3ff;
}

.account-context-table tbody tr.selected {
  background: #cfe7ff;
  outline: 1px solid var(--button-border);
}

.account-context-table tbody tr.selected td {
  background: #cfe7ff;
}

.account-context-summary {
  background: #ffffff;
  border: 1px solid #b8d7f4;
  color: #174372;
  font-style: italic;
  font-weight: 700;
  line-height: 22px;
  margin: 10px 0 0;
  min-height: 24px;
  padding: 0 4px;
}

.account-context-service-status {
  background: #eef6ff;
  border: 1px solid #b8d7f4;
  color: #174372;
  line-height: 17px;
  margin: 8px 0 0;
  min-height: 52px;
  padding: 6px;
}

.account-context-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 6px;
}

.account-context-side h2 {
  color: #0a3463;
  font-size: 16px;
  font-weight: 700;
  line-height: 18px;
  margin: 2px 0 8px;
}

.account-context-side .action-button {
  min-height: 50px;
  width: 100%;
}

.account-context-columns-menu {
  background: #ffffff;
  border: 1px solid #b8d7f4;
  border-radius: 4px;
  box-shadow: 0 10px 24px rgba(9, 35, 63, 0.16);
  color: #0b2d52;
  display: grid;
  gap: 8px;
  min-width: 270px;
  padding: 8px 10px;
  position: absolute;
  right: 10px;
  top: 44px;
  z-index: 20;
}

.account-context-columns-menu.hidden {
  display: none;
}

.account-context-columns-menu label {
  align-items: start;
  display: grid;
  font-size: 14px;
  font-weight: 700;
  gap: 6px;
  grid-template-columns: auto 1fr;
  line-height: 17px;
}

.account-context-columns-menu input {
  accent-color: #3e93dd;
  height: 13px;
  margin-top: 2px;
  width: 13px;
}

.account-context-side .danger {
  margin-top: 4px;
}

.ai-block-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 10px;
  min-height: 620px;
}

.ai-dialog-layout {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

.ai-block-main,
.ai-block-side {
  border: 1px solid #9aa7b8;
  background: #f6f7f9;
  padding: 10px;
}

.ai-dialog-main {
  background: #fff;
  border: 1px solid #d6e8fa;
  border-radius: 8px;
  box-sizing: border-box;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  height: calc(100vh - 294px);
  padding: 9px 10px 0;
  min-height: 0;
  min-width: 0;
  width: 100%;
}

.ai-block-main h2,
.ai-dialog-main h2,
.ai-block-side h2 {
  color: #143f70;
  margin: 0 0 7px;
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
}

.ai-block-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-block-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 13px;
}

.ai-block-table th,
.ai-block-table td {
  border: 1px solid #b8c0cc;
  padding: 6px 8px;
  vertical-align: top;
}

.ai-block-table th {
  background: #edf1f6;
  font-weight: 600;
  text-align: left;
}

.ai-block-table tbody tr:hover,
.ai-block-table tbody tr:focus {
  background: #eef5ff;
}

.ai-block-table tbody tr.selected {
  background: #cfe3ff;
}

.ai-action-proposal-row td {
  background: #fffaf0;
}

.ai-action-proposal-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-action-proposal-question,
.ai-action-proposal-answer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-action-proposal-title {
  font-weight: 700;
}

.ai-action-proposal-meta,
.ai-action-proposal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-action-proposal-status {
  border: 1px solid #b8c0cc;
  border-radius: 4px;
  padding: 1px 5px;
}

.ai-action-proposal-status-pending {
  background: #fff1c7;
}

.ai-action-proposal-status-applied {
  background: #ddf6df;
}

.ai-action-proposal-status-rejected {
  background: #f6dddd;
}

.ai-action-proposal-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-action-proposal-options .ai-dialog-question-option {
  justify-content: center;
  width: 100%;
}

.ai-action-proposal-final-answer {
  border: 1px solid #b8c0cc;
  border-radius: 4px;
  background: #eef6ff;
  padding: 4px 6px;
  text-align: center;
}

.ai-action-proposal-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.saved-ai-answers-layout {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 224px;
  height: calc(100vh - 352px);
  min-height: 560px;
}

.saved-ai-answers-main,
.saved-ai-answers-side {
  background: #f6f7f9;
  border: 1px solid #9aa7b8;
  box-sizing: border-box;
  padding: 10px;
}

.saved-ai-answers-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.saved-ai-answers-main h2,
.saved-ai-answers-side h2 {
  color: #143f70;
  font-size: 18px;
  font-weight: 700;
  line-height: 30px;
  margin: 0 0 7px;
  text-align: center;
}

.saved-ai-answers-table-wrap {
  background: #fff;
  border: 1px solid #d7e8fa;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.saved-ai-answers-table {
  background: #fff;
  border-collapse: collapse;
  color: #0b2d52;
  font-size: 14px;
  table-layout: fixed;
  width: 100%;
}

.saved-ai-answers-table th,
.saved-ai-answers-table td {
  border: 1px solid #b8c0cc;
  color: #061c3c;
  line-height: 18px;
  padding: 4px 5px;
  text-align: left;
  vertical-align: top;
}

.saved-ai-answers-table th {
  background: #edf1f6;
  font-weight: 600;
  text-align: center;
}

.saved-ai-answers-table th:nth-child(1),
.saved-ai-answers-table td:nth-child(1) {
  padding-left: 3px;
  padding-right: 3px;
  text-align: center;
  white-space: nowrap;
  width: 4%;
}

.saved-ai-answers-table th:nth-child(2),
.saved-ai-answers-table td:nth-child(2) {
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: normal;
  width: 48%;
}

.saved-ai-answers-table th:nth-child(3),
.saved-ai-answers-table td:nth-child(3) {
  width: 25%;
}

.saved-ai-answers-table th:nth-child(4),
.saved-ai-answers-table td:nth-child(4) {
  text-align: center;
  width: 23%;
}

.saved-ai-answers-table tbody tr {
  cursor: default;
}

.saved-ai-answers-table tbody tr:hover,
.saved-ai-answers-table tbody tr:focus {
  background: #eef5ff;
}

.saved-ai-answers-table tbody tr.selected {
  background: #cfe3ff;
}

.saved-ai-answers-status {
  border: 1px solid #d7e8fa;
  color: #174372;
  font-style: italic;
  font-weight: 700;
  margin: 8px 0 0;
  padding: 2px 4px;
}

.saved-ai-answers-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.saved-ai-answers-side .action-button {
  min-height: 36px;
  width: 100%;
}

.participants-layout {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 246px;
  height: calc(100vh - 342px);
  min-height: 560px;
}

.participants-main,
.participants-side {
  background: #f7fbff;
  border: 1px solid #b8d7f4;
}

.participants-main {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-height: 0;
  padding: 12px 10px 0;
  position: relative;
}

.participants-title-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  margin-bottom: 0;
}

.participants-title-row h2 {
  color: #174372;
  display: block;
  grid-column: 2;
  font-size: 18px;
  font-weight: 700;
  justify-self: start;
  line-height: 30px;
  margin: 0;
  padding: 0 6px;
  text-align: center;
  width: 100%;
}

.participants-title-row .icon-button {
  background: #d7eafd;
  border-color: #b8d7f4;
  color: #8b9bb0;
  grid-column: 3;
  height: 30px;
  justify-self: end;
  min-height: 30px;
  width: 34px;
}

.participants-title-row .icon-button:hover {
  background: #cde5fd;
  color: #174372;
}

.participants-ai-generated-label {
  color: #174372;
  font-size: 13px;
  font-weight: 400;
  line-height: 14px;
  margin: 0 0 7px;
  min-height: 14px;
  text-align: left;
}

.participants-ai-generated-label.hidden {
  display: none;
}

.participants-table-wrap {
  background: #ffffff;
  border: 1px solid #d6e8fa;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.participants-table {
  background: #ffffff;
  border-collapse: collapse;
  color: #0b2d52;
  font-size: 14px;
  table-layout: fixed;
  width: 100%;
}

.participants-table th,
.participants-table td {
  border: 1px solid #c7cfd9;
  overflow: hidden;
  padding: 4px 5px;
  vertical-align: top;
}

.participants-table th {
  background: #edf2f7;
  font-weight: 700;
  position: relative;
  text-align: center;
  white-space: nowrap;
}

.participant-column-header {
  cursor: grab;
  user-select: none;
}

.participant-column-header.dragging {
  opacity: 0.55;
}

.participant-row-number-header {
  cursor: default;
}

.participant-column-title {
  display: block;
  padding-right: 8px;
}

.participant-column-resizer {
  bottom: 0;
  cursor: col-resize;
  position: absolute;
  right: -3px;
  top: 0;
  width: 8px;
  z-index: 2;
}

.participant-column-resizer:hover {
  background: rgba(31, 115, 209, 0.16);
}

.participants-table th[data-participant-column-key="rowNumber"],
.participants-table td[data-participant-column-key="rowNumber"] {
  padding-left: 3px;
  padding-right: 3px;
  text-align: center;
  white-space: nowrap;
}

.participants-table th[data-participant-column-key="name"],
.participants-table td[data-participant-column-key="name"] {
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: normal;
}

.participants-table th[data-participant-column-key="inn"],
.participants-table td[data-participant-column-key="inn"] {
  white-space: nowrap;
}

.participants-table th[data-participant-column-key="role"],
.participants-table td[data-participant-column-key="role"] {
  white-space: normal;
  word-break: normal;
}

.participants-table tbody tr:hover,
.participants-table tbody tr:focus {
  background: #e8f3ff;
}

.participants-table tbody tr.selected {
  background: #cfe7ff;
  outline: 1px solid var(--button-border);
}

.participants-status {
  background: #ffffff;
  border: 1px solid #b8d7f4;
  color: #174372;
  font-style: italic;
  font-weight: 700;
  line-height: 22px;
  margin: 10px 0 0;
  min-height: 24px;
  padding: 0 4px;
}

.participants-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
}

.participants-side h2 {
  border: 1px solid #b8d7f4;
  border-radius: 6px;
  color: #0a3463;
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
  margin: 0 0 4px;
  padding: 4px 6px;
}

.participants-side .action-button {
  min-height: 36px;
  width: 100%;
}

.participants-side-status {
  background: #ffffff;
  border: 1px solid #b8d7f4;
  color: #174372;
  font-size: 13px;
  line-height: 17px;
  margin: auto 0 0;
  min-height: 70px;
  padding: 6px;
  white-space: pre-wrap;
}

.participants-side .danger {
  margin-top: 36px;
}

.participants-columns-menu {
  background: #ffffff;
  border: 1px solid #b8d7f4;
  border-radius: 4px;
  box-shadow: 0 10px 24px rgba(9, 35, 63, 0.16);
  color: #0b2d52;
  display: grid;
  gap: 8px;
  min-width: 260px;
  padding: 8px 10px;
  position: absolute;
  right: 10px;
  top: 44px;
  z-index: 20;
}

.participants-columns-menu .columns-menu-title-row {
  align-items: center;
  display: grid;
  grid-template-columns: 1fr 22px;
}

.participants-columns-menu.hidden {
  display: none;
}

.participants-columns-menu label {
  align-items: start;
  display: grid;
  font-size: 14px;
  font-weight: 700;
  gap: 6px;
  grid-template-columns: auto 1fr;
  line-height: 17px;
}

.participants-columns-menu input {
  accent-color: #3e93dd;
  height: 13px;
  margin-top: 2px;
  width: 13px;
}

.participants-columns-menu input:disabled {
  opacity: 0.72;
}

.ai-dialog-title-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto auto;
  margin-bottom: 6px;
}

.ai-dialog-title-row h2 {
  color: #123d70;
  margin: 0;
}

.ai-dialog-verify-toggle {
  align-items: center;
  display: inline-flex;
  gap: 4px;
  justify-content: flex-end;
  white-space: nowrap;
}

.ai-dialog-verify-toggle-label {
  color: #123d70;
  font-size: 13px;
  font-weight: 700;
}

.ai-dialog-verify-toggle-button {
  background: #eef7ff;
  border: 1px solid #8fbdea;
  color: #123d70;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  min-height: 24px;
  min-width: 42px;
  padding: 2px 7px;
}

.ai-dialog-verify-toggle-button:first-of-type {
  border-radius: 4px 0 0 4px;
}

.ai-dialog-verify-toggle-button:last-of-type {
  border-radius: 0 4px 4px 0;
  margin-left: -1px;
}

.ai-dialog-verify-toggle-button.active {
  background: #c6efce;
  border-color: #6fbd74;
  color: #0b4d18;
}

.ai-dialog-verify-toggle-button:hover {
  background: #dff0ff;
}

.ai-dialog-verify-toggle-button.active:hover {
  background: #b8e8c1;
}

.ai-dialog-history-reload-button {
  background: transparent;
  border: 1px solid var(--button-border);
  border-radius: 4px;
  color: #123d70;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 30px;
  padding: 5px 12px;
}

.ai-dialog-history-reload-button:hover {
  background: rgba(217, 239, 255, 0.34);
}

.ai-dialog-history-reload-button:disabled {
  color: #7d93a8;
  cursor: default;
  opacity: 0.72;
}

.ai-dialog-messages {
  flex: 1 1 auto;
  height: auto;
  min-height: 345px;
  overflow: auto;
  border: 1px solid #b8cde4;
  border-radius: 6px;
  background: #fff;
  padding: 8px 10px;
  color: #103054;
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.42;
  text-rendering: auto;
  -webkit-font-smoothing: auto;
  white-space: normal;
}

.ai-dialog-messages * {
  font-family: inherit;
  letter-spacing: 0;
  text-rendering: auto;
  -webkit-font-smoothing: auto;
}

.ai-dialog-message {
  margin-bottom: 10px;
  max-width: 98%;
}

.ai-dialog-message:last-child {
  margin-bottom: 0;
}

.ai-dialog-message-header {
  display: block;
  margin-bottom: 3px;
  font-weight: 700;
  color: inherit;
}

.ai-dialog-message-time-hint {
  color: #496782;
  font-size: 0.9em;
  font-style: italic;
  font-weight: 400;
}

.ai-dialog-answer-inline-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 6px;
}

.ai-dialog-answer-inline-actions-label {
  color: #355979;
  font-size: 13px;
  font-style: italic;
  font-weight: 700;
  line-height: 18px;
  margin-right: 2px;
}

.ai-dialog-answer-inline-action {
  border: 1px solid transparent;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  min-height: 24px;
  padding: 3px 8px;
}

.ai-dialog-answer-inline-action.copy {
  background: #1f6feb;
  border-color: #1659c7;
}

.ai-dialog-answer-inline-action.save {
  background: #168a5a;
  border-color: #0f6f47;
}

.ai-dialog-answer-inline-action.export {
  background: #a8ef72;
  border-color: #72c541;
  color: #173b16;
}

.ai-dialog-answer-inline-action.export:hover {
  background: #91df59;
  border-color: #5eae33;
  filter: none;
}

.ai-dialog-answer-inline-action:hover {
  filter: brightness(1.08);
}

.ai-dialog-answer-inline-action:focus-visible {
  outline: 2px solid #0b315f;
  outline-offset: 2px;
}

.ai-dialog-message-body {
  font-weight: 400;
  overflow-wrap: anywhere;
  white-space: normal;
}

.ai-dialog-verify-marker {
  color: inherit;
  display: inline;
  margin: 0;
  padding: 0;
  vertical-align: baseline;
}

.ai-dialog-verify-value {
  min-width: 0;
}

.ai-dialog-verify-copy {
  align-items: center;
  background: #f7fff5;
  border: 1px solid #9ad59e;
  border-radius: 3px;
  color: #126320;
  cursor: pointer;
  display: inline-flex;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  height: 18px;
  justify-content: center;
  letter-spacing: 0.2px;
  line-height: 1;
  margin: 0 2px;
  padding: 0;
  position: relative;
  vertical-align: 0.12em;
  white-space: nowrap;
  width: 18px;
}

.ai-dialog-verify-copy:hover {
  background: #e8ffe4;
  border-color: #64b96d;
}

.ai-dialog-verify-copy.copied {
  background: #d9f6d9;
  border-color: #2f9e44;
  color: transparent;
}

.ai-dialog-verify-copy.copied::after {
  color: #128a32;
  content: "✓";
  font-size: 12px;
  font-weight: 700;
  left: 50%;
  line-height: 1;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.ai-dialog-verification-off .ai-dialog-verify-copy {
  display: none;
}

.ai-dialog-export-preview-content .ai-dialog-verify-copy,
.ai-dialog-export-chat-block .ai-dialog-verify-copy {
  display: none;
}

@media (max-width: 760px) {
  .ai-dialog-title-row {
    grid-template-columns: 1fr;
  }

  .ai-dialog-verify-toggle,
  .ai-dialog-history-reload-button {
    justify-self: stretch;
  }
}

.ai-dialog-message.user .ai-dialog-message-body,
.ai-dialog-message.service .ai-dialog-message-body {
  white-space: pre-wrap;
}

.ai-dialog-user-prompt-collapsible {
  align-items: flex-start;
  display: inline-grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) 24px;
  max-width: 100%;
  text-align: right;
  white-space: normal;
}

.ai-dialog-user-prompt-text {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.ai-dialog-user-prompt-toggle {
  align-items: center;
  background: #eef7ff;
  border: 1px solid #9fcaff;
  border-radius: 4px;
  color: #0b4f93;
  cursor: pointer;
  display: inline-flex;
  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  height: 22px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 22px;
}

.ai-dialog-user-prompt-toggle:hover {
  background: #d9edff;
  border-color: #6eace8;
}

.ai-dialog-user-prompt-toggle:focus-visible {
  outline: 2px solid #0b315f;
  outline-offset: 2px;
}

.ai-dialog-inline-image {
  margin: 8px auto;
  max-width: 92%;
  white-space: normal;
}

.math-analysis-graphic-scroll {
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-color: #579bdd #e7f3ff;
  scrollbar-width: auto;
  touch-action: pan-x pan-y;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.math-analysis-graphic-scroll:focus-visible {
  outline: 2px solid #579bdd;
  outline-offset: 2px;
}

.math-analysis-graphic-scroll::-webkit-scrollbar {
  height: 12px;
}

.math-analysis-graphic-scroll::-webkit-scrollbar-track {
  background: #e7f3ff;
  border-radius: 6px;
}

.math-analysis-graphic-scroll::-webkit-scrollbar-thumb {
  background: #579bdd;
  border: 2px solid #e7f3ff;
  border-radius: 6px;
}

.math-analysis-graphic-scroll .ai-dialog-inline-image {
  display: inline-block;
  margin: 8px 0;
  max-width: none;
  min-width: 100%;
}

.ai-dialog-inline-download {
  background: #1f6feb;
  border: 1px solid #1659c7;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font: inherit;
  font-weight: 700;
  line-height: 18px;
  margin: 3px 0;
  padding: 4px 9px;
  text-decoration: none;
}

.ai-dialog-inline-download:hover {
  filter: brightness(1.08);
  text-decoration: none;
}

.ai-dialog-inline-image img {
  background: #fff;
  border: 1px solid #b8dcff;
  border-radius: 6px;
  display: block;
  height: auto;
  margin: 0 auto;
  max-height: 420px;
  max-width: 100%;
  object-fit: contain;
}

.math-analysis-graphic-scroll .ai-dialog-inline-image img {
  max-width: none;
  width: auto;
}

.ai-dialog-inline-image figcaption {
  color: #496782;
  font-size: 12px;
  margin-top: 4px;
}

.ai-dialog-message.user {
  margin-left: auto;
  text-align: right;
}

.ai-dialog-message.assistant {
  margin-right: auto;
}

.ai-dialog-message.assistant .ai-dialog-message-body > div {
  margin: 0 0 8px;
}

.ai-dialog-message.assistant .ai-dialog-message-body > div:last-child {
  margin-bottom: 0;
}

.ai-dialog-rendered-heading {
  color: #003366;
  font-family: "Times New Roman", Times, serif;
  font-weight: 700;
  line-height: 1.22;
  margin: 12px 0 8px;
}

h2.ai-dialog-rendered-heading {
  font-size: 19px;
  text-align: center;
}

h3.ai-dialog-rendered-heading {
  font-size: 17px;
}

h4.ai-dialog-rendered-heading,
h5.ai-dialog-rendered-heading,
h6.ai-dialog-rendered-heading {
  font-size: 16px;
}

.ai-dialog-message.service {
  color: var(--ai-dialog-service-color, #496782);
  font-size: inherit;
  line-height: inherit;
  font-style: italic;
  font-weight: 400;
  margin-right: auto;
  max-width: 100%;
}

.ai-dialog-call-separator {
  color: var(--ai-dialog-separator-color, #9fcaff);
  font-weight: 600;
  margin: 1em 0;
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
}

.ai-dialog-table-wrap {
  margin: 6px 0 10px;
  max-width: 100%;
  overflow-x: auto;
}

.ai-dialog-markdown-table {
  border-collapse: collapse;
  color: #1f2d3d;
  font-weight: 400;
  min-width: min(100%, 420px);
  table-layout: fixed;
  width: 100%;
}

.ai-dialog-markdown-table th,
.ai-dialog-markdown-table td {
  background: var(--ai-dialog-table-body-bg, rgb(184, 251, 208));
  border: 1px solid #8bc9a0;
  padding: 4px 6px;
  text-align: left;
  vertical-align: top;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

.ai-dialog-markdown-table th {
  background: var(--ai-dialog-table-header-bg, rgb(107, 243, 156));
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  vertical-align: middle;
  word-break: normal;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.ai-dialog-markdown-table th:first-child,
.ai-dialog-markdown-table td:first-child {
  padding-left: 3px;
  padding-right: 3px;
  text-align: center;
  white-space: nowrap;
  width: 34px;
}

.ai-dialog-markdown-table[data-column-count="8"],
.ai-dialog-markdown-table[data-column-count="9"],
.ai-dialog-markdown-table[data-column-count="10"],
.ai-dialog-markdown-table[data-column-count="11"],
.ai-dialog-markdown-table[data-column-count="12"] {
  font-size: 15px;
}

.ai-dialog-rendered-list {
  color: #1f2d3d;
  list-style: none;
  margin: 6px 0 10px;
  padding-left: 18px;
}

.ai-dialog-rendered-list li {
  line-height: 1.45;
  margin: 4px 0 4px var(--ai-dialog-list-indent, 0px);
}

.ai-dialog-list-marker {
  color: #1f4f8a;
  display: inline-block;
  font-family: "Times New Roman", "Segoe UI Symbol", serif;
  font-weight: 700;
  margin-right: 5px;
  min-width: 18px;
}

.ai-dialog-input-row {
  align-items: stretch;
  box-sizing: border-box;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(360px, 1fr) minmax(650px, 805px);
  margin-top: 8px;
  min-width: 0;
  width: 100%;
}

.ai-dialog-input-wrap {
  background: #fff;
  border: 1px solid #b8dcff;
  border-radius: 4px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  height: 110px;
  padding: 6px;
  position: relative;
}

.ai-dialog-input-wrap textarea {
  background: transparent;
  border: 0;
  color: #0b315f;
  font-family: inherit;
  font-size: 13px;
  height: 100%;
  line-height: 18px;
  outline: none;
  padding: 2px 4px;
  resize: none;
  width: 100%;
  z-index: 1;
}

.ai-dialog-input-placeholder {
  color: #6d7c8b;
  font-size: 13px;
  font-style: italic;
  left: 10px;
  line-height: 18px;
  pointer-events: none;
  position: absolute;
  right: 34px;
  top: 10px;
}

.ai-dialog-input-wrap.has-value .ai-dialog-input-placeholder {
  display: none;
}

.ai-dialog-input-icons {
  align-items: end;
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: space-between;
  z-index: 2;
}

.ai-dialog-icon-button {
  align-items: center;
  background: #fff;
  border-radius: 2px;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 900;
  height: 20px;
  justify-content: center;
  line-height: 18px;
  padding: 0;
  width: 20px;
}

.ai-dialog-icon-button.clear {
  border: 1px solid #f00;
  color: #f00;
}

.ai-dialog-icon-button.clear:hover:not(:disabled) {
  background: #ffe9e9;
}

.ai-dialog-icon-button.export {
  border: 1px solid #16a829;
  color: #16a829;
}

.ai-dialog-icon-button.export:hover:not(:disabled) {
  background: #eaffee;
}

.ai-dialog-icon-button.send {
  border: 1px solid #00c000;
  color: #00c000;
}

.ai-dialog-icon-button.send:hover:not(:disabled) {
  background: #e4ffe8;
}

.ai-dialog-icon-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.ai-dialog-controls {
  align-content: start;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  position: relative;
  width: 100%;
}

.ai-dialog-controls .action-button {
  min-height: 28px;
  padding-left: 10px;
  padding-right: 10px;
}

@media (max-width: 1080px) {
  .ai-dialog-input-row,
  .ai-dialog-fullscreen-main .ai-dialog-input-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-dialog-controls {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }
}

.ai-dialog-split {
  display: grid;
  grid-template-columns: 38px 88px minmax(0, 1fr);
}

.ai-dialog-split .action-button {
  min-width: 0;
}

.ai-dialog-split .action-button:first-child {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
}

.ai-dialog-split .action-button:not(:first-child):not(:last-child) {
  border-left: 0;
  border-radius: 0;
}

.ai-dialog-split .action-button:last-child {
  border-bottom-left-radius: 0;
  border-left: 0;
  border-top-left-radius: 0;
}

.ai-dialog-star-button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.ai-dialog-star-button::before {
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon points='50,6 61.8,36.8 94.8,38.2 69.2,59.1 78.1,90.9 50,73.5 21.9,90.9 30.8,59.1 5.2,38.2 38.2,36.8' fill='%23ffae18' stroke='%236a4300' stroke-width='6' stroke-linejoin='miter'/%3E%3C/svg%3E");
  content: "";
  display: block;
  height: 20px;
  width: 20px;
}

.ai-dialog-star-button:hover {
  background: #fff4c7;
}

.ai-dialog-shelved-control.hidden {
  display: none !important;
}

.ai-dialog-badge-button {
  position: relative;
}

.ai-dialog-dropdown-button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  padding-left: 28px;
  padding-right: 28px;
  position: relative;
}

.ai-dialog-dropdown-arrow {
  align-items: center;
  display: inline-flex;
  font-size: 17px;
  font-weight: 800;
  height: 14px;
  justify-content: center;
  line-height: 14px;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-62%);
  width: 14px;
}

.ai-dialog-dropdown-arrow::before {
  content: "∨";
}

#add-ai-dialog-message-button,
#ai-dialog-fullscreen-send-button {
  justify-self: start;
  min-width: 88px;
  width: 88px;
}

.ai-dialog-settings-button {
  grid-column: 3;
}

.ai-dialog-answer-badge {
  align-items: center;
  background: #d92323;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  height: 18px;
  justify-content: center;
  position: absolute;
  right: -7px;
  top: -7px;
  width: 18px;
}

.ai-dialog-answer-badge.hidden {
  display: none;
}

#project-scenarios-questions-button {
  position: relative;
}

#project-scenarios-questions-button.has-ai-questions {
  border-color: #4a9ce8;
  box-shadow: 0 0 0 1px rgba(74, 156, 232, 0.28);
}

.ai-dialog-settings-button {
  grid-column: 3;
}

.ai-dialog-recent-prompts-panel {
  background: #fff;
  border: 1px solid #9fcaff;
  box-shadow: 0 10px 22px rgba(27, 76, 128, 0.18);
  display: grid;
  gap: 4px;
  left: 0;
  max-height: 260px;
  overflow: auto;
  padding: 6px;
  position: absolute;
  top: 36px;
  width: min(520px, 70vw);
  z-index: 20;
}

.ai-dialog-recent-prompts-panel.hidden {
  display: none;
}

.ai-dialog-recent-prompt {
  background: #f4f9ff;
  border: 1px solid #c4e0ff;
  border-radius: 5px;
  color: #0b315f;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  line-height: 17px;
  padding: 7px;
  text-align: left;
}

.ai-dialog-recent-prompt:hover {
  background: #dceeff;
}

.ai-dialog-recent-prompts-form {
  gap: 6px;
  height: min(420px, 74vh);
  margin: 0;
  max-height: min(420px, 74vh);
  max-width: min(820px, calc(100vw - 48px));
  min-width: min(760px, calc(100vw - 48px));
  padding: 8px;
  width: min(820px, calc(100vw - 48px));
}

#ai-dialog-recent-prompts-dialog {
  border: 1px solid #9fcaff;
  border-radius: 4px;
  box-shadow: 0 10px 24px rgba(27, 76, 128, 0.22);
  margin: 0;
  padding: 0;
  position: fixed;
}

#ai-dialog-recent-prompts-dialog::backdrop,
#ai-dialog-recent-prompt-full-dialog::backdrop {
  background: transparent;
}

.ai-dialog-recent-prompts-form h2,
.ai-dialog-recent-prompt-full-form h2 {
  color: #0b315f;
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
  margin: 0;
}

.ai-dialog-recent-prompts-table-wrap {
  border: 1px solid #c8dbea;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.ai-dialog-recent-prompts-table {
  border-collapse: collapse;
  color: #061c3c;
  font-size: 13px;
  line-height: 17px;
  table-layout: fixed;
  width: 100%;
}

.ai-dialog-recent-prompts-table th,
.ai-dialog-recent-prompts-table td {
  border: 1px solid #d6dce2;
  padding: 3px 4px;
  text-align: left;
  vertical-align: top;
}

.ai-dialog-recent-prompts-table th {
  background: #dceeff;
  font-weight: 700;
  text-align: center;
}

.ai-dialog-recent-prompts-table th:nth-child(1),
.ai-dialog-recent-prompts-table td:nth-child(1) {
  width: 92px;
}

.ai-dialog-recent-prompts-table th:nth-child(3),
.ai-dialog-recent-prompts-table td:nth-child(3) {
  width: 30px;
}

.ai-dialog-recent-prompts-table th:nth-child(4),
.ai-dialog-recent-prompts-table td:nth-child(4) {
  width: 116px;
}

.ai-dialog-recent-prompt-date,
.ai-dialog-recent-prompt-preview {
  overflow-wrap: anywhere;
  white-space: pre-line;
  word-break: normal;
}

.ai-dialog-recent-prompts-table tbody tr:hover {
  background: #eef7ff;
}

.ai-dialog-recent-prompt-star-cell,
.ai-dialog-recent-prompt-open-cell {
  padding: 2px 4px;
}

.ai-dialog-recent-prompt-star-cell {
  padding: 2px;
  text-align: center;
  vertical-align: middle;
}

.ai-dialog-recent-prompt-star-button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  height: 24px !important;
  min-height: 24px !important;
  min-width: 24px !important;
  padding: 0 !important;
  width: 24px !important;
}

.ai-dialog-recent-prompt-star-button::before {
  height: 18px;
  width: 18px;
}

.ai-dialog-recent-prompt-open-button {
  border-radius: 7px;
  min-height: 34px;
  min-width: 0;
  width: 100%;
}

.ai-dialog-recent-prompts-actions {
  display: flex;
  justify-content: flex-end;
}

.ai-dialog-recent-prompts-actions .secondary-button {
  min-width: 120px;
}

.ai-dialog-recent-prompt-full-form .dialog-actions {
  display: flex;
  justify-content: flex-end;
}

.ai-dialog-recent-prompt-full-form .dialog-actions .action-button,
.ai-dialog-recent-prompt-full-form .dialog-actions .secondary-button {
  min-width: 170px;
}

.ai-dialog-recent-prompt-full-form {
  display: grid;
  gap: 0;
  grid-template-rows: 30px auto minmax(0, 1fr) 50px;
  height: 460px;
  margin: 0;
  max-height: min(460px, 86vh);
  max-width: min(620px, 88vw);
  min-width: min(620px, 88vw);
  padding: 0;
  width: min(620px, 88vw);
}

#ai-dialog-recent-prompt-full-dialog {
  background: #eef7ff;
  border: 1px solid #9fcaff;
  border-radius: 0;
  box-shadow: 0 14px 30px rgba(27, 76, 128, 0.22);
  left: 50%;
  margin: 0;
  padding: 0;
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%);
}

#ai-dialog-recent-prompt-full-dialog .ai-dialog-recent-prompt-full-form h2 {
  align-items: center;
  background: #dceeff;
  border-bottom: 1px solid #9fcaff;
  color: #0b315f;
  display: flex;
  font-size: 13px;
  height: 30px;
  line-height: 30px;
  margin: 0;
  padding: 0 12px;
}

#ai-dialog-recent-prompt-full-dialog .ai-dialog-recent-prompt-full-form h2::after {
  color: #0b315f;
  content: "×";
  font-size: 18px;
  font-weight: 400;
  margin-left: auto;
}

.ai-dialog-recent-prompt-full-form label {
  color: #061c3c;
  font-size: 13px;
  padding: 10px 10px 6px;
}

#ai-dialog-recent-prompt-full-text {
  border: 1px solid #b8dcff;
  border-radius: 7px;
  color: #061c3c;
  flex: 1;
  font-family: inherit;
  font-size: 13px;
  line-height: 18px;
  margin: 0 10px;
  min-height: 0;
  padding: 12px;
  resize: none;
}

#ai-dialog-recent-prompt-full-text:focus {
  border-color: #9fcaff;
  outline: none;
}

.ai-dialog-recent-prompt-full-form .dialog-actions {
  align-items: center;
  background: #eef7ff;
  gap: 8px;
  margin: 0;
  padding: 0 10px 10px;
}

.ai-dialog-recent-prompt-full-form .dialog-actions .action-button,
.ai-dialog-recent-prompt-full-form .dialog-actions .secondary-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 14px;
  width: auto;
}

.ai-dialog-recent-prompt-full-form .dialog-actions .action-button {
  min-width: 184px;
}

.ai-dialog-recent-prompt-full-form .dialog-actions .secondary-button {
  min-width: 90px;
}

.ai-dialog-answer-actions-menu {
  background: #edf5ff;
  border: 1px solid #b8d7f6;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  gap: 0;
  left: var(--ai-dialog-answer-actions-menu-left, 0);
  padding: 2px;
  position: absolute;
  top: var(--ai-dialog-answer-actions-menu-top, 112px);
  width: var(--ai-dialog-answer-actions-menu-width, min(360px, 60vw));
  z-index: 20;
}

.ai-dialog-answer-actions-menu.hidden {
  display: none;
}

.ai-dialog-answer-actions-menu button {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #0b315f;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 16px;
  padding: 3px 6px;
  text-align: left;
}

#ai-dialogs-status {
  flex: 0 0 auto;
  line-height: 18px;
  margin: 0;
  min-height: 18px;
  padding: 0 4px;
}

.ai-dialog-answer-actions-menu button:hover {
  background: #c7e4ff;
}

.ai-dialog-questions-form {
  background: #edf5ff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 80vh;
  max-height: 80vh;
  min-height: 80vh;
  width: min(1040px, 96vw);
}

#ai-dialog-questions-dialog h2 {
  display: none;
}

.ai-dialog-questions-list {
  display: grid;
  flex: 1 1 auto;
  gap: 10px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.ai-dialog-question-item {
  border: 1px solid #c8dff6;
  border-radius: 8px;
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 0 10px 10px;
}

.ai-dialog-question-title {
  background: #edf5ff;
  color: #0b315f;
  font-weight: 700;
  justify-self: start;
  margin-left: 8px;
  padding: 0 8px;
  transform: translateY(-1px);
}

.ai-dialog-question-readonly {
  align-items: center;
  background: #fff;
  border: 1px solid #b8dcff;
  border-radius: 8px;
  display: flex;
  min-height: 54px;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 7px 10px;
  white-space: pre-wrap;
}

.ai-dialog-question-item textarea {
  border: 1px solid #b8dcff;
  border-radius: 5px;
  box-sizing: border-box;
  font-family: inherit;
  min-height: 74px;
  min-width: 0;
  padding: 8px;
  resize: vertical;
  width: 100%;
}

.ai-dialog-question-item textarea:focus {
  border-color: #8fc4fb;
  outline: none;
}

.ai-dialog-question-body {
  display: grid;
  gap: 7px;
  grid-template-columns: 74px minmax(0, 1fr) 112px;
}

.ai-dialog-question-body label {
  align-items: center;
  background: #fff;
  border: 1px solid #c8dff6;
  border-radius: 8px;
  color: #27496a;
  display: flex;
  font-weight: 600;
  justify-content: center;
  min-height: 54px;
  padding: 6px;
}

.ai-dialog-question-clear {
  align-self: start;
  min-width: 100px;
}

.ai-dialog-question-options {
  display: grid;
  gap: 6px;
  grid-column: 2 / 4;
}

.ai-dialog-question-options button {
  background: #cfe6ff;
  border-color: #a8cef8;
  color: #143c67;
  font-weight: 600;
  min-height: 30px;
  white-space: normal;
}

.ai-dialog-question-proposal-details {
  grid-column: 2 / 4;
  min-width: 0;
}

.ai-dialog-question-proposal-details summary {
  color: #143c67;
  cursor: pointer;
}

.ai-dialog-questions-notice:empty,
.ai-dialog-questions-nav.hidden {
  display: none;
}

.ai-dialog-questions-notice {
  background: #fff;
  border: 1px solid #c8dff6;
  color: #17436f;
  font-weight: 700;
  margin: 0;
  padding: 2px 4px;
}

.ai-dialog-questions-service-status {
  background: #ffffff;
  border: 1px solid #9fcaff;
  border-left: 4px solid #2f83d4;
  color: #123d70;
  font-weight: 700;
  margin: 0;
  min-height: 20px;
  padding: 5px 8px;
}

.ai-dialog-questions-nav {
  align-items: center;
  display: flex;
  gap: 10px;
}

#ai-dialog-questions-dialog .dialog-actions {
  align-items: center;
  border-top: 1px solid #c8dff6;
  display: grid;
  gap: 8px;
  grid-template-columns: auto 1fr auto auto;
  margin-top: 0;
  padding-top: 8px;
}

#ai-dialog-questions-dialog .dialog-actions button {
  align-self: center;
  box-sizing: border-box;
  min-height: 34px;
  padding: 7px 16px;
}

#terminate-ai-dialog-questions-button {
  grid-column: 1;
  grid-row: 1;
}

#save-ai-dialog-answers-button {
  display: none;
}

#send-ai-dialog-answers-button {
  grid-column: 4;
  grid-row: 1;
}

#ai-dialog-questions-dialog .dialog-actions button[value="cancel"] {
  grid-column: 3;
  grid-row: 1;
}

#ai-dialog-questions-dialog .dialog-actions button:focus {
  outline: none;
}

#ai-dialog-fullscreen-dialog {
  background: #eef6ff;
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  height: 100vh;
  inset: 0;
  margin: 0;
  max-height: 100vh;
  max-width: 100vw;
  overflow: hidden;
  padding: 0;
  position: fixed;
  width: 100vw;
}

#project-scenarios-dialog {
  background: #eef6ff;
  border: 0;
  border-radius: 0;
  box-sizing: border-box;
  height: 100vh;
  inset: 0;
  margin: 0;
  max-height: 100vh;
  max-width: 100vw;
  overflow: hidden;
  padding: 0;
  position: fixed;
  width: 100vw;
}

#project-scenarios-dialog::backdrop {
  background: #eef6ff;
}

#ai-dialog-fullscreen-dialog::backdrop {
  background: #eef6ff;
}

.ai-dialog-fullscreen-form {
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  overflow: hidden;
  padding: 8px 16px 0;
  max-width: 100vw;
  min-width: 0;
  width: 100%;
}

.project-scenarios-form {
  gap: 10px;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.ai-dialog-fullscreen-top-panel {
  box-sizing: border-box;
  grid-template-columns: minmax(0, 7fr) minmax(360px, 5fr);
  margin-bottom: 0;
  min-width: 0;
  width: 100%;
}

.ai-dialog-fullscreen-top-panel .model-select-row {
  align-items: center;
  display: flex;
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400 !important;
  gap: 38px;
  justify-content: end;
  width: 100%;
}

.ai-dialog-fullscreen-top-panel .model-select-row select {
  width: min(420px, 62%);
}

#ai-dialog-fullscreen-clock {
  white-space: pre-line;
}

.ai-dialog-fullscreen-main {
  height: auto;
  min-height: 0;
  min-width: 0;
  margin-top: 0;
  overflow: hidden;
  width: 100%;
}

.project-scenarios-main {
  box-sizing: border-box;
  display: grid;
  gap: 10px;
  grid-template-columns: 285px minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  width: 100%;
}

.project-scenarios-document-title-row {
  align-items: center;
  border: 1px solid #b8dcff;
  box-sizing: border-box;
  color: #003366;
  display: flex;
  gap: 10px;
  min-height: 32px;
  padding: 5px 8px;
}

.project-scenarios-document-title-group {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

.project-scenarios-document-title-group strong {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-scenarios-document-info-button {
  flex: 0 0 auto;
  margin-left: 5mm;
}

.project-scenarios-document-title-row > .action-button {
  flex: 0 0 220px;
  margin-left: auto;
}

.project-scenarios-steps-panel,
.project-scenarios-step-panel {
  background: #f7fbff;
  border: 1px solid #b8dcff;
  box-sizing: border-box;
  min-height: 0;
  overflow: hidden;
}

.project-scenarios-steps-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 8px;
}

.project-scenarios-panel-title {
  border: 1px solid #b8dcff;
  color: #003366;
  font-weight: 700;
  margin-bottom: 8px;
  padding: 6px;
  text-align: center;
}

.project-scenarios-steps-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  overflow: auto;
}

.project-scenario-step-card {
  align-items: start;
  background: #e7f3ff;
  border: 1px solid #9ccfff;
  border-radius: 6px;
  color: #003366;
  cursor: pointer;
  display: grid;
  font-family: "Times New Roman", Times, serif;
  grid-template-columns: 24px minmax(0, 1fr);
  height: auto;
  min-height: 74px;
  overflow: visible;
  padding: 6px 30px 6px 6px;
  position: relative;
  text-align: left;
  width: 100%;
}

.project-scenario-step-card.active {
  background: #cfe9ff;
  border-color: #4f9bd7;
}

.project-scenario-step-status {
  align-items: center;
  display: flex;
  font-size: 18px;
  font-weight: 700;
  justify-content: center;
}

.project-scenario-step-text {
  align-content: start;
  display: grid;
  gap: 3px;
  grid-template-rows: minmax(0, auto) auto auto;
  min-width: 0;
  overflow: visible;
}

.project-scenario-step-text strong {
  display: -webkit-box;
  line-height: 1.08;
  max-height: 2.16em;
  overflow-wrap: anywhere;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.project-scenario-step-text small {
  font-size: 11px;
  line-height: 1.15;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-scenario-step-control {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  height: 20px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: 6px;
  width: 20px;
}

.project-scenario-step-control.delete {
  color: #b00020;
  top: 6px;
}

.project-scenario-step-control.add {
  bottom: 6px;
  color: #148a2e;
}

.project-scenario-step-control:hover,
.project-scenario-step-control:focus {
  background: transparent;
  box-shadow: none;
  outline: none;
  text-decoration: underline;
}

.project-scenarios-step-panel {
  display: grid;
  gap: 8px;
  grid-template-rows: auto auto minmax(92px, 0.22fr) auto minmax(220px, 1fr) auto auto auto;
  padding: 10px;
}

.project-scenarios-step-panel.structure-mode,
.project-scenarios-step-panel.section-mode {
  grid-template-rows: auto auto minmax(360px, 1fr) auto auto auto;
}

.project-scenarios-step-panel.final-mode {
  grid-template-rows: auto auto auto minmax(360px, 1fr) auto auto auto;
}

.project-scenarios-step-header {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 220px;
}

.project-scenarios-step-header h2 {
  color: #003366;
  font-size: 20px;
  margin: 0 0 4px;
}

.project-scenarios-field-label-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.project-scenarios-field-label {
  color: #003366;
  font-weight: 700;
}

.project-scenarios-label-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: end;
  min-width: 0;
}

.project-scenarios-copy-section-button {
  min-height: 30px;
  min-width: 145px;
  padding-left: 12px;
  padding-right: 12px;
}

.project-scenarios-preferences-button {
  min-height: 28px;
  min-width: 250px;
  padding: 4px 10px;
}

.project-scenarios-verify-toggle {
  justify-content: end;
}

.project-scenarios-description,
.project-scenarios-result,
.project-scenarios-input-row textarea {
  border: 1px solid #b8dcff;
  box-sizing: border-box;
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  line-height: 1.35;
  min-width: 0;
  padding: 8px;
  resize: none;
  width: 100%;
}

.project-scenarios-description,
.project-scenarios-result {
  min-height: 0;
}

.project-scenarios-description-wrap {
  box-sizing: border-box;
  display: grid;
  min-height: 0;
  position: relative;
}

.project-scenarios-description-wrap .project-scenarios-description,
.project-scenarios-description-wrap .project-scenarios-rendered-preview {
  grid-area: 1 / 1;
  height: 100%;
  min-height: 0;
}

.project-scenarios-description-wrap .project-scenarios-description {
  padding-right: 58px;
}

.project-scenarios-description-wrap .project-scenarios-rendered-preview {
  padding-right: 58px;
}

.project-scenarios-step-panel.structure-mode .project-scenarios-description-wrap {
  min-height: 360px;
}

.project-scenarios-clear-structure-button {
  background: transparent;
  border: 0;
  color: #d40000;
  cursor: pointer;
  display: none;
  font-family: Arial, sans-serif;
  font-size: 48px;
  font-weight: 400;
  height: 38px;
  line-height: 0.74;
  padding: 0;
  position: absolute;
  right: 28px;
  top: 6px;
  width: 38px;
  z-index: 2;
}

.project-scenarios-step-panel.structure-mode .project-scenarios-clear-structure-button,
.project-scenarios-step-panel.section-mode .project-scenarios-clear-structure-button {
  display: block;
}

#project-scenarios-input::placeholder {
  font-size: 13px;
  font-style: italic;
}

.project-scenarios-description.project-scenarios-structure {
  min-height: 0;
}

.project-scenarios-final-assembly-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.project-scenarios-final-assembly-actions .action-button {
  min-height: 36px;
}

.project-scenarios-rendered-preview {
  background: #fff;
  border: 1px solid #b8dcff;
  box-sizing: border-box;
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  line-height: 1.35;
  min-height: 0;
  overflow: auto;
  padding: 8px;
  width: 100%;
}

.project-scenarios-rendered-preview[contenteditable="true"] {
  cursor: text;
  outline: none;
}

.project-scenarios-rendered-preview[contenteditable="true"]:focus {
  border-color: #4f9bd7;
  box-shadow: inset 0 0 0 1px #4f9bd7;
}

.project-scenarios-rendered-preview > div:not(.ai-dialog-table-wrap):not(.ai-report-callout):not(.ai-report-metrics):not(.ai-report-chart),
.project-scenarios-rendered-preview p {
  display: block;
  margin: 0 0 8px !important;
  text-align: justify !important;
  text-indent: 47px !important;
}

.project-scenarios-rendered-preview > div:last-child {
  margin-bottom: 0;
}

.project-scenarios-rendered-preview .ai-dialog-rendered-heading + div {
  text-indent: 47px;
}

.project-scenarios-rendered-preview .ai-dialog-rendered-list {
  margin-left: 0;
}

.project-scenarios-rendered-preview .ai-dialog-rendered-list li {
  margin-left: var(--ai-dialog-list-indent, 0px);
}

.project-scenarios-rendered-preview .ai-dialog-table-wrap {
  margin: 4px 0 10px;
}

.project-scenarios-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.project-scenarios-step-panel.structure-mode .project-scenarios-actions {
  --project-scenarios-start-action-primary-width: 275px;
  grid-template-columns: var(--project-scenarios-start-action-primary-width) repeat(3, minmax(0, 1fr));
}

.project-scenarios-step-panel.section-mode .project-scenarios-actions {
  --project-scenarios-start-action-primary-width: 275px;
  align-items: stretch;
  grid-template-columns: var(--project-scenarios-start-action-primary-width) repeat(3, minmax(0, 1fr));
  grid-template-rows: minmax(34px, auto);
  overflow: visible;
}

.project-scenarios-actions .action-button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 34px;
}

#project-scenarios-run-step-button {
  flex-direction: column;
  gap: 0;
}

.project-scenarios-step-panel.structure-mode #project-scenarios-run-step-button {
  min-width: 0;
  padding-left: 14px;
  padding-right: 14px;
  width: var(--project-scenarios-start-action-primary-width);
}

.project-scenarios-step-panel.section-mode #project-scenarios-run-step-button {
  grid-column: 1;
  grid-row: 1;
  justify-self: stretch;
  min-width: 0;
  padding-left: 14px;
  padding-right: 14px;
  width: 100%;
}

.project-scenarios-step-panel.section-mode #project-scenarios-questions-button {
  grid-column: 2;
  grid-row: 1;
}

.project-scenarios-step-panel.section-mode #project-scenarios-reset-section-button {
  grid-column: 3;
  grid-row: 1;
}

.project-scenarios-step-panel.section-mode #project-scenarios-export-word-button,
.project-scenarios-step-panel.section-mode #project-scenarios-export-pdf-button {
  grid-column: 4;
  justify-self: stretch;
  width: 100%;
}

.project-scenarios-step-panel.section-mode #project-scenarios-export-word-button {
  grid-row: 1;
}

.project-scenarios-step-panel.section-mode #project-scenarios-export-pdf-button {
  grid-row: 1;
  transform: translateY(calc(100% + 8px));
}

.project-scenarios-step-panel.final-mode #project-scenarios-export-word-button {
  grid-column: 3;
  grid-row: 1;
}

.project-scenarios-step-panel.final-mode #project-scenarios-export-pdf-button {
  grid-column: 4;
  grid-row: 1;
  transform: none;
}

.project-scenarios-action-label {
  display: block;
  line-height: 1.12;
  text-align: center;
  white-space: nowrap;
}

.project-scenarios-file-export-button {
  align-items: center;
  background: #fff;
  border-color: #9ccfff;
  color: #003366;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
}

.project-scenarios-file-export-button::before {
  align-items: center;
  border-radius: 3px;
  color: #fff;
  content: "";
  display: inline-flex;
  flex: 0 0 auto;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  height: 20px;
  justify-content: center;
  line-height: 1;
  width: 18px;
}

.project-scenarios-file-export-button.word::before {
  background: linear-gradient(135deg, #2d72d9 0%, #184a96 100%);
  content: "W";
}

.project-scenarios-file-export-button.pdf::before {
  background: linear-gradient(135deg, #e64040 0%, #a41414 100%);
  content: "PDF";
  font-size: 7px;
}

.project-scenarios-input-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 150px;
}

.project-scenarios-step-panel.structure-mode .project-scenarios-input-row,
.project-scenarios-step-panel.section-mode .project-scenarios-input-row {
  --project-scenarios-start-action-primary-width: 275px;
  grid-template-columns: var(--project-scenarios-start-action-primary-width) repeat(3, minmax(0, 1fr));
}

.project-scenarios-step-panel.structure-mode .project-scenarios-input-row textarea,
.project-scenarios-step-panel.section-mode .project-scenarios-input-row textarea {
  grid-column: 1 / 4;
}

.project-scenarios-step-panel.structure-mode #project-scenarios-send-button,
.project-scenarios-step-panel.section-mode #project-scenarios-send-button {
  align-self: end;
  grid-column: 4;
  justify-self: stretch;
  min-height: 34px;
  width: 100%;
}

.project-scenario-preferences-dialog {
  max-width: min(860px, 96vw);
  width: min(860px, 96vw);
}

.project-scenario-preferences-form {
  gap: 10px;
}

.project-scenario-preferences-form .dialog-help-text,
.project-scenario-preferences-example {
  color: #061c3c;
  display: block;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
  text-align: justify;
  text-indent: 1.25cm;
  word-break: normal;
}

.project-scenario-preferences-form textarea {
  border: 1px solid #9ccfff;
  box-sizing: border-box;
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  line-height: 1.35;
  min-height: 420px;
  padding: 8px;
  resize: vertical;
  width: 100%;
}

.project-scenario-section-library-dialog {
  max-width: min(1120px, 98vw);
  max-height: calc(100vh - 40px);
  overflow: hidden;
  width: min(1120px, 98vw);
}

.project-scenario-section-library-form {
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto auto;
  height: min(800px, calc(100vh - 64px));
  overflow: hidden;
}

.project-scenario-section-library-titlebar {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.project-scenario-section-library-titlebar h3 {
  margin: 0;
}

.project-scenario-section-library-close-icon-button {
  background: transparent;
  border: 0;
  color: #003366;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 26px;
  line-height: 1;
  padding: 0 4px;
}

.project-scenario-section-library-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.project-scenario-section-library-tab {
  background: #e7f3ff;
  border: 1px solid #9ccfff;
  border-bottom-color: #7bbbea;
  border-radius: 7px 7px 0 0;
  color: #003366;
  cursor: pointer;
  flex: 0 0 auto;
  font-family: "Times New Roman", Times, serif;
  font-weight: 700;
  min-height: 32px;
  padding: 5px 12px;
}

.project-scenario-section-library-tab.active {
  background: #cfe7ff;
  border-color: #4f9bd7;
}

.project-scenario-section-library-layout {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 0;
}

.project-scenario-section-library-list-panel,
.project-scenario-section-library-preview {
  border: 1px solid #b8dcff;
  box-sizing: border-box;
  display: grid;
  gap: 8px;
  min-height: 0;
  padding: 8px;
}

.project-scenario-section-library-list-panel {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.project-scenario-section-library-list-header {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.project-scenario-section-library-count {
  color: #3d5268;
  font-size: 13px;
}

.project-scenario-section-library-list {
  align-content: start;
  display: grid;
  gap: 5px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
}

.project-scenario-section-library-item {
  align-items: center;
  background: #e7f3ff;
  border: 1px solid #9ccfff;
  border-radius: 4px;
  color: #003366;
  cursor: pointer;
  display: grid;
  font-family: "Times New Roman", Times, serif;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) 92px;
  min-height: 34px;
  padding: 4px 6px;
  text-align: left;
}

.project-scenario-section-library-item.active {
  background: #cfe9ff;
  border-color: #4f9bd7;
  outline: 1px solid #4f9bd7;
  outline-offset: -2px;
}

.project-scenario-section-library-item.selected {
  background: #d9f2ff;
}

.project-scenario-section-library-check {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 6px;
  grid-template-columns: auto minmax(0, 1fr);
  min-width: 0;
}

.project-scenario-section-library-check span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-scenario-section-library-row-copy {
  background: transparent;
  border: 0;
  color: #003366;
  cursor: pointer;
  font-family: "Times New Roman", Times, serif;
  font-size: 13px;
  padding: 1px 3px;
  text-decoration: underline;
}

.project-scenario-section-library-row-copy:hover {
  color: #005fa3;
}

.project-scenario-section-library-add-button {
  margin-top: 8px;
  width: 100%;
}

.project-scenario-section-library-preview {
  grid-template-rows: auto minmax(0, 1fr);
}

.project-scenario-section-library-preview-header {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto 38px;
}

.project-scenario-section-library-preview-header h4 {
  color: #003366;
  font-size: 18px;
  margin: 0 0 4px;
}

.project-scenario-section-library-preview-header p {
  margin: 0;
}

.project-scenario-section-library-favorite-button {
  background: transparent;
  border: 0;
  color: #d98200;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  min-height: 32px;
}

.project-scenario-section-library-bulk-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
}

.project-scenario-section-library-bulk-actions .action-button {
  flex: 0 0 auto;
  min-height: 30px;
  min-width: 118px;
  padding-left: 10px;
  padding-right: 10px;
}

.project-scenario-section-library-edit-button {
  min-height: 30px;
  min-width: 120px;
}

.project-scenario-section-library-preview-content {
  border: 1px solid #c7dfff;
  box-sizing: border-box;
  line-height: 1.4;
  min-height: 0;
  overflow: auto;
  padding: 10px;
  text-align: justify;
  white-space: pre-wrap;
}

.project-scenario-section-library-preview.editing .project-scenario-section-library-preview-content {
  display: none;
}

.project-scenario-section-library-edit-panel {
  border: 1px solid #c7dfff;
  box-sizing: border-box;
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding: 10px;
}

.project-scenario-section-library-edit-panel.hidden {
  display: none;
}

.project-scenario-section-library-edit-panel label {
  display: grid;
  gap: 4px;
  font-weight: 700;
}

.project-scenario-section-library-edit-panel input,
.project-scenario-section-library-edit-panel textarea {
  border: 1px solid #b8dcff;
  box-sizing: border-box;
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
  width: 100%;
}

.project-scenario-section-library-edit-panel textarea {
  line-height: 1.4;
  min-height: 180px;
  resize: vertical;
}

.project-scenario-section-library-edit-actions {
  grid-template-columns: repeat(2, minmax(120px, 1fr));
}

.project-scenario-section-library-insert-panel {
  align-items: center;
  border: 1px solid #b8dcff;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(130px, 0.7fr) repeat(4, minmax(150px, 1fr));
  padding: 7px;
}

.project-scenario-section-library-mode-button {
  min-height: 34px;
}

.dialog-actions.project-scenario-section-library-actions {
  display: flex;
  justify-content: flex-end;
}

.dialog-actions.project-scenario-section-library-actions .action-button {
  flex: 0 0 auto;
  min-width: 220px;
  width: auto;
}

.project-scenario-document-template-library-dialog {
  max-height: calc(100vh - 40px);
  max-width: min(1120px, 98vw);
  overflow: hidden;
  width: min(1120px, 98vw);
}

.project-scenario-document-template-library-form {
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: min(760px, calc(100vh - 64px));
  overflow: hidden;
}

.project-scenario-document-template-library-layout {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(300px, 0.45fr) minmax(0, 0.55fr);
  min-height: 0;
}

.project-scenario-document-template-list-panel,
.project-scenario-document-template-preview {
  border: 1px solid #b8dcff;
  box-sizing: border-box;
  display: grid;
  gap: 8px;
  min-height: 0;
  padding: 8px;
}

.project-scenario-document-template-list-panel {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.project-scenario-document-template-list {
  align-content: start;
  display: grid;
  gap: 6px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
}

.project-scenario-document-template-item {
  align-items: center;
  background: #e7f3ff;
  border: 1px solid #9ccfff;
  border-radius: 4px;
  color: #003366;
  cursor: pointer;
  display: grid;
  font-family: "Times New Roman", Times, serif;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 92px;
  min-height: 40px;
  padding: 5px 6px;
}

.project-scenario-document-template-item.active {
  background: #cfe9ff;
  border-color: #4f9bd7;
  outline: 1px solid #4f9bd7;
  outline-offset: -2px;
}

.project-scenario-document-template-item span {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-scenario-document-template-row-apply {
  background: transparent;
  border: 0;
  color: #003366;
  cursor: pointer;
  font-family: "Times New Roman", Times, serif;
  font-size: 13px;
  padding: 1px 3px;
  text-decoration: underline;
}

.project-scenario-document-template-preview {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.project-scenario-document-template-preview .project-scenario-section-library-preview-header {
  grid-template-columns: minmax(0, 1fr);
}

.project-scenario-document-template-preview-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.project-scenario-document-template-editor-dialog {
  height: 95vh;
  max-height: 95vh;
  max-width: 95vw;
  width: 95vw;
}

.project-scenario-document-template-editor-form {
  box-sizing: border-box;
  display: grid;
  gap: 10px;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  height: calc(95vh - 28px);
  overflow: hidden;
}

.project-scenario-document-template-editor-form label {
  display: grid;
  gap: 5px;
  font-weight: 700;
}

.project-scenario-document-template-editor-form input,
.project-scenario-document-template-editor-form select,
.project-scenario-document-template-editor-form textarea {
  border: 1px solid #9ccfff;
  box-sizing: border-box;
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  width: 100%;
}

.project-scenario-document-template-editor-form input,
.project-scenario-document-template-editor-form select {
  min-height: 32px;
}

.project-scenario-document-template-structure-label {
  min-height: 0;
}

.project-scenario-document-template-editor-form textarea {
  line-height: 1.4;
  min-height: 0;
  overflow: auto;
  padding: 8px;
  resize: none;
}

.ai-dialog-fullscreen-messages {
  box-sizing: border-box;
  min-height: 0;
  min-width: 0;
  outline: none;
  width: 100%;
}

.ai-dialog-fullscreen-controls {
  align-content: start;
  min-width: 0;
}

.ai-dialog-fullscreen-main .ai-dialog-input-row {
  grid-template-columns: minmax(360px, 1fr) minmax(650px, 805px);
}

.ai-dialog-fullscreen-main .ai-dialog-message {
  box-sizing: border-box;
  min-width: 0;
}

.ai-dialog-fullscreen-main .ai-dialog-message-body {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

#ai-dialog-fullscreen-send-button {
  justify-self: start;
  min-width: 88px;
  width: 88px;
}

.ai-dialog-chat-settings-form {
  width: min(780px, 92vw);
}

.ai-dialog-chat-settings-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.ai-dialog-chat-settings-grid label {
  display: grid;
  font-weight: 700;
  gap: 6px;
}

.ai-dialog-chat-settings-grid input {
  border: 1px solid #b8dcff;
  border-radius: 5px;
  font-family: inherit;
  padding: 7px;
}

#ai-dialog-prompt-master-dialog {
  border: 1px solid #a8b7c5;
  border-radius: 0;
  box-shadow: 0 18px 40px rgba(20, 45, 70, 0.28);
  max-height: calc(100vh - 96px);
  max-width: calc(100vw - 28px);
  padding: 0;
}

#ai-dialog-prompt-master-dialog::backdrop {
  background: rgba(132, 153, 171, 0.45);
}

.ai-dialog-prompt-master-form {
  background: #edf7ff;
  box-sizing: border-box;
  display: grid;
  gap: 8px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: min(794px, calc(100vh - 104px));
  overflow: hidden;
  padding: 10px;
  position: relative;
  width: min(1128px, calc(100vw - 32px));
}

.ai-dialog-prompt-master-title {
  color: #0b315f;
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  padding-right: 42px;
}

.ai-dialog-prompt-master-window-close {
  align-items: center;
  background: transparent;
  border: 1px solid #9fcaff;
  border-radius: 0;
  color: #1f1f1f;
  cursor: pointer;
  display: inline-flex;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 20px;
  font-weight: 400;
  height: 28px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: 0;
  top: 0;
  width: 42px;
}

.ai-dialog-prompt-master-window-close:hover {
  background: #e81123;
  border-color: #e81123;
  color: #ffffff;
}

.ai-dialog-prompt-master-scope-hidden,
.ai-dialog-prompt-master-selectors.hidden,
.ai-dialog-prompt-master-editor-actions.hidden,
.ai-dialog-prompt-master-fragments.hidden,
.ai-dialog-prompt-master-groups.hidden,
.ai-dialog-prompt-master-hidden-button {
  display: none;
}

.ai-dialog-prompt-master-columns {
  display: grid;
  gap: 8px;
  grid-template-columns: 300px 308px minmax(0, 1fr);
  min-height: 0;
}

.ai-dialog-prompt-master-panel,
.ai-dialog-prompt-master-editor-section,
.ai-dialog-prompt-master-side {
  background: #f7fbff;
  border: 1px solid #c8dff6;
  border-radius: 8px;
  box-sizing: border-box;
  min-width: 0;
  padding: 8px;
}

.ai-dialog-prompt-master-panel {
  display: grid;
  gap: 8px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: 100%;
  overflow: hidden;
}

.ai-dialog-prompt-master-panel h3,
.ai-dialog-prompt-master-editor-section h3 {
  background: #ffffff;
  border: 1px solid #c8dff6;
  color: #0b315f;
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  margin: 0 0 6px;
  padding: 0 8px;
  text-align: center;
}

.ai-dialog-prompt-master-list {
  background: #ffffff;
  border: 1px solid #b8dcff;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: scroll !important;
  padding: 4px 8px 4px 4px;
  scrollbar-gutter: stable;
  scrollbar-color: #8f989d #edf7ff;
  scrollbar-width: thin !important;
}

#ai-dialog-prompt-master-group-list,
#ai-dialog-prompt-master-request-list {
  overflow-y: scroll !important;
}

#ai-dialog-prompt-master-group-list::-webkit-scrollbar,
#ai-dialog-prompt-master-request-list::-webkit-scrollbar {
  width: 7px !important;
}

#ai-dialog-prompt-master-group-list::-webkit-scrollbar-track,
#ai-dialog-prompt-master-request-list::-webkit-scrollbar-track {
  background: #f7fbff;
  border-left: 1px solid #e1eef9;
}

#ai-dialog-prompt-master-group-list::-webkit-scrollbar-thumb,
#ai-dialog-prompt-master-request-list::-webkit-scrollbar-thumb {
  background: #8f989d;
  border: 1px solid #f7fbff;
  border-radius: 0;
}

.ai-dialog-prompt-master-list-item {
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: 0;
  color: #0b315f;
  cursor: pointer;
  display: flex;
  gap: 6px;
  font-family: inherit;
  font-size: 13px;
  justify-content: space-between;
  line-height: 18px;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
  padding: 5px 7px;
  text-align: left;
  width: 100%;
}

.ai-dialog-prompt-master-request-title-text {
  min-width: 0;
}

.ai-dialog-prompt-master-param-badge {
  background: #e2f7df;
  border: 1px solid #86c685;
  border-radius: 3px;
  color: #0f681a;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
  padding: 0 4px;
}

.ai-dialog-prompt-master-list-item[draggable="true"] {
  cursor: grab;
}

.ai-dialog-prompt-master-list-item.dragging {
  cursor: grabbing;
  opacity: 0.55;
}

.ai-dialog-prompt-master-list-item.drop-target {
  border-color: #2f6fb0;
  box-shadow: inset 3px 0 0 #2f6fb0, 0 -2px 0 #2f6fb0;
}

.ai-dialog-prompt-master-list-item:hover,
.ai-dialog-prompt-master-list-item.active {
  background: #d9efff;
  border-color: #86bde8;
  box-shadow: inset 3px 0 0 #2f6fb0;
}

.ai-dialog-prompt-master-empty {
  color: #55728a;
  font-size: 13px;
  padding: 8px;
}

.ai-dialog-prompt-master-vertical-actions {
  display: grid;
  gap: 5px;
}

.ai-dialog-prompt-master-group-title {
  background: #e2f7df;
  border: 1px solid #acd7a8;
  color: #0b315f;
  font-size: 13px;
  line-height: 20px;
  overflow: hidden;
  padding: 1px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-dialog-prompt-master-fragment input,
.ai-dialog-prompt-master-fragment textarea {
  background: #ffffff;
  border: 1px solid #b8dcff;
  border-radius: 8px;
  box-sizing: border-box;
  color: #061c3c;
  font-family: inherit;
  font-size: 13px;
  min-width: 0;
  padding: 7px 8px;
  width: 100%;
}

.ai-dialog-prompt-master-editor-section {
  display: grid;
  gap: 8px;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  min-height: 0;
}

.ai-dialog-prompt-master-editor-wrap {
  background: #ffffff;
  border: 1px solid #b8dcff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  min-height: 0;
}

#ai-dialog-prompt-master-buffer {
  border: 0;
  box-sizing: border-box;
  color: #061c3c;
  font-family: inherit;
  font-size: 13px;
  line-height: 18px;
  min-height: 0;
  outline: none;
  padding: 8px;
  resize: none;
  width: 100%;
}

.ai-dialog-prompt-master-one-time-note {
  align-self: end;
  background: #fff8d8;
  border: 1px solid #e8c967;
  box-sizing: border-box;
  color: #5e4500;
  font-size: 12px;
  line-height: 1.25;
  margin: 0;
  padding: 6px 8px;
  width: 100%;
}

.ai-dialog-prompt-master-icons {
  align-items: stretch;
  display: grid;
  grid-template-rows: 28px 1fr 28px;
  justify-items: center;
  padding: 2px;
}

.ai-dialog-prompt-master-icons button {
  background: #ffffff;
  border: 1px solid #9fcaff;
  border-radius: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  height: 26px;
  line-height: 22px;
  padding: 0;
  width: 26px;
}

#ai-dialog-prompt-master-clear-icon {
  color: #ff0000;
}

#ai-dialog-prompt-master-export-icon,
#ai-dialog-prompt-master-apply-icon {
  align-self: end;
  color: #008000;
}

#ai-dialog-prompt-master-export-icon {
  align-self: center;
}

.ai-dialog-prompt-master-side {
  display: grid;
  gap: 8px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
}

.ai-dialog-prompt-master-side-top {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-dialog-prompt-master-fragments {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.ai-dialog-prompt-master-fragment {
  background: #f7fbff;
  border: 1px solid #c8dff6;
  border-radius: 6px;
  display: grid;
  gap: 6px;
  padding: 7px;
}

.ai-dialog-prompt-master-fragment label {
  color: #0b315f;
  display: grid;
  font-weight: 700;
  gap: 4px;
}

.ai-dialog-prompt-master-fragment textarea {
  min-height: 66px;
  resize: vertical;
}

.ai-dialog-prompt-master-side-bottom {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: space-between;
  min-height: 36px;
}

#ai-dialog-prompt-master-dialog .action-button,
#ai-dialog-prompt-master-dialog .secondary-button {
  min-height: 32px;
  white-space: normal;
  width: 100%;
}

#ai-dialog-prompt-master-dialog .ai-dialog-prompt-master-side-bottom .action-button {
  flex: 0 0 auto;
  min-width: max-content;
  padding-left: 18px;
  padding-right: 18px;
  width: auto;
}

#ai-dialog-prompt-master-group-dialog,
#ai-dialog-prompt-master-request-dialog,
#ai-dialog-prompt-master-param-dialog {
  background: #eaf6ff;
  border: 1px solid #8fb6d8;
  border-radius: 0;
  box-shadow: 0 16px 38px rgba(20, 61, 96, 0.26);
  padding: 0;
}

#ai-dialog-prompt-master-request-dialog {
  max-height: calc(100vh - 80px);
  width: min(760px, calc(100vw - 70px));
}

#ai-dialog-prompt-master-param-dialog {
  max-height: calc(100vh - 110px);
  width: min(760px, calc(100vw - 70px));
}

#ai-dialog-prompt-master-request-dialog::backdrop {
  background: rgba(37, 66, 91, 0.42);
}

.ai-dialog-prompt-master-group-form,
.ai-dialog-prompt-master-request-form,
.ai-dialog-prompt-master-param-form {
  background: #eaf6ff;
  box-sizing: border-box;
  gap: 10px;
  min-width: 420px;
  padding: 12px;
}

.ai-dialog-prompt-master-request-form {
  max-height: calc(100vh - 84px);
  min-height: 0;
  min-width: 0;
  overflow: auto;
  width: 100%;
}

.ai-dialog-prompt-master-param-form {
  max-height: calc(100vh - 114px);
  min-width: 0;
  overflow: auto;
  width: 100%;
}

.ai-dialog-prompt-star-form {
  background: transparent;
  box-sizing: border-box;
  display: grid;
  gap: 8px;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
  max-height: calc(100vh - 96px);
  min-width: min(790px, calc(100vw - 48px));
  overflow: hidden;
  padding: 0;
  width: min(790px, calc(100vw - 48px));
}

#ai-dialog-prompt-star-dialog {
  background: #edf7ff;
  border: 1px solid #b8dcff;
  border-radius: 6px;
  overflow: hidden;
  padding: 12px;
}

.ai-dialog-prompt-star-header {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 5fr);
}

.ai-dialog-prompt-star-header h2 {
  color: #0b315f;
  font-size: 18px;
  line-height: 30px;
  margin: 0;
}

.ai-dialog-prompt-star-header .model-select-row {
  align-items: center;
  display: flex;
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400 !important;
  gap: 38px;
  justify-content: flex-end;
  justify-self: end;
  margin: 0;
  width: 100%;
}

.ai-dialog-prompt-star-header .model-select-row select {
  width: min(420px, 62%);
}

.ai-dialog-prompt-star-text-header {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) minmax(170px, auto);
}

.ai-dialog-prompt-star-text-label {
  color: #0b315f;
  display: grid;
  gap: 2px;
  font-weight: 700;
}

.ai-dialog-prompt-star-text-label small {
  color: #33556f;
  font-size: 13px;
  font-style: italic;
  font-weight: 400;
}

.ai-dialog-prompt-star-top-cancel-button {
  justify-self: end;
  min-height: 32px;
  min-width: 170px;
}

.ai-dialog-prompt-star-editor-wrap {
  border-radius: 0;
  min-height: 360px;
}

#ai-dialog-prompt-star-text {
  border: 0;
  box-sizing: border-box;
  color: #061c3c;
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  line-height: 1.35;
  min-height: 0;
  outline: none;
  padding: 8px;
  resize: none;
  width: 100%;
}

#ai-dialog-prompt-star-status {
  color: #33556f;
  margin: 0;
  min-height: 18px;
}

.ai-dialog-prompt-star-clear-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 0;
}

.ai-dialog-prompt-star-clear-row #ai-dialog-prompt-star-clear-button {
  min-height: 32px;
  min-width: 170px;
}

#ai-dialog-prompt-star-clear-icon {
  color: #ff0000;
}

#ai-dialog-prompt-star-export-icon,
#ai-dialog-prompt-star-apply-icon {
  align-self: end;
  color: #008000;
}

.dialog-actions.ai-dialog-prompt-star-actions {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(270px, 1.45fr) minmax(150px, 0.85fr) 170px;
  margin: 0;
  padding: 0;
}

.dialog-actions.ai-dialog-prompt-star-actions #ai-dialog-prompt-star-optimize-button {
  grid-column: 1;
  grid-row: 2;
  margin-right: 0;
  max-width: none;
  min-width: 270px;
}

.dialog-actions.ai-dialog-prompt-star-actions button {
  min-height: 32px;
  width: auto;
}

.dialog-actions.ai-dialog-prompt-star-actions #ai-dialog-prompt-star-apply-button {
  grid-column: 2;
  grid-row: 2;
}

.dialog-actions.ai-dialog-prompt-star-actions #ai-dialog-prompt-star-cancel-button {
  grid-column: 3;
  grid-row: 2;
}

.ai-dialog-prompt-master-group-form h2,
.ai-dialog-prompt-master-request-form h2,
.ai-dialog-prompt-master-param-form h2 {
  color: #0b315f;
  font-size: 14px;
  margin: 0;
}

.ai-dialog-prompt-master-request-form textarea,
.ai-dialog-prompt-master-param-form textarea {
  background: #ffffff;
  border: 1px solid #8fb6d8;
  box-sizing: border-box;
  font-family: inherit;
  width: 100%;
}

.ai-dialog-prompt-master-request-form textarea {
  min-height: 220px;
  resize: vertical;
}

.ai-dialog-prompt-master-param-config {
  background: #f7fbff;
  border: 1px solid #b8dcff;
  border-radius: 6px;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 10px;
}

.ai-dialog-prompt-master-param-config legend {
  color: #0b315f;
  font-weight: 700;
  padding: 0 6px;
}

.ai-dialog-prompt-master-param-section {
  display: grid;
  gap: 8px;
}

.ai-dialog-prompt-master-param-section.hidden,
#ai-dialog-prompt-master-request-directory-row.hidden,
#ai-dialog-prompt-master-param-directory-wrap.hidden {
  display: none;
}

.ai-dialog-prompt-master-param-config .checkbox-row {
  align-items: center;
  background: #ffffff;
  border: 1px solid #c8dff6;
  border-radius: 5px;
  display: flex;
  gap: 8px;
  line-height: 18px;
  padding: 6px 8px;
}

.ai-dialog-prompt-master-param-config .checkbox-row input[type="checkbox"] {
  accent-color: #2485ff;
  flex: 0 0 auto;
  height: 16px;
  margin: 0;
  min-height: 0;
  padding: 0;
  width: 16px;
}

.ai-dialog-prompt-master-param-config .checkbox-row span {
  min-width: 0;
}

.ai-dialog-prompt-master-param-section input,
.ai-dialog-prompt-master-param-section select,
.ai-dialog-prompt-master-param-form select {
  background: #ffffff;
  border: 1px solid #8fb6d8;
  box-sizing: border-box;
  font-family: inherit;
  min-height: 28px;
  padding: 4px 6px;
  width: 100%;
}

.ai-dialog-prompt-master-param-section textarea {
  min-height: 62px;
  resize: vertical;
}

#ai-dialog-prompt-master-param-title {
  overflow-wrap: anywhere;
}

#ai-dialog-prompt-master-param-hint,
#ai-dialog-prompt-master-param-status {
  margin: 0;
}

#ai-dialog-prompt-master-param-directory {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#ai-dialog-prompt-master-param-manual {
  min-height: 96px;
  resize: vertical;
}

.dialog-actions.ai-dialog-prompt-master-group-actions,
.dialog-actions.ai-dialog-prompt-master-request-actions,
.dialog-actions.ai-dialog-prompt-master-param-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
}

.dialog-actions.ai-dialog-prompt-master-group-actions button,
.dialog-actions.ai-dialog-prompt-master-request-actions button,
.dialog-actions.ai-dialog-prompt-master-param-actions button {
  min-height: 30px;
  min-width: 86px;
  white-space: nowrap;
  width: auto;
}

.dialog-actions.ai-dialog-prompt-master-request-actions {
  align-items: center;
}

.dialog-actions.ai-dialog-prompt-master-request-actions #ai-dialog-prompt-master-request-optimize-button {
  margin-right: auto;
  max-width: none;
  min-width: 250px;
}

#ai-dialog-prompt-master-status {
  color: #33556f;
  margin: 0;
  min-height: 18px;
}

.ai-dialog-prompt-master-editor-actions {
  margin: 0;
  padding: 0;
}

#ai-dialog-more-help-dialog {
  background: #edf7ff;
  border: 1px solid #a8b7c5;
  border-radius: 0;
  box-shadow: 0 14px 34px rgba(20, 45, 70, 0.22);
  max-height: calc(100vh - 42px);
  max-width: calc(100vw - 24px);
  padding: 0;
}

#ai-dialog-more-help-dialog::backdrop {
  background: rgba(132, 153, 171, 0.22);
}

.ai-dialog-more-help-form {
  background: #edf7ff;
  box-sizing: border-box;
  display: grid;
  gap: 8px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: min(860px, calc(100vh - 46px));
  overflow: hidden;
  padding: 0 10px 10px;
  width: min(1152px, calc(100vw - 28px));
}

.ai-dialog-more-help-titlebar {
  align-items: center;
  background: #f3f3f3;
  border-bottom: 1px solid #c7c7c7;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 28px;
  min-height: 28px;
}

.ai-dialog-more-help-titlebar h2 {
  color: #1d1d1d;
  font-size: 13px;
  font-weight: 400;
  margin: 0;
}

.ai-dialog-more-help-layout {
  display: grid;
  gap: 8px;
  grid-template-columns: 184px minmax(0, 1fr);
  min-height: 0;
}

.ai-dialog-more-help-left,
.ai-dialog-more-help-main {
  min-height: 0;
  min-width: 0;
}

.ai-dialog-more-help-left {
  display: grid;
  gap: 8px;
  grid-template-rows: auto auto auto minmax(110px, 1fr) auto auto minmax(110px, 1fr) auto;
}

.ai-dialog-more-help-left h3 {
  background: #ffffff;
  border: 1px solid #c8dff6;
  color: #0b315f;
  font-size: 18px;
  font-weight: 700;
  line-height: 22px;
  margin: 0;
  padding: 0 4px;
  text-align: center;
}

.ai-dialog-more-help-left p {
  background: #ffffff;
  border: 1px solid #c8dff6;
  border-radius: 9px;
  color: #4f6f91;
  font-size: 11px;
  line-height: 14px;
  margin: 0;
  padding: 4px;
}

.ai-dialog-help-spheres {
  align-content: start;
  background: #ffffff;
  border: 1px solid #c8dff6;
  display: grid;
  gap: 0;
  grid-auto-rows: min-content;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.ai-dialog-help-sphere {
  background: #ffffff;
  border: 0;
  border-radius: 0;
  box-sizing: border-box;
  color: #061c3c;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  height: 28px;
  line-height: 20px;
  min-height: 28px;
  overflow: hidden;
  padding: 4px 8px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-dialog-help-sphere.active {
  background: #d9efff;
  box-shadow: inset 4px 0 0 #2b8dff;
  font-weight: 400;
  padding-left: 12px;
}

.ai-dialog-more-help-sphere-buttons {
  display: grid;
  gap: 8px;
}

.ai-dialog-more-help-main {
  --ai-help-open-col-width: 136px;
  --ai-help-alignment-pad: 30px;
  --ai-help-row-number-width: 34px;
  --ai-help-table-scroll-pad: 16px;
  display: grid;
  gap: 8px;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
}

.ai-dialog-more-help-prompt-label {
  color: #061c3c;
  display: grid;
  font-weight: 400;
  gap: 4px;
}

.ai-dialog-more-help-prompt-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, calc(100% - var(--ai-help-open-col-width) - var(--ai-help-alignment-pad))) calc(var(--ai-help-open-col-width) + var(--ai-help-alignment-pad) - 8px);
}

#ai-dialog-help-proposal-editor {
  background: #ffffff;
  border: 1px solid #b8dcff;
  border-radius: 8px;
  box-sizing: border-box;
  color: #061c3c;
  font-family: inherit;
  font-size: 13px;
  height: 195px;
  line-height: 18px;
  padding: 8px 10px;
  resize: none;
  width: 100%;
}

#ai-dialog-help-insert-button {
  align-self: center;
  min-height: 34px;
}

#ai-dialog-help-proposal-editor[readonly] {
  background: #ffffff;
}

#ai-dialog-help-proposal-editor:focus,
.ai-dialog-help-modal-form input:focus,
.ai-dialog-help-modal-form select:focus,
.ai-dialog-help-modal-form textarea:focus {
  border-color: #8fc4fb;
  outline: none;
}

.ai-dialog-help-generate-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: calc((100% - var(--ai-help-alignment-pad) + var(--ai-help-row-number-width) - var(--ai-help-open-col-width)) / 2) max-content 74px;
}

.ai-dialog-help-generate-button {
  min-height: 34px;
  width: 100%;
}

.ai-dialog-help-count-label {
  color: #061c3c;
  font-weight: 400;
  white-space: nowrap;
}

#ai-dialog-help-proposal-count {
  background: #ffffff;
  border: 1px solid #b8dcff;
  border-radius: 6px;
  box-sizing: border-box;
  color: #061c3c;
  font-family: inherit;
  font-size: 13px;
  height: 34px;
  padding: 4px 7px;
  width: 74px;
}

.ai-dialog-more-help-table-title {
  background: #ffffff;
  border: 1px solid #c8dff6;
  color: #061c3c;
  line-height: 22px;
  margin: 0;
  padding: 0 4px;
}

.ai-dialog-more-help-meta-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 202px;
}

#ai-dialog-more-help-status {
  background: #ffffff;
  border: 1px solid #c8dff6;
  border-radius: 9px;
  color: #061c3c;
  line-height: 22px;
  margin: 0;
  overflow: hidden;
  padding: 4px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-dialog-more-help-table-wrap {
  background: #ffffff;
  border: 1px solid #c8dff6;
  box-sizing: border-box;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: var(--ai-help-table-scroll-pad);
}

.ai-dialog-more-help-table {
  background: #ffffff;
  border-collapse: separate;
  border-spacing: 0;
  color: #061c3c;
  table-layout: fixed;
  width: 100%;
}

.ai-dialog-more-help-table th,
.ai-dialog-more-help-table td {
  background: #ffffff;
  border: 1px solid #d4e4f4;
  font-size: 13px;
  line-height: 17px;
  padding: 3px 6px;
  vertical-align: top;
}

.ai-dialog-more-help-table tbody tr {
  height: 62px;
}

.ai-dialog-more-help-table th {
  background: #edf7ff;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: center;
}

.ai-dialog-more-help-table th:nth-child(1),
.ai-dialog-more-help-table td:nth-child(1) {
  text-align: center;
  width: var(--ai-help-row-number-width);
}

.ai-dialog-more-help-table th:nth-child(4),
.ai-dialog-more-help-table td:nth-child(4) {
  padding: 0;
  width: var(--ai-help-open-col-width);
}

.ai-dialog-more-help-table td:nth-child(4) {
  position: relative;
}

.ai-dialog-more-help-table td:nth-child(2),
.ai-dialog-more-help-table td:nth-child(3) {
  overflow: hidden;
  white-space: normal;
}

.ai-dialog-help-cell-text {
  display: -webkit-box;
  line-height: 17px;
  max-height: 51px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.ai-dialog-help-open-proposal {
  box-sizing: border-box;
  font-size: 12px;
  height: auto;
  inset: 0;
  line-height: 14px;
  min-height: 0;
  min-width: 0 !important;
  padding: 3px 4px;
  position: absolute;
  width: 100%;
}

.ai-dialog-more-help-actions {
  align-items: center;
  display: grid;
  grid-template-columns: 1fr auto;
  margin: 0;
  padding: 0;
}

.ai-dialog-more-help-actions .action-button {
  justify-self: center;
  min-width: 300px;
}

.ai-dialog-more-help-actions .secondary-button {
  min-width: 156px;
}

.ai-dialog-help-modal-form {
  background: #edf7ff;
  color: #061c3c;
  gap: 10px;
  padding: 0 12px 12px;
}

.ai-dialog-help-modal-form .context-document-titlebar {
  background: #f3f3f3;
  border-bottom: 1px solid #c7c7c7;
  margin: 0 -12px;
  padding: 0 8px;
}

.ai-dialog-help-modal-form label {
  display: grid;
  gap: 6px;
  font-weight: 400;
}

.ai-dialog-help-modal-form input,
.ai-dialog-help-modal-form select,
.ai-dialog-help-modal-form textarea {
  background: #ffffff;
  border: 1px solid #b8dcff;
  border-radius: 7px;
  box-sizing: border-box;
  color: #061c3c;
  font-family: inherit;
  font-size: 13px;
  padding: 7px 8px;
  width: 100%;
}

#ai-dialog-help-sphere-dialog {
  background: #edf7ff;
  border-color: #b8c7d6;
  border-radius: 0;
  box-shadow: 0 14px 34px rgba(0, 31, 67, 0.24);
  min-width: 520px;
  padding: 0;
  width: 520px;
}

.ai-dialog-help-sphere-form {
  gap: 10px;
  min-height: 260px;
  padding: 0 14px 14px;
  width: 100%;
}

.ai-dialog-help-sphere-form .context-document-titlebar {
  margin: 0 -14px;
}

.ai-dialog-help-scope-fieldset {
  display: grid;
  gap: 9px;
}

.ai-dialog-help-scope-caption {
  color: #061c3c;
  font-weight: 400;
  line-height: 18px;
}

.ai-dialog-help-scope-row {
  align-items: center;
  display: flex !important;
  gap: 8px !important;
  margin: 0;
  min-height: 22px;
}

.ai-dialog-help-scope-row input[type="checkbox"] {
  appearance: none;
  background: #ffffff;
  border: 1px solid #4c4c4c;
  border-radius: 0;
  height: 16px;
  margin: 0;
  padding: 0;
  position: relative;
  width: 16px;
  grid-area: box;
  justify-self: center;
}

.ai-dialog-help-scope-row input[type="checkbox"]:checked {
  background: #d7ebff;
  border-color: #2f6fb0;
}

.ai-dialog-help-scope-row input[type="checkbox"]:checked::after {
  border: solid #0067b8;
  border-width: 0 2px 2px 0;
  content: "";
  height: 9px;
  left: 5px;
  position: absolute;
  top: 1px;
  transform: rotate(45deg);
  width: 5px;
}

.ai-dialog-help-scope-title {
  flex: 0 0 auto;
  font-weight: 400;
}

.ai-dialog-help-scope-hint {
  color: #4f6f91;
  flex: 1 1 auto;
  font-size: 12px;
  line-height: 1.25;
  min-width: 0;
}

.ai-dialog-help-sphere-actions {
  justify-content: flex-end;
}

.ai-dialog-help-sphere-actions button {
  min-width: 88px;
  width: auto;
}

#ai-dialog-help-prompt-dialog {
  background: #edf7ff;
  border-color: #b8c7d6;
  border-radius: 0;
  box-shadow: 0 14px 34px rgba(0, 31, 67, 0.24);
  min-width: 760px;
  padding: 0;
  width: min(60vw, 760px);
}

.ai-dialog-help-prompt-form {
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  height: min(60vh, 620px);
  min-height: 500px;
  width: 100%;
  min-width: 760px;
}

.ai-dialog-help-prompt-form textarea {
  border-color: #9fcfff;
  border-radius: 7px;
  line-height: 18px;
  min-height: 0;
  padding: 10px;
  resize: none;
}

.ai-dialog-help-prompt-form > label {
  background: transparent;
  border: 0;
  color: #061c3c;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  font-weight: 700;
  gap: 10px;
  padding: 0;
}

.ai-dialog-help-prompt-form > label > textarea {
  font-weight: 400;
  margin: 0;
  width: 100%;
}

.ai-dialog-help-prompt-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 0;
}

.ai-dialog-help-prompt-actions button {
  justify-self: stretch;
  min-height: 36px;
  min-width: 0;
  width: 100%;
}

.ai-dialog-help-prompt-actions button[value="cancel"] {
  grid-column: 1;
}

.ai-dialog-help-proposal-form {
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: min(590px, 82vh);
  width: min(780px, 94vw);
}

.ai-dialog-help-proposal-form textarea {
  border-radius: 7px;
  line-height: 18px;
  min-height: 0;
  padding: 12px;
  resize: none;
}

.ai-dialog-help-confirm-form {
  width: min(520px, 94vw);
}

.ai-dialog-help-confirm-form p {
  background: #ffffff;
  border: 1px solid #c8dff6;
  border-radius: 7px;
  line-height: 18px;
  margin: 0;
  padding: 10px;
  white-space: pre-wrap;
}

.ai-dialog-help-export-form {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: min(760px, 88vh);
  width: min(1080px, 96vw);
}

.ai-dialog-help-export-preview {
  background: #ffffff;
  border: 1px solid #c8dff6;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.ai-dialog-help-export-preview table {
  border-collapse: collapse;
  width: 100%;
}

.ai-dialog-help-export-preview th,
.ai-dialog-help-export-preview td {
  border: 1px solid #777;
  padding: 5px;
  vertical-align: top;
}

.ai-dialog-help-export-preview th {
  background: #adff9f;
  text-align: center;
}

.ai-dialog-help-export-preview td {
  background: #d8ffd5;
}

.ai-dialog-help-export-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 0;
}

.ai-dialog-help-export-actions::before {
  content: "";
  flex: 1 1 auto;
}

.ai-dialog-help-export-actions #ai-dialog-help-export-copy-button {
  min-width: 312px;
  width: auto;
}

.ai-dialog-help-export-actions #ai-dialog-help-export-pdf-button,
.ai-dialog-help-export-actions #ai-dialog-help-export-word-button {
  min-width: 138px;
  width: auto;
}

.ai-dialog-help-export-actions #ai-dialog-help-export-word-button {
  margin-right: 30px;
}

.ai-dialog-help-export-actions .secondary-button {
  min-width: 158px;
  width: auto;
}

@media print {
  body.printing-ai-help-export > * {
    visibility: hidden !important;
  }

  body.printing-ai-help-export #ai-dialog-help-export-dialog,
  body.printing-ai-help-export #ai-dialog-help-export-dialog * {
    visibility: visible !important;
  }

  body.printing-ai-help-export #ai-dialog-help-export-dialog {
    border: 0 !important;
    box-shadow: none !important;
    inset: 0 !important;
    max-height: none !important;
    max-width: none !important;
    padding: 0 !important;
    position: fixed !important;
  }

  body.printing-ai-help-export .context-document-titlebar,
  body.printing-ai-help-export #ai-dialog-help-export-dialog label,
  body.printing-ai-help-export #ai-dialog-help-export-dialog .dialog-actions {
    display: none !important;
  }

  body.printing-ai-help-export .ai-dialog-help-export-preview {
    border: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }
}

.ai-dialog-new-event-form {
  background: #eef7ff;
  color: #0b2c51;
  width: min(920px, 94vw);
  height: min(760px, 88vh);
  max-height: min(760px, 88vh);
  overflow: hidden;
  padding: 12px;
  gap: 8px;
  grid-template-rows: auto auto auto auto auto minmax(120px, 1fr) auto auto auto auto auto;
}

#ai-dialog-new-event-dialog,
#ai-dialog-new-event-doc-picker-dialog {
  background: #eef7ff;
  border: 1px solid #b8dcff;
  border-radius: 8px;
}

.ai-dialog-new-event-form h2 {
  font-size: 15px;
  margin: 0 0 4px;
}

.ai-dialog-new-event-docs-button {
  justify-self: start;
  min-width: min(430px, 100%);
  width: auto;
}

.ai-dialog-new-event-docs-panel {
  display: grid;
  gap: 4px;
}

.ai-dialog-new-event-docs-list {
  border: 1px solid #b8dcff;
  border-radius: 0;
  background: #f7fbff;
  color: #0b2c51;
  font-weight: 400;
  line-height: 1.25;
  max-height: 52px;
  min-height: 20px;
  overflow: auto;
  padding: 2px 4px;
}

.ai-dialog-new-event-label {
  display: grid;
  font-weight: 700;
  gap: 4px;
}

.ai-dialog-new-event-label textarea {
  background: #ffffff;
  border: 1px solid #b8dcff;
  border-radius: 5px;
  font-family: inherit;
  padding: 8px;
  resize: none;
}

.ai-dialog-new-event-label #ai-dialog-new-event-description {
  height: 96px;
  min-height: 96px;
}

.ai-dialog-new-event-label #ai-dialog-new-event-metadata {
  height: 86px;
  min-height: 86px;
}

.ai-dialog-new-event-label #ai-dialog-new-event-tasks {
  height: 100%;
  min-height: 130px;
}

.secondary-button.ai-dialog-new-event-personal-button {
  justify-self: start;
  max-width: 760px;
  min-width: 560px;
  width: 560px;
}

.ai-dialog-new-event-personal-button.confirmed {
  background: #e8f5e9;
  border-color: #66bb6a;
  color: #1b5e20;
  font-weight: 400;
}

.ai-dialog-new-event-form .dialog-hint {
  margin: 0;
}

.ai-dialog-new-event-form .dialog-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}

.ai-dialog-new-event-form .dialog-actions button {
  min-width: 136px;
}

.ai-dialog-new-event-picker-form {
  background: #eef7ff;
  color: #0b2c51;
  width: min(860px, 92vw);
  height: min(540px, 86vh);
  max-height: min(540px, 86vh);
  overflow: hidden;
  padding: 12px;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.ai-dialog-new-event-picker-form h2 {
  font-size: 15px;
  margin: 0 0 4px;
}

.ai-dialog-new-event-picker-hint {
  background: #f7fbff;
  border: 1px solid #cfe3fa;
  margin: 0;
  padding: 2px 4px;
}

.ai-dialog-new-event-doc-picker-list {
  background: #ffffff;
  border: 1px solid #d4d4d4;
  border-radius: 0;
  min-height: 0;
  overflow: auto;
}

.ai-dialog-new-event-doc-picker-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.ai-dialog-new-event-doc-picker-table th,
.ai-dialog-new-event-doc-picker-table td {
  border: 1px solid #d4d4d4;
  padding: 4px 6px;
  text-align: left;
  vertical-align: middle;
}

.ai-dialog-new-event-doc-picker-table th {
  background: #f0f7ff;
  font-weight: 400;
}

.ai-dialog-new-event-doc-picker-table td {
  background: #ffffff;
}

.ai-dialog-new-event-doc-picker-table th:nth-child(1),
.ai-dialog-new-event-doc-picker-table td:nth-child(1) {
  text-align: center;
  width: 52px;
}

.ai-dialog-new-event-doc-picker-table th:nth-child(2),
.ai-dialog-new-event-doc-picker-table td:nth-child(2) {
  width: auto;
}

.ai-dialog-new-event-doc-picker-table th:nth-child(3),
.ai-dialog-new-event-doc-picker-table td:nth-child(3) {
  width: 170px;
}

.ai-dialog-new-event-doc-picker-table th:nth-child(4),
.ai-dialog-new-event-doc-picker-table td:nth-child(4) {
  width: 78px;
}

.ai-dialog-new-event-doc-picker-table td:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-dialog-new-event-picker-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0;
}

.ai-dialog-new-event-picker-actions button {
  min-width: 120px;
}

#ai-dialog-save-answer-dialog,
#saved-ai-answer-dialog {
  border: 1px solid #9fcaff;
  border-radius: 0;
  box-shadow: 0 14px 38px rgb(0 0 0 / 18%);
  height: min(82vh, 820px);
  max-height: 820px;
  max-width: 1024px;
  padding: 0;
  width: 80vw;
}

#ai-dialog-save-answer-dialog::backdrop,
#ai-dialog-save-answer-fullscreen-dialog::backdrop,
#saved-ai-answer-dialog::backdrop,
#saved-ai-answer-fullscreen-dialog::backdrop {
  background: rgb(20 45 70 / 30%);
}

.ai-dialog-save-answer-form {
  background: #eef6ff;
  box-sizing: border-box;
  gap: 9px;
  grid-template-rows: 24px 58px 110px 36px minmax(190px, 1fr) 36px 22px 40px;
  height: 100%;
  padding: 14px;
}

#saved-ai-answer-dialog.view-mode .saved-ai-answer-form {
  grid-template-rows: 24px 58px 90px 56px minmax(0, 1fr) 22px 40px;
}

.ai-dialog-save-answer-titlebar {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
}

.ai-dialog-save-answer-titlebar span,
.ai-dialog-save-answer-text-row span {
  color: #09233f;
  font-weight: 600;
}

.ai-dialog-save-answer-form .ai-dialog-save-answer-title-label,
.ai-dialog-save-answer-form .ai-dialog-save-answer-metadata-label {
  display: grid;
  gap: 6px;
  font-weight: 400;
  min-height: 0;
}

.ai-dialog-save-answer-form input,
.ai-dialog-save-answer-form textarea {
  background: #fff;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  box-sizing: border-box;
  color: #09233f;
  font: inherit;
  font-weight: 400;
  padding: 8px 10px;
  resize: none;
  width: 100%;
}

.ai-dialog-save-answer-form textarea {
  height: 100%;
  line-height: 1.35;
}

.ai-dialog-save-answer-title-label input {
  height: 32px;
}

.ai-dialog-save-answer-metadata-label textarea {
  min-height: 82px;
}

#ai-dialog-save-answer-content {
  min-height: 190px;
  max-height: 270px;
}

#saved-ai-answer-content {
  background: #fff;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  box-sizing: border-box;
  color: #09233f;
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.42;
  overflow: auto;
  padding: 8px 10px;
  min-height: 190px;
  white-space: normal;
}

#saved-ai-answer-dialog.view-mode #saved-ai-answer-content {
  height: 100%;
  min-height: 0;
}

#saved-ai-answer-content[contenteditable="true"]:empty::before {
  color: #6f86a0;
  content: attr(data-placeholder);
  display: block;
  font-style: italic;
  line-height: 1.35;
  pointer-events: none;
  white-space: pre-wrap;
}

#saved-ai-answer-content:focus,
#saved-ai-answer-fullscreen-content:focus {
  border-color: #79b8ff;
  outline: none;
}

.ai-dialog-save-answer-text-row {
  align-items: center;
  display: flex;
  gap: 10px;
}

.ai-dialog-save-answer-text-row button {
  margin-left: auto;
}

.ai-dialog-save-answer-personal-button {
  justify-self: start;
  min-width: 560px;
  background: #fff8e1;
  border-color: #f9a825;
  color: #5d4037;
}

.ai-dialog-save-answer-personal-button.confirmed {
  background: #e8f5e9;
  border-color: #4caf50;
  color: #1b5e20;
}

.ai-dialog-save-answer-status {
  margin: 0;
}

.ai-dialog-save-answer-actions {
  justify-content: flex-end;
}

.saved-ai-answer-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.saved-ai-answer-actions #saved-ai-answer-add-context-button {
  min-width: 390px;
}

#ai-dialog-save-answer-fullscreen-dialog,
#saved-ai-answer-fullscreen-dialog {
  border: 1px solid #9fcaff;
  height: 92vh;
  max-width: none;
  padding: 0;
  width: 96vw;
}

.ai-dialog-save-answer-fullscreen-form,
.saved-ai-answer-fullscreen-form {
  background: #eef6ff;
  box-sizing: border-box;
  grid-template-rows: minmax(0, 1fr) 42px;
  height: 100%;
  padding: 14px;
}

.ai-dialog-save-answer-fullscreen-form textarea,
.saved-ai-answer-fullscreen-form textarea,
#saved-ai-answer-fullscreen-content {
  background: #fff;
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  box-sizing: border-box;
  color: #061c3c;
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.42;
  overflow: auto;
  padding: 10px;
  resize: none;
}

.ai-dialog-saved-answer-rendered .ai-dialog-table-wrap {
  margin: 8px 0;
  max-width: 100%;
}

.ai-dialog-saved-answer-rendered .ai-dialog-markdown-table {
  font-size: 13px;
}

.ai-dialog-saved-answer-rendered.readonly {
  cursor: default;
}

.ai-dialog-save-answer-fullscreen-actions,
.saved-ai-answer-fullscreen-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  min-width: 0;
}

.saved-ai-answer-fullscreen-actions button {
  flex: 0 1 270px;
  min-width: 220px;
}

.ai-dialog-export-preview-form {
  background: #f1f7ff;
  box-sizing: border-box;
  gap: 8px;
  grid-template-rows: 24px 34px 34px minmax(220px, 1fr) 42px;
  height: min(86vh, 820px);
  max-width: 1080px;
  padding: 12px;
  width: min(86vw, 1080px);
}

.ai-dialog-export-preview-form h2 {
  font-size: 14px;
  margin: 0;
}

.ai-dialog-export-preview-form label {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: max-content minmax(0, 1fr);
  font-weight: 400;
}

.ai-dialog-export-preview-form input,
.ai-dialog-export-preview-form select {
  background: #fff;
  border: 1px solid var(--panel-border);
  border-radius: 7px;
  box-sizing: border-box;
  color: #09233f;
  font: inherit;
  font-weight: 400;
  min-height: 32px;
  padding: 6px 10px;
}

.ai-dialog-export-preview-content {
  background: #fff;
  border: 1px solid var(--panel-border);
  border-radius: 7px;
  box-sizing: border-box;
  color: #09233f;
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  line-height: 1.35;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.ai-dialog-export-preview-content .export-section-title {
  font-weight: 700;
  margin: 10px 0 4px;
}

.ai-dialog-export-preview-content .export-footer {
  margin-top: 14px;
}

.ai-dialog-export-preview-content .service {
  font-size: inherit;
  font-style: italic;
}

.ai-dialog-message.assistant mark,
.ai-dialog-export-preview-content mark {
  background: #fff2a8;
  color: inherit;
  padding: 0 2px;
}

.ai-dialog-inline-code {
  color: #444;
  background: #eef6ff;
  border: 1px solid #c8def5;
  padding: 0 2px;
}

.dialog-actions.ai-dialog-export-preview-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  margin-top: 0;
  min-height: 0;
}

.dialog-actions.ai-dialog-export-preview-actions button {
  flex: 0 0 auto;
  min-height: 34px;
}

.dialog-actions.ai-dialog-export-preview-actions #copy-ai-dialog-export-preview-button {
  min-width: 280px;
}

.dialog-actions.ai-dialog-export-preview-actions #export-ai-dialog-preview-pdf-button,
.dialog-actions.ai-dialog-export-preview-actions #export-ai-dialog-preview-word-button {
  min-width: 144px;
}

.dialog-actions.ai-dialog-export-preview-actions button[value="cancel"] {
  min-width: 158px;
}

.ai-dialog-export-preview-spacer {
  flex: 1 1 38px;
}

.ai-inline-editor {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  font-size: 13px;
}

.ai-inline-editor textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid #9aa7b8;
  padding: 7px;
  font-family: inherit;
}

.billing-right-frame {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.billing-filter-gap {
  height: 20px;
}

.billing-table-panel {
  max-height: calc(100vh - 305px);
  overflow: auto;
  border: 1px solid var(--panel-border);
  background: #fff;
}

.billing-table {
  width: 100%;
  min-width: 1340px;
  border-collapse: collapse;
  background: #fff;
}

.billing-table th,
.billing-table td {
  border: 1px solid var(--grid);
  padding: 7px 8px;
  vertical-align: top;
}

.billing-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6fbff;
  font-weight: 600;
}

.billing-table tbody tr:hover,
.billing-table tbody tr:focus {
  background: #e8f3ff;
}

.billing-table tbody tr.selected {
  background: #cfe7ff;
  outline: 1px solid var(--button-border);
}

.billing-summary-bar {
  margin-top: 10px;
}

.chronology-table th,
.chronology-table td {
  background: #ffffff;
  border: 1px solid var(--grid);
  box-sizing: border-box;
  max-width: 0;
  overflow-wrap: anywhere;
  padding: 4px 5px;
  vertical-align: top;
  word-break: break-word;
}

.chronology-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6fbff;
  font-weight: 700;
  text-align: center;
}

.chronology-table th[data-column-key="rowNumber"],
.chronology-table td[data-column-key="rowNumber"] {
  text-align: center;
  white-space: nowrap;
}

.chronology-table th[data-column-key="date"],
.chronology-table td[data-column-key="date"] {
  overflow-wrap: normal;
  white-space: normal;
  word-break: normal;
}

.chronology-column-header {
  cursor: grab;
  min-width: 50px;
  position: relative;
  user-select: none;
}

.chronology-column-header.dragging {
  opacity: 0.55;
}

.chronology-column-title {
  display: block;
  padding-right: 8px;
}

.chronology-column-resizer {
  bottom: 0;
  cursor: col-resize;
  position: absolute;
  right: -3px;
  top: 0;
  width: 8px;
  z-index: 2;
}

.chronology-column-resizer:hover {
  background: rgba(31, 115, 209, 0.16);
}

.column-resizing {
  cursor: col-resize;
  user-select: none;
}

.chronology-table tbody tr:hover,
.chronology-table tbody tr:focus {
  background: #e8f3ff;
}

.chronology-table tbody tr:hover td,
.chronology-table tbody tr:focus td {
  background: #e8f3ff;
}

.chronology-table tbody tr.selected {
  background: #cfe7ff;
  outline: 1px solid var(--button-border);
}

.chronology-table tbody tr.selected td {
  background: #cfe7ff;
}

.chronology-bottom-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.chronology-bottom-bar .compact-button {
  min-height: 36px;
  padding: 0 14px;
}

.chronology-side-export-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
}

.chronology-side-export-actions .action-button {
  width: 100%;
}

.chronology-spacer {
  flex: 1;
}

.zoom-button {
  width: 30px;
  height: 28px;
  border: 1px solid var(--button-border);
  border-radius: 6px;
  background: var(--button);
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.zoom-value {
  min-width: 56px;
  text-align: right;
}

.project-start-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 12px;
  min-height: calc(100vh - 365px);
}

.project-start-left,
.project-start-right {
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px 14px;
}

.field-label {
  min-height: 20px;
  margin: 0 0 10px;
  border: 1px solid var(--panel-border);
  background: #fff;
  font-weight: 700;
  line-height: 18px;
  padding: 0 4px;
  text-align: center;
}

.description-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  gap: 10px;
}

.description-save-box {
  display: flex;
  align-items: flex-start;
}

.project-start-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.start-analysis-hint {
  margin-top: clamp(56px, 13vh, 150px);
  border: 1px solid #b9d7f4;
  border-radius: 8px;
  background: #ffffff;
  color: #0c3865;
  font-size: 15px;
  line-height: 1.28;
  padding: 12px 14px;
}

.start-analysis-hint strong {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.start-analysis-hint ol {
  margin: 0;
  padding-left: 20px;
}

.start-analysis-hint li {
  margin: 5px 0;
}

.project-start-training-dialog {
  border: 1px solid #a9cff5;
  border-radius: 8px;
  color: #062c55;
  max-height: 92vh;
  padding: 0;
  width: min(1120px, 94vw);
}

.project-start-training-form {
  background: #f7fbff;
  gap: 0;
  max-height: 92vh;
  overflow: hidden;
}

.project-start-training-titlebar {
  align-items: flex-start;
  background: linear-gradient(180deg, #f8fbff, #eaf5ff);
  border-bottom: 1px solid #b9d7f4;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 16px 18px 12px;
}

.project-start-training-titlebar h2 {
  color: #063b6e;
  font-size: 22px;
  margin: 0 0 6px;
}

.project-start-training-titlebar p {
  color: #275779;
  margin: 0;
}

.project-start-training-close-icon-button {
  background: transparent;
  border: 0;
  color: #003b70;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  padding: 0 4px;
}

.project-start-training-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.project-start-training-toc {
  background: #edf6ff;
  border-right: 1px solid #b9d7f4;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}

.project-start-training-toc strong {
  margin-bottom: 4px;
}

.project-start-training-toc a {
  background: #fff;
  border: 1px solid #b9d7f4;
  border-radius: 6px;
  color: #073864;
  padding: 8px 10px;
  text-decoration: none;
}

.project-start-training-toc a:hover {
  background: #dceeff;
}

.project-start-training-content {
  display: grid;
  gap: 16px;
  max-height: calc(92vh - 132px);
  overflow: auto;
  padding: 16px 18px;
}

.project-start-training-section {
  background: #fff;
  border: 1px solid #c9e2fb;
  border-radius: 8px;
  padding: 14px 16px;
}

.project-start-training-section h3 {
  color: #063b6e;
  font-size: 18px;
  margin: 0 0 10px;
}

.project-start-training-section p {
  line-height: 1.45;
  margin: 8px 0;
}

.project-start-training-callout {
  background: #eaf7ec;
  border: 1px solid #b7dfbe;
  border-radius: 7px;
  color: #17451e;
  margin-top: 10px;
  padding: 10px 12px;
}

.project-start-training-list {
  margin: 10px 0 0;
  padding-left: 22px;
}

.project-start-training-list li {
  margin: 6px 0;
}

.project-start-training-visual {
  background: #eef7ff;
  border: 1px solid #b9d7f4;
  border-radius: 10px;
  margin: 14px 0;
  min-height: 245px;
  overflow: hidden;
  padding: 16px;
  position: relative;
}

.project-start-training-visual.real-shot {
  background: #f3f8ff;
  min-height: 0;
}

.project-start-training-visual.full-screen-shot {
  padding: 12px;
}

.project-start-training-visual.compact {
  min-height: 220px;
}

.project-start-training-visual.ai-panel-shot {
  align-items: flex-start;
  display: flex;
  min-height: 420px;
}

.project-start-training-visual.tabs {
  min-height: 190px;
}

.project-start-training-visual.tabs-shot {
  min-height: 230px;
}

.training-real-shot {
  border: 1px solid #9cc8f1;
  border-radius: 7px;
  box-shadow: 0 8px 20px rgba(7, 56, 100, 0.13);
  display: block;
  height: auto;
  max-width: min(760px, 78%);
  width: 760px;
}

.training-real-shot.ai-panel {
  max-width: 300px;
  width: 300px;
}

.training-real-shot.tabs {
  max-width: calc(100% - 190px);
  width: 100%;
}

.training-real-shot.full-screen {
  max-width: 100%;
  width: 100%;
}

.training-browser-frame {
  background: #fff;
  border: 1px solid #9cc8f1;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(7, 56, 100, 0.12);
  overflow: hidden;
  width: min(620px, 72%);
}

.training-browser-title {
  background: #dceeff;
  border-bottom: 1px solid #b9d7f4;
  font-weight: 700;
  padding: 7px 10px;
  text-align: center;
}

.training-start-mock {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 10px;
  padding: 12px;
}

.training-start-left-mock,
.training-start-right-mock,
.training-side-panel-mock {
  background: #f8fbff;
  border: 1px solid #c9e2fb;
  border-radius: 7px;
  padding: 10px;
}

.training-field-caption {
  background: #fff;
  border: 1px solid #c9e2fb;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
}

.training-textarea-mock {
  background: #fff;
  border: 2px solid #3f9cf5;
  min-height: 112px;
  padding: 10px;
}

.training-save-mock,
.training-ai-button-mock {
  background: #cfe8ff;
  border: 1px solid #8fc1f1;
  border-radius: 7px;
  font-weight: 700;
  margin-top: 10px;
  padding: 8px;
  text-align: center;
}

.training-ai-button-mock.wide {
  margin-top: 0;
}

.training-status-mock {
  color: #275779;
  margin: 10px 0;
}

.training-hint-mock {
  background: #fff;
  border: 1px solid #b9d7f4;
  border-radius: 7px;
  line-height: 1.5;
  padding: 10px;
}

.training-arrow {
  background: #fff8d8;
  border: 1px solid #e0bd43;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(74, 52, 0, 0.12);
  color: #3f3000;
  font-weight: 700;
  padding: 7px 12px;
  position: absolute;
}

.training-arrow::before {
  color: #c00000;
  content: "➜";
  font-size: 30px;
  position: absolute;
}

.training-arrow-description {
  right: 18px;
  top: 52%;
}

.training-arrow-description::before {
  left: -40px;
  top: 2px;
  transform: rotate(180deg);
}

.training-arrow-save {
  right: 18px;
  top: 44%;
}

.training-arrow-save::before {
  left: -34px;
  top: -4px;
  transform: rotate(160deg);
}

.training-arrow-ai {
  left: auto;
  right: 18px;
  top: 42%;
}

.training-arrow-ai::before {
  left: -38px;
  top: -2px;
  transform: rotate(180deg);
}

.training-arrow-status {
  left: auto;
  right: 18px;
  top: 47%;
}

.training-arrow-status::before {
  left: -34px;
  top: -3px;
  transform: rotate(160deg);
}

.training-tabs-mock {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-right: 230px;
}

.training-tabs-mock span {
  background: #dceeff;
  border: 1px solid #99c7f3;
  border-radius: 7px 7px 0 0;
  font-weight: 700;
  padding: 8px 10px;
}

.training-tabs-mock span.active {
  background: #fff;
}

.training-result-cards {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-right: 180px;
  margin-top: 18px;
}

.training-result-cards div {
  background: #fff;
  border: 1px solid #b9d7f4;
  border-radius: 8px;
  padding: 10px;
}

.training-result-cards p {
  margin: 6px 0 0;
}

.training-arrow-tabs {
  max-width: 180px;
  right: 22px;
  top: 28%;
}

.training-arrow-tabs::before {
  left: -34px;
  top: 18px;
  transform: rotate(180deg);
}

.project-start-training-mistakes {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-start-training-mistakes div {
  background: #fff9f0;
  border: 1px solid #f0d5aa;
  border-radius: 8px;
  padding: 10px;
}

.project-start-training-mistakes p {
  margin-bottom: 0;
}

.project-start-training-actions {
  background: #f8fbff;
  border-top: 1px solid #b9d7f4;
  justify-content: flex-end;
  padding: 12px 16px;
}

#project-detail-start-description {
  width: 100%;
  border: 1px solid var(--panel-border);
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 6px 8px;
}

#project-detail-start-description {
  min-height: calc(100vh - 476px);
  resize: vertical;
  border-radius: 8px;
}

.actions-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding-top: 12px;
}

.action-button,
.secondary-button {
  background: var(--button);
  border: 1px solid var(--button-border);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 1px 1px rgba(17, 60, 105, 0.12);
  color: #123d70;
  font-weight: 600;
  margin-bottom: 0;
  min-height: 36px;
  min-width: 132px;
  padding: 0 16px;
  transition: background-color 25ms linear, border-color 25ms linear, box-shadow 25ms linear, filter 25ms linear, transform 25ms linear;
  width: auto;
}

.compact-button {
  min-width: 154px;
  width: auto;
}

.secondary-button {
  background: #f8fbff;
}

.action-button:hover,
.secondary-button:hover {
  filter: brightness(0.98);
}

.action-button:active:not(:disabled),
.secondary-button:active:not(:disabled) {
  background: #a9d3f8;
  border-color: #5fa4e4;
  box-shadow: inset 0 2px 4px rgba(20, 72, 122, 0.28);
  filter: brightness(0.96);
  transform: translateY(1px);
}

.dialog-actions.ai-dialog-help-export-actions button:active:not(:disabled) {
  background: #9fcaf0;
  border-color: #4d95d6;
  box-shadow: inset 0 2px 5px rgba(10, 54, 98, 0.32);
}

.action-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.15);
  opacity: 0.55;
}

.danger {
  color: #783030;
}

.status-line,
.muted {
  color: var(--muted);
}

.status-line {
  margin-left: 4px;
}

.task-progress-widget {
  display: grid;
  gap: 5px;
  max-width: 100%;
  width: min(100%, var(--task-progress-widget-width, 100%));
  color: #06335f;
}

.task-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.task-progress-title {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.task-progress-elapsed {
  flex: 0 0 auto;
  color: #446b8d;
  font-size: 0.92em;
  white-space: nowrap;
}

.task-progress-track {
  position: relative;
  display: block;
  height: 9px;
  overflow: hidden;
  border: 1px solid #8ec5ff;
  border-radius: 999px;
  background: #e9f5ff;
}

.task-progress-fill {
  position: relative;
  display: block;
  height: 100%;
  min-width: 8px;
  border-radius: inherit;
  background: linear-gradient(90deg, #4aa3ff, #75d96a);
  transition: width 0.35s ease;
}

.task-progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.52) 45%, transparent 70%);
  animation: task-progress-shimmer 1.35s linear infinite;
}

.task-progress-waiting {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #184d7d;
  font-size: 0.94em;
}

.task-progress-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3abf62;
  box-shadow: 0 0 0 0 rgba(58, 191, 98, 0.45);
  animation: task-progress-pulse 1.25s ease-out infinite;
}

.task-progress-dots::after {
  content: "";
  animation: task-progress-dots 1.2s steps(4, end) infinite;
}

@keyframes task-progress-shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

@keyframes task-progress-pulse {
  0% { box-shadow: 0 0 0 0 rgba(58, 191, 98, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(58, 191, 98, 0); }
  100% { box-shadow: 0 0 0 0 rgba(58, 191, 98, 0); }
}

@keyframes task-progress-dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75%, 100% { content: "..."; }
}

dialog {
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  min-width: 520px;
}

#chronology-event-dialog {
  width: min(70vw, 1120px);
  min-width: 760px;
  height: min(74vh, 780px);
  min-height: 700px;
  background: var(--bg);
  border-color: var(--panel-border);
  padding: 0;
}

#billing-event-dialog {
  width: min(70vw, 1120px);
  min-width: 760px;
  height: min(76vh, 820px);
  min-height: 620px;
}

#delete-chronology-event-dialog {
  width: min(420px, 90vw);
}

#delete-billing-event-dialog {
  width: min(420px, 90vw);
}

#billing-filter-dialog {
  width: min(760px, 92vw);
  min-width: 640px;
}

#final-model-add-dialog {
  background: #eef6ff;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(9, 35, 63, 0.24);
  min-width: 520px;
  padding: 0;
  width: min(48vw, 620px);
}

#special-llm-model-dialog {
  background: #eef6ff;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(9, 35, 63, 0.24);
  min-width: 560px;
  padding: 0;
  width: min(52vw, 700px);
}

#context-element-dialog,
#account-context-document-dialog,
#full-context-dialog {
  width: min(80vw, 1280px);
  min-width: 960px;
  height: min(94vh, 820px);
  min-height: 760px;
}

#context-element-dialog,
#account-context-document-dialog {
  background: #eef6ff;
  border: 1px solid var(--panel-border);
  border-radius: 0;
  height: min(86vh, 860px);
  min-height: 720px;
  min-width: 960px;
  padding: 0;
  width: min(80vw, 1120px);
}

#context-text-fullscreen-dialog {
  background: #eef6ff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  height: 100vh;
  margin: 0;
  max-height: 100vh;
  max-width: 100vw;
  min-height: 0;
  min-width: 0;
  padding: 0;
  width: 100vw;
}

#context-text-fullscreen-dialog::backdrop {
  background: transparent;
}

#context-source-selection-dialog {
  width: min(72vw, 860px);
  min-width: 720px;
  height: min(70vh, 560px);
  min-height: 460px;
}

#context-validation-dialog,
#context-confirmation-dialog {
  background: #eef6ff;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(9, 35, 63, 0.24);
  color: var(--text);
  min-width: 420px;
  padding: 0;
  width: min(44vw, 540px);
}

#full-context-dialog {
  background: #f1f8ff;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(9, 35, 63, 0.26);
  padding: 0;
}

#context-element-dialog,
#account-context-document-dialog {
  width: min(70vw, 1120px);
  min-width: 760px;
  height: min(76vh, 820px);
  min-height: 600px;
}

#context-element-dialog,
#account-context-document-dialog {
  width: min(80vw, 1120px);
  min-width: 960px;
  height: min(98vh, 952px);
  max-height: calc(100vh - 16px);
  min-height: 828px;
  overflow: hidden;
}

#context-element-dialog.context-own-tab-readonly {
  height: min(90vh, 800px);
  max-height: calc(100vh - 32px);
  min-height: 0;
}

#project-edit-dialog {
  box-sizing: border-box;
  height: fit-content;
  max-height: calc(100vh - 40px);
  min-width: min(92vw, 520px);
  min-height: 0;
  overflow: visible;
  padding: 12px 14px;
  width: min(92vw, 600px);
}

dialog::backdrop {
  background: rgba(9, 35, 63, 0.3);
}

body:has(#ai-dialog-fullscreen-dialog[open]) {
  overflow: hidden;
}

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

.final-model-add-form {
  gap: 10px;
  padding: 14px 16px 12px;
}

.final-model-add-form h2 {
  margin: 0 0 4px;
  color: #143f70;
  font-size: 20px;
  text-align: center;
}

.final-model-add-form label {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 190px minmax(0, 1fr);
}

.final-model-add-form select {
  min-height: 34px;
  border: 1px solid #cfe3fa;
  border-radius: 8px;
  background: #fff;
  color: #102f55;
  font: inherit;
  padding: 0 8px;
}

.final-model-dialog-status {
  min-height: 18px;
  margin: 0;
}

.final-model-dialog-actions {
  justify-content: flex-end;
}

.special-llm-dialog-description {
  margin: -2px 0 0;
  color: #315c89;
}

#auth-dialog {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid #abd0f5;
  border-radius: 10px;
  background: #eef6ff;
  color: var(--text);
  padding: 0;
}

.auth-dialog-form {
  gap: 12px;
  padding: 16px;
}

.auth-dialog-titlebar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.auth-dialog-titlebar h2 {
  margin: 0;
  color: #143f70;
  font-size: 22px;
  text-align: center;
}

.auth-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.auth-mode-tab {
  min-height: 34px;
  border: 1px solid var(--button-border);
  border-radius: 8px 8px 0 0;
  background: var(--tab);
  color: var(--text);
  font-family: inherit;
  font-weight: 700;
}

.auth-mode-tab.active {
  background: var(--tab-active);
}

.auth-mode-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #c5def7;
  background: #f7fbff;
}

.auth-mode-panel label {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.auth-mode-panel input {
  min-height: 34px;
  border: 1px solid #b8d7f4;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 6px 10px;
}

.password-field {
  position: relative;
  display: block;
  min-width: 0;
}

.password-field input {
  width: 100%;
  padding-right: 42px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 26px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #143f70;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
  border-color: #abd0f5;
  background: #dcedff;
  outline: none;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.password-toggle .eye-slash {
  display: none;
}

.password-toggle.password-visible .eye-slash {
  display: block;
}

.auth-mode-panel .action-button {
  justify-self: end;
  min-width: 190px;
}

.auth-dialog-status {
  min-height: 36px;
  margin: 0;
  font-weight: 400;
}

.dialog-local-status {
  box-sizing: border-box;
  max-height: 140px;
  min-height: 24px;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  width: 100%;
}

.dialog-local-status:empty {
  min-height: 0;
  padding: 0;
}

.dialog-local-status.pending {
  border-color: #9ec8ff;
  background: #eef7ff;
  color: #064d86;
}

.dialog-local-status.error {
  border-color: #ffb3b3;
  background: #fff2f2;
  color: #9b0000;
  font-weight: 600;
}

.field-error {
  border-color: #e53935 !important;
  background: #fff5f5 !important;
  box-shadow: 0 0 0 2px rgba(229, 57, 53, 0.14);
}

button.field-error {
  color: #8b0000;
}

.chronology-dialog-form {
  background: var(--bg);
  height: 100%;
  gap: 6px;
  grid-template-rows: 31px auto minmax(180px, 1fr) auto minmax(145px, 0.85fr) 36px 22px 45px;
  padding: 0 11px 10px;
}

.chronology-dialog-titlebar {
  align-items: center;
  background: var(--tab);
  display: grid;
  gap: 6px;
  grid-template-columns: 16px minmax(0, 1fr) 34px;
  margin: 0 -11px 7px;
  min-height: 31px;
  padding: 0 4px 0 8px;
}

.chronology-dialog-titlebar h2 {
  font-size: 13px;
  font-weight: 500;
  margin: 0;
}

.dialog-window-icon {
  width: 14px;
  height: 14px;
  border: 1px solid #9ebad8;
  background: linear-gradient(90deg, #8fc4b5 0 45%, #f8fbff 45% 100%);
}

.dialog-window-close {
  width: 28px;
  height: 26px;
  border: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
  font-size: 24px;
  font-weight: 300;
  line-height: 22px;
}

.chronology-dialog-label {
  gap: 3px;
}

.chronology-dialog-comment-label {
  box-sizing: border-box;
  margin-top: 0;
  padding-top: 18px;
}

.chronology-dialog-textarea-label,
.chronology-dialog-comment-label {
  display: grid;
  grid-template-rows: 18px minmax(0, 1fr);
  align-content: stretch;
  gap: 4px;
  height: 100%;
  min-height: 0;
}

.chronology-dialog-label span {
  align-self: start;
  display: inline-block;
  width: fit-content;
  min-width: 170px;
  max-width: 260px;
  height: 18px;
  max-height: 18px;
  min-height: 18px;
  border: 0;
  background: transparent;
  font-weight: 400;
  justify-self: start;
  line-height: 16px;
  overflow: hidden;
  padding: 0;
}

.chronology-dialog-textarea-label span,
.chronology-dialog-comment-label span {
  min-width: 170px;
}

.chronology-dialog-personal-button {
  justify-self: start;
  box-sizing: border-box;
  min-height: 36px;
  width: min(520px, 100%);
  background: #fff8e1;
  border-color: #f9a825;
  color: #5d4037;
}

.chronology-dialog-personal-button.confirmed {
  background: #e8f5e9;
  border-color: #4caf50;
  color: #1b5e20;
}

#chronology-event-dialog-status {
  margin: 0;
  color: #315a84;
  min-height: 20px;
}

.chronology-dialog-actions {
  align-self: end;
  gap: 6px;
}

.chronology-dialog-actions .action-button,
.chronology-dialog-actions .secondary-button {
  min-height: 35px;
}

.billing-dialog-form {
  height: 100%;
  grid-template-rows: auto auto auto minmax(120px, 1fr) auto auto auto minmax(90px, 0.8fr) auto auto;
}

.billing-filter-form {
  grid-template-columns: 180px minmax(0, 1fr);
}

.context-dialog-form {
  height: 100%;
  background: #eef6ff;
  gap: 6px;
  grid-template-rows:
    24px
    34px
    22px
    56px
    126px
    38px
    36px
    36px
    minmax(66px, 1fr)
    22px
    36px
    24px
    36px;
  padding: 14px;
}

.account-context-document-form {
  grid-template-rows: 24px 36px 22px 56px 184px 38px minmax(160px, 1fr) 22px 36px 24px 36px;
}

.context-document-titlebar {
  align-items: center;
  display: grid;
  gap: 7px;
  grid-template-columns: 14px minmax(0, 1fr) 28px;
  min-height: 24px;
}

.context-document-titlebar span {
  color: #09233f;
  font-size: 12px;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-document-file-row,
.context-document-text-row {
  align-items: center;
  display: flex;
  gap: 10px;
}

.context-file-row-spacer,
.context-document-text-row span + button {
  margin-left: auto;
}

.context-document-text-row #context-fullscreen-text-button,
.context-document-text-row #account-context-fullscreen-text-button {
  margin-left: auto;
}

.context-api-inline-refresh {
  background: #0f8f55;
  border-color: #0b7545;
  color: #fff;
}

.context-api-inline-refresh:hover:not(:disabled) {
  background: #0b7545;
}

.context-api-inline-refresh + button {
  margin-left: 0;
}

.context-document-file-row .secondary-button {
  min-height: 34px;
}

.context-dialog-status {
  border: 1px solid var(--panel-border);
  background: #fff;
  color: #235181;
  font-weight: 600;
  line-height: 20px;
  margin: 0;
  min-height: 22px;
  padding: 0 4px;
}

.context-dialog-form input::placeholder,
.context-dialog-form textarea::placeholder {
  color: #687b90;
  font-size: 13px;
  font-weight: 400;
}

.context-document-label {
  display: grid;
  gap: 10px;
  font-weight: 400;
  min-height: 0;
}

.context-document-label-row {
  align-items: center;
  display: flex;
  gap: 10px;
  min-height: 30px;
}

.context-api-inline-refresh {
  margin-left: auto;
  min-height: 30px;
  padding: 4px 18px;
  white-space: nowrap;
  background: #0f8a5f;
  border-color: #0b744f;
  color: #fff;
}

.context-api-inline-refresh.hidden {
  display: none;
}

.context-api-inline-refresh:hover:not(:disabled) {
  background: #0b744f;
}

.context-document-label input,
.context-document-label textarea {
  font-weight: 400;
}

.context-metadata-textarea {
  height: 96px;
  min-height: 96px;
  resize: none;
}

.context-ai-choice-block {
  align-items: center;
  display: grid;
  gap: 0 16px;
  grid-template-columns: auto auto auto minmax(0, 1fr);
  min-height: 0;
}

.context-ai-choice-block p {
  margin: 0;
  white-space: nowrap;
}

.context-ai-choice-block label {
  align-items: center;
  display: flex;
  gap: 8px;
  min-height: 24px;
  white-space: nowrap;
}

.context-ai-choice-block input {
  appearance: none;
  background: #f8fbff;
  border: 1.5px solid #4aa3ec;
  border-radius: 0;
  height: 18px;
  outline: 1px solid rgba(74, 163, 236, 0.28);
  outline-offset: -2px;
  width: 18px;
}

.context-ai-choice-block input:checked {
  background: #d9efff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath d='M4 9.2 7.2 12.4 14 5.6' fill='none' stroke='%230b5cad' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
  border-color: #4aa3ec;
  outline-color: rgba(11, 92, 173, 0.32);
}

.context-document-textarea {
  min-height: 86px;
  resize: none;
}

.context-own-tab-readonly .context-document-label input,
.context-own-tab-readonly .context-document-label textarea,
.context-own-tab-readonly .context-document-textarea {
  background: #f8fbff;
  color: #0b2748;
}

.context-own-tab-readonly .context-dialog-form {
  display: flex;
  flex-direction: column;
  grid-template-rows: none;
}

.context-own-tab-readonly .context-document-label {
  gap: 5px;
  width: 100%;
}

.context-own-tab-readonly .context-document-label:has(#context-element-title) {
  flex: 0 0 58px;
}

.context-own-tab-readonly .context-document-label:has(#context-element-source) {
  flex: 0 0 110px;
}

.context-own-tab-readonly #context-element-title {
  height: 32px;
}

.context-own-tab-readonly #context-element-source {
  height: 82px;
  min-height: 82px;
  resize: none;
}

.context-own-tab-readonly #context-element-content {
  flex: 1 1 145px;
  height: auto;
  min-height: 145px;
  resize: none;
}

.context-own-tab-readonly .context-ai-choice-block,
.context-own-tab-readonly .context-document-text-row,
.context-own-tab-readonly #context-ai-note,
.context-own-tab-readonly #context-symbol-counter,
.context-own-tab-readonly .context-document-actions {
  flex: 0 0 auto;
  width: 100%;
}

.context-own-tab-readonly-note {
  background: #fffdf3;
  border-color: #dfc66c;
  color: #5d4800;
  box-sizing: border-box;
  line-height: 18px;
  min-height: 48px;
  padding: 5px 7px;
  white-space: normal;
}

.dialog-actions.context-document-actions:has(#save-context-element-button.hidden) {
  display: flex;
  justify-content: center;
}

.dialog-actions.context-document-actions:has(#save-context-element-button.hidden) button[value="cancel"] {
  margin-left: 0;
}

.context-personal-data-button {
  justify-self: start;
  min-width: 560px;
  background: #d9efff;
  border-color: #7fb6de;
}

.context-personal-data-button.confirmed {
  background: #e8f5e9;
  border-color: #66bb6a;
  color: #1b5e20;
}

.context-personal-data-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.context-personal-data-controls .context-personal-data-button {
  min-width: 0;
}

.context-personal-data-results-form {
  width: 85vw;
  height: 85vh;
  max-width: 85vw;
  max-height: 85vh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
}

.context-personal-data-table-wrap {
  border: 1px solid #a9cdf2;
  background: #ffffff;
  min-height: 0;
  overflow: auto;
}

.context-personal-data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.context-personal-data-table th,
.context-personal-data-table td {
  border: 1px solid #bcd8f4;
  padding: 6px 8px;
  vertical-align: top;
  word-break: break-word;
}

.context-personal-data-table th {
  background: #dcecff;
  color: #002f63;
  text-align: left;
}

.context-personal-data-table th:nth-child(1) {
  width: 150px;
}

.context-personal-data-table th:nth-child(2) {
  width: 210px;
}

.context-personal-data-table th:nth-child(4) {
  width: 180px;
}

.context-personal-data-table th:nth-child(5) {
  width: 116px;
  text-align: center;
}

.context-personal-data-table td:nth-child(5) {
  text-align: center;
}

.context-personal-data-replacement {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #9ec9f2;
  border-radius: 4px;
  padding: 4px 6px;
  font: inherit;
}

.context-personal-data-decision-buttons {
  display: grid;
  gap: 5px;
  justify-items: stretch;
}

.context-personal-data-decision {
  border: 1px solid #8dbff2;
  border-radius: 4px;
  background: #eef6ff;
  color: #003b79;
  min-height: 26px;
  padding: 3px 6px;
  font: inherit;
  cursor: pointer;
}

.context-personal-data-decision:hover {
  background: #dcecff;
}

.context-personal-data-decision.active[data-finding-decision-button="apply"] {
  background: #dff4e6;
  border-color: #5fb878;
  color: #145c2b;
}

.context-personal-data-decision.active[data-finding-decision-button="reject"] {
  background: #fff0f0;
  border-color: #d46b6b;
  color: #8a1f1f;
}

.context-document-actions {
  display: flex;
  gap: 14px;
  justify-content: flex-start;
  width: 100%;
}

.context-document-actions button[value="cancel"] {
  margin-left: auto;
}

.context-text-fullscreen-form {
  background: #eef6ff;
  height: 100%;
  grid-template-rows: minmax(0, 1fr) auto auto 48px;
  gap: 10px;
  padding: 38px 14px 14px;
}

.context-text-fullscreen-form textarea {
  background: #ffffff;
  border: 1px solid #111111;
  border-radius: 8px;
  color: #0c2749;
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.28;
  min-height: 0;
  outline: none;
  padding: 12px;
  resize: none;
  width: 100%;
}

.context-text-fullscreen-form textarea:focus {
  border-color: #111111;
  outline: none;
}

.context-source-selection-form {
  background: #eef6ff;
  height: 100%;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.context-source-selection-form h2 {
  color: #0a3463;
  font-size: 16px;
  margin: 0;
}

.context-source-selection-table-wrap {
  min-height: 0;
  overflow: auto;
  border: 1px solid #b8d7f4;
  background: #ffffff;
}

.context-source-selection-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.context-source-selection-table th,
.context-source-selection-table td {
  border: 1px solid #d4d4d4;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

.context-source-selection-table th {
  background: #f3f8fb;
  color: #06284d;
  font-weight: 500;
}

.context-source-selection-table th:last-child,
.context-source-selection-table td:last-child {
  width: 150px;
  white-space: nowrap;
}

.context-source-selection-table tbody tr.selected {
  background: #d9efff;
}

.project-edit-form {
  grid-template-columns: 130px minmax(0, 1fr);
}

.project-edit-form h2,
.project-edit-form .dialog-hint,
.project-edit-form .dialog-local-status,
.project-edit-form .project-edit-actions {
  grid-column: 1 / -1;
}

.project-edit-row {
  display: contents;
}

.project-edit-label {
  align-self: center;
  font-weight: 600;
}

.project-edit-name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.project-edit-info-row {
  display: contents;
}

.project-edit-info-row span {
  align-self: center;
  font-weight: 600;
}

.project-edit-info-row strong {
  border: 1px solid #cfe6ff;
  background: #f8fbff;
  min-height: 30px;
  padding: 6px 8px;
}

.editable-field-row {
  display: contents;
}

.editable-field-row input {
  width: 100%;
}

.dialog-hint {
  color: var(--muted);
  line-height: 1.35;
}

.full-context-form {
  background: #f1f8ff;
  height: 100%;
  gap: 10px;
  grid-template-rows: 26px minmax(300px, 1fr) 36px;
  padding: 6px 14px 14px;
}

.full-context-titlebar {
  align-items: center;
  display: grid;
  gap: 7px;
  grid-template-columns: 14px minmax(0, 1fr) 28px;
  min-height: 26px;
}

.full-context-window-icon {
  border: 1px solid #9aaec4;
  height: 12px;
  width: 12px;
  background: linear-gradient(135deg, #eef8ff 0 48%, #6fa2c5 49% 100%);
}

.full-context-titlebar span {
  color: #09233f;
  font-size: 12px;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.full-context-titlebar-close {
  border: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
  font-size: 22px;
  line-height: 22px;
  min-height: 24px;
  padding: 0;
  width: 28px;
}

.full-context-titlebar-close:hover {
  background: var(--tab);
}

.billing-filter-form h2,
.billing-filter-form .status-line,
.billing-filter-form .dialog-actions {
  grid-column: 1 / -1;
}

.dialog-form label {
  display: grid;
  gap: 4px;
  font-weight: 600;
  min-height: 0;
}

.dialog-form .checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dialog-form .checkbox-label input {
  width: 18px;
  height: 18px;
}

.dialog-form .context-ai-choice-block label {
  align-items: center;
  display: flex;
  gap: 8px;
  min-height: 24px;
}

.dialog-form .context-ai-choice-block input {
  flex: 0 0 18px;
  height: 18px;
  width: 18px;
}

.dialog-form input {
  height: 32px;
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  padding: 4px 8px;
  font: inherit;
}

.chronology-dialog-form input {
  background: #fff;
  border-radius: 0;
  font-weight: 400;
  height: 28px;
}

#chronology-event-source {
  height: 96px;
  line-height: 1.35;
  padding-bottom: 10px;
  padding-left: 8px;
  padding-right: 8px;
  padding-top: 10px;
  resize: none;
}

.dialog-form select {
  height: 32px;
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  padding: 4px 8px;
  font: inherit;
  background: #fff;
}

.chronology-dialog-form textarea,
.billing-dialog-form textarea,
.context-dialog-form textarea,
.full-context-form textarea {
  height: 100%;
  min-height: 100px;
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  padding: 6px 8px;
  font: inherit;
  resize: vertical;
}

.context-dialog-form #context-element-title,
.context-dialog-form #context-element-source,
.context-dialog-form #context-element-content,
.context-dialog-form #account-context-document-title,
.context-dialog-form #account-context-document-source,
.context-dialog-form #account-context-document-content {
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400 !important;
}

.full-context-form textarea {
  border-color: var(--panel-border);
  border-radius: 4px;
  resize: none;
  background: #fff;
}

.full-context-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 0;
}

.full-context-actions .secondary-button {
  background: #d4eaff;
  border-color: #93c5f3;
  color: #0f3c6d;
  min-height: 34px;
  min-width: 0;
  padding: 0 14px;
}

.full-context-actions .secondary-button:hover {
  background: #c7e2ff;
}

#copy-full-context-button:active,
.full-context-actions .secondary-button:active {
  filter: brightness(0.94);
  transform: translateY(1px);
}

#copy-full-context-button.copied {
  background: #b8dcff;
  border-color: #6fb2ee;
  color: #0b3b6d;
}

#copy-full-context-button {
  width: 204px;
}

.full-context-actions button[value="cancel"] {
  width: 82px;
}

.chronology-dialog-form textarea {
  align-self: stretch;
  background: #fff;
  border-radius: 8px;
  display: block;
  font-weight: 400;
  height: 100%;
  min-height: 0;
  outline: none;
  resize: none;
}

.chronology-dialog-form textarea:focus,
.chronology-dialog-form input:focus {
  border-color: var(--panel-border);
  outline: none;
}

.billing-dialog-form label:has(textarea),
.context-dialog-form label:has(textarea) {
  height: 100%;
}

.context-dialog-form .context-document-label:has(textarea) {
  height: auto;
}

.context-dialog-form .context-document-label textarea {
  height: auto;
}

.delete-dialog-form p {
  margin: 0;
  color: var(--text);
}

.project-delete-form {
  width: min(92vw, 520px);
}

.danger-text {
  color: #8a1f1f;
  font-weight: 700;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.dialog-actions.full-context-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 0;
}

.dialog-actions.full-context-actions .secondary-button {
  flex: 0 0 auto;
}

.dialog-actions.context-document-actions,
.dialog-actions.context-source-selection-actions,
.dialog-actions.context-fullscreen-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 0;
}

.dialog-actions.context-document-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  justify-content: stretch;
  width: 100%;
}

.dialog-actions.context-document-actions #clear-context-element-button {
  justify-self: start;
}

.dialog-actions.context-document-actions #save-context-element-button {
  justify-self: center;
}

.dialog-actions.context-document-actions button[value="cancel"] {
  justify-self: end;
  margin-left: 0;
}

.dialog-actions.context-document-actions button,
.dialog-actions.account-context-document-actions button,
.dialog-actions.context-source-selection-actions button,
.dialog-actions.context-fullscreen-actions button {
  flex: 0 0 auto;
}

.dialog-actions.account-context-document-actions {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "clear save cancel";
  justify-content: stretch;
  margin-top: 0;
  width: 100%;
}

.dialog-actions.account-context-document-actions button {
  min-width: 0;
  white-space: nowrap;
}

.dialog-actions.account-context-document-actions #clear-account-context-document-button {
  grid-area: clear;
  justify-self: start;
  min-width: 160px;
}

.dialog-actions.account-context-document-actions #save-account-context-document-button {
  grid-area: save;
  justify-self: center;
  min-width: 170px;
}

.dialog-actions.account-context-document-actions button[value="cancel"] {
  grid-area: cancel;
  justify-self: end;
  min-width: 92px;
}

#participant-dialog {
  background: transparent;
  border: 0;
  max-height: 92vh;
  max-width: 92vw;
  padding: 0;
  width: min(620px, 92vw);
}

#participant-dialog::backdrop {
  background: rgba(20, 42, 66, 0.34);
}

.participant-dialog-form {
  background: #eaf5ff;
  border: 1px solid #b8d7f4;
  border-radius: 4px;
  box-shadow: 0 18px 36px rgba(9, 35, 63, 0.18);
  color: #0b2748;
  display: grid;
  gap: 12px;
  grid-template-rows: 24px auto 40px;
  min-height: 0;
  padding: 14px;
}

.participant-fieldset {
  background: #f7fbff;
  border: 1px solid #b8d7f4;
  border-radius: 4px;
  margin: 0;
  padding: 12px 14px 14px;
}

.participant-fieldset legend {
  color: #0a3463;
  font-weight: 700;
  padding: 0 4px;
}

.participant-fields {
  display: grid;
  gap: 0;
}

.participant-fieldset label,
.participant-grid-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 170px minmax(0, 1fr);
  margin-bottom: 10px;
}

.participant-fieldset label:last-child,
.participant-grid-row:last-child {
  margin-bottom: 0;
}

.participant-personal-data-button {
  justify-self: stretch;
  margin-top: 2px;
  min-width: 0;
  width: 100%;
}

.participant-personal-data-note {
  border: 1px solid #b8d7f4;
  color: #0a3463;
  font-size: 13px;
  margin: 2px 0 0;
  padding: 4px 6px;
}

.participant-fieldset input,
.participant-fieldset textarea {
  background: #ffffff;
  border: 1px solid #b8d7f4;
  border-radius: 4px;
  color: #0b2748;
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
  font-weight: 400;
  min-height: 30px;
  padding: 5px 7px;
}

.participant-fieldset textarea {
  resize: vertical;
}

#participant-legal-full-name {
  min-height: 78px;
}

#participant-legal-full-name:required {
  border-color: #7ebbf0;
}

#participant-legal-role {
  min-height: 54px;
}

#ai-dialog-help-sphere-dialog .ai-dialog-help-scope-row input[type="checkbox"] {
  flex: 0 0 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  width: 16px;
}

#ai-dialog-help-sphere-dialog .ai-dialog-help-scope-title {
  flex: 0 0 auto;
}

#ai-dialog-help-sphere-dialog .ai-dialog-help-scope-hint {
  flex: 1 1 auto;
  min-width: 0;
}

#ai-dialog-help-sphere-dialog .ai-dialog-help-sphere-form > label {
  display: grid;
  gap: 6px;
  font-weight: 400;
}

#ai-dialog-help-sphere-dialog .ai-dialog-help-sphere-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
}

#ai-dialog-help-sphere-dialog .ai-dialog-help-sphere-actions button {
  flex: 0 0 auto;
  min-width: 88px;
  width: auto;
}

.participant-dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 0;
}

.participant-dialog-actions button {
  min-width: 120px;
}

.dialog-actions.context-source-selection-actions,
.dialog-actions.context-fullscreen-actions {
  justify-content: flex-end;
}

.dialog-actions.context-fullscreen-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.dialog-actions.context-fullscreen-actions #save-context-fullscreen-text-button,
.dialog-actions.context-fullscreen-actions #close-context-fullscreen-text-button {
  min-height: 34px;
  min-width: 250px;
  padding: 0 14px;
}

.context-text-fullscreen-form .context-personal-data-button {
  justify-self: start;
  min-width: min(560px, 100%);
}

.context-fullscreen-personal-note {
  margin: 0;
}

.context-validation-form {
  background: #eef6ff;
  gap: 14px;
  padding: 14px;
}

.context-validation-titlebar {
  align-items: center;
  color: var(--text);
  display: grid;
  font-weight: 700;
  gap: 8px;
  grid-template-columns: auto 1fr auto;
}

.context-validation-form p {
  background: #ffffff;
  border: 1px solid #b9d9fb;
  line-height: 1.35;
  margin: 0;
  padding: 12px;
}

.dialog-actions.context-validation-actions,
.dialog-actions.context-confirmation-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0;
}

.dialog-actions.context-validation-actions button,
.dialog-actions.context-confirmation-actions button {
  min-width: 110px;
}

.dialog-actions.ai-dialog-recent-prompts-actions,
.ai-dialog-recent-prompt-full-form .dialog-actions {
  display: flex;
  justify-content: flex-end;
}

.dialog-actions.ai-dialog-recent-prompts-actions .secondary-button {
  flex: 0 0 auto;
  min-width: 120px;
  width: auto;
}

.ai-dialog-recent-prompt-full-form .dialog-actions .action-button,
.ai-dialog-recent-prompt-full-form .dialog-actions .secondary-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 14px;
  width: auto;
}

.ai-dialog-recent-prompt-full-form .dialog-actions .action-button {
  min-width: 184px;
}

.ai-dialog-recent-prompt-full-form .dialog-actions .secondary-button {
  min-width: 90px;
}

.billing-filter-actions {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dialog-actions.ai-dialog-help-export-actions {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: flex-start;
  margin-top: 0;
}

.dialog-actions.ai-dialog-help-export-actions::before {
  content: none;
  display: none;
}

.dialog-actions.ai-dialog-help-export-actions button {
  flex: 0 0 auto;
  min-height: 36px;
  width: auto;
}

.dialog-actions.ai-dialog-help-export-actions #ai-dialog-help-export-copy-button {
  min-width: 312px;
}

.dialog-actions.ai-dialog-help-export-actions #ai-dialog-help-export-pdf-button,
.dialog-actions.ai-dialog-help-export-actions #ai-dialog-help-export-word-button {
  min-width: 138px;
}

.dialog-actions.ai-dialog-help-export-actions #ai-dialog-help-export-word-button {
  margin-right: 30px;
}

.dialog-actions.ai-dialog-help-export-actions #ai-dialog-help-export-pdf-button {
  margin-left: auto;
}

.dialog-actions.ai-dialog-help-export-actions .secondary-button {
  min-width: 158px;
}

.dialog-actions.saved-ai-answer-actions,
.dialog-actions.saved-ai-answer-fullscreen-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 0;
}

.dialog-actions.saved-ai-answer-fullscreen-actions button {
  flex: 0 1 270px;
  min-width: 220px;
}

.integrations-settings-group {
  min-height: 520px;
}

.integrations-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
}

.integrations-cards {
  display: grid;
  gap: 14px;
}

.integration-card {
  background: #f7fbff;
  border: 1px solid #add6ff;
  border-radius: 6px;
  padding: 14px;
}

.integration-card-header,
.integration-card-actions {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.integration-card-header h3 {
  margin: 0 0 4px;
}

.integration-card-header p,
.integration-card-message {
  color: #24527d;
  font-size: 13px;
}

.integration-form-grid {
  display: grid;
  gap: 10px 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.integration-form-grid label {
  display: grid;
  gap: 4px;
}

.integration-form-grid input {
  border: 1px solid #9ecfff;
  border-radius: 6px;
  min-height: 30px;
  padding: 4px 8px;
}

.integration-form-grid input[type="checkbox"] {
  height: 16px;
  min-height: 0;
  padding: 0;
  width: 16px;
}

.integration-toggle {
  align-items: center;
  display: flex;
  gap: 7px;
}

.integration-toggle input {
  flex: 0 0 auto;
}

.integration-form-grid .wide,
.integration-modules {
  grid-column: 1 / -1;
}

.integration-modules {
  border: 1px solid #c5def7;
  border-radius: 6px;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 10px;
}

.integration-module-option {
  align-items: center;
  display: flex;
  gap: 6px;
  min-width: 0;
}

.integration-card-actions {
  align-items: center;
  justify-content: flex-start;
  margin-top: 12px;
}

.integration-method-box {
  border-top: 1px solid #c5def7;
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
}

.integration-method-box h4 {
  margin: 0;
}

.integration-method-box select {
  border: 1px solid #9ecfff;
  border-radius: 6px;
  min-height: 32px;
  padding: 4px 8px;
  width: 100%;
}

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

.integration-method-fields label {
  display: grid;
  gap: 4px;
}

.integration-method-result {
  background: #0f172a;
  border-radius: 6px;
  color: #dbeafe;
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
  max-height: 360px;
  overflow: auto;
  padding: 10px;
  white-space: pre-wrap;
}

.integrations-side {
  align-self: start;
  display: grid;
  gap: 10px;
}

.integrations-log-wrap {
  border: 1px solid #c5def7;
  border-radius: 6px;
  max-height: 440px;
  overflow: auto;
}

.integrations-log-table {
  min-width: 620px;
}

@media (max-width: 760px) {
  .app-topbar {
    align-items: stretch;
    flex-direction: column;
    height: auto;
  }

  .top-tabs {
    overflow-x: auto;
  }

  .user-panel {
    align-self: flex-end;
    margin: 6px 0 0;
  }

  .auth-mode-panel label {
    grid-template-columns: 1fr;
  }

  .project-top-panel,
  .project-start-body,
  .description-row {
    grid-template-columns: 1fr;
  }

  .model-select-row {
    align-items: stretch;
    flex-direction: column;
  }

  .model-select-row select {
    width: 100%;
  }

  .project-subtabs {
    gap: 4px;
  }

  .project-subtabs-row {
    flex-wrap: wrap;
  }

  .project-subtab {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }

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

  .project-edit-row,
  .editable-field-row {
    display: grid;
    gap: 4px;
  }

  .actions-bar {
    align-items: stretch;
    flex-direction: column;
  }

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

  .integrations-layout,
  .integration-form-grid,
  .integration-modules,
  .integration-method-fields {
    grid-template-columns: 1fr;
  }
}
.ai-report-icon {
  background-color: var(--report-icon-color, #1f4e79);
  display: inline-block;
  height: 1.15em;
  margin: 0 0.3em 0 0.08em;
  -webkit-mask-image: var(--report-icon-mask);
  mask-image: var(--report-icon-mask);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  vertical-align: -0.2em;
  width: 1.15em;
}

.ai-report-status {
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 8px;
  display: inline-flex;
  font-family: Arial, sans-serif;
  font-size: 0.82em;
  gap: 2px;
  line-height: 1.15;
  margin: 0 2px;
  padding: 2px 7px 3px;
  white-space: nowrap;
}

.ai-report-status .ai-report-icon {
  height: 1em;
  margin-left: 0;
  width: 1em;
}

.ai-report-callout {
  border: 1px solid #1f4e79;
  border-left-width: 5px;
  border-radius: 5px;
  box-sizing: border-box;
  margin: 10px 0;
  padding: 10px 12px;
}

.ai-report-callout-title {
  align-items: center;
  display: flex;
  font-family: Arial, sans-serif;
  font-size: 0.9em;
  font-weight: 700;
  margin-bottom: 3px;
}

.ai-report-metrics {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  margin: 10px 0 14px;
}

.ai-report-metric {
  border: 1px solid #9ccfb0;
  border-radius: 5px;
  box-sizing: border-box;
  min-width: 0;
  padding: 9px 11px;
}

.ai-report-metric-label {
  color: #425466;
  display: block;
  font-family: Arial, sans-serif;
  font-size: 0.78em;
}

.ai-report-metric-value {
  color: #09233f;
  display: block;
  font-size: 1.2em;
  font-weight: 700;
  margin-top: 3px;
}

.ai-report-mini-chart {
  background: #f8fbf9;
  border: 1px solid #b5d9c3;
  border-radius: 5px;
  margin: 10px 0 14px;
  padding: 10px 12px;
}

.ai-report-mini-chart-title {
  font-family: Arial, sans-serif;
  font-weight: 700;
  margin-bottom: 7px;
}

.ai-report-mini-chart-row {
  align-items: center;
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(90px, 28%) 1fr minmax(44px, auto);
  margin: 5px 0;
}

.ai-report-mini-chart-label,
.ai-report-mini-chart-value {
  font-size: 0.82em;
}

.ai-report-mini-chart-track {
  background: #e5eee9;
  height: 12px;
  overflow: hidden;
}

.ai-report-mini-chart-bar {
  background: #39b86b;
  display: block;
  height: 12px;
}

.ai-report-mini-chart-value {
  font-weight: 700;
}

.ai-report-document-header {
  border-bottom: 2px solid #63b783;
  margin-bottom: 16px;
  padding-bottom: 10px;
}

.ai-report-document-kicker {
  color: #1f7a3a;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.ai-report-document-title {
  color: #09233f;
  font-family: Arial, sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin: 4px 0 7px;
}

.ai-report-document-meta {
  color: #425466;
  font-family: Arial, sans-serif;
  font-size: 12px;
}
