:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #20242c;
  --muted: #667085;
  --line: #d9dee7;
  --accent: #116466;
  --accent-dark: #0b4b4d;
  --soft: #e9f3f2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  align-items: center;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  min-height: 64px;
  padding: 0 28px;
}

.brand {
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
}

.topbar nav {
  display: flex;
  gap: 16px;
  margin-right: auto;
}

.topbar nav a {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.topbar form {
  align-items: center;
  display: flex;
  gap: 10px;
}

main {
  margin: 0 auto;
  max-width: 1480px;
  padding: 28px;
}

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

h1 {
  font-size: 32px;
}

h2 {
  font-size: 20px;
  margin-bottom: 14px;
}

p {
  color: var(--muted);
  margin: 6px 0 0;
}

button, .link-button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  padding: 10px 14px;
}

.secondary {
  margin-top: 12px;
}

.small {
  min-height: 36px;
  padding: 8px 11px;
}

.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  font-weight: 700;
}

.auth-button {
  display: block;
  text-align: center;
}

.dev-login {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}

.icon-button {
  height: 36px;
  padding: 0;
  width: 36px;
}

.login-shell {
  display: grid;
  min-height: calc(100vh - 120px);
  place-items: center;
}

.login-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  max-width: 440px;
  padding: 28px;
  width: 100%;
}

.stack {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.page-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 22px;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

input, select, textarea {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-height: 42px;
  padding: 9px 11px;
  width: 100%;
}

textarea {
  line-height: 1.45;
  min-height: 160px;
  resize: vertical;
}

.filters {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(210px, auto) minmax(220px, 1.4fr) repeat(2, minmax(160px, 1fr));
  margin-bottom: 18px;
}

.projects-filters {
  column-gap: 16px;
  grid-template-columns: minmax(280px, 1.1fr) minmax(320px, 1.5fr) repeat(2, minmax(220px, 1fr));
  margin-bottom: 22px;
}

.filter-group {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

.filter-group-view {
  min-width: 0;
}

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

.filter-field-search {
  min-width: 0;
}

.filter-toggle {
  align-items: center;
  align-self: start;
  color: var(--ink);
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  margin-top: 4px;
  min-height: auto;
}

.filter-toggle input {
  margin: 0;
  min-height: auto;
  width: auto;
}

.segmented-control {
  background: #eef2f4;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 42px;
  overflow: hidden;
  width: 100%;
}

.segmented-control button {
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 12px;
  white-space: nowrap;
}

.segmented-control button.is-active {
  background: var(--panel);
  color: var(--accent-dark);
  box-shadow: inset 0 0 0 1px var(--accent);
}

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

table {
  border-collapse: collapse;
  min-width: 980px;
  width: 100%;
}

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

th {
  background: #f0f3f6;
  color: #384150;
  font-size: 12px;
  text-transform: uppercase;
}

.favorite-column {
  width: 56px;
}

.edit-column {
  width: 56px;
}

.traffic-cell {
  width: 58px;
}

.pm-column,
.pm-cell {
  width: 92px;
}

.files-column,
.files-cell {
  width: 152px;
}

.miro-column,
.miro-cell {
  width: 86px;
}

.jira-cell {
  text-align: center;
}

.sort-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: inherit;
  display: inline-flex;
  font-size: inherit;
  font-weight: 800;
  gap: 5px;
  min-height: auto;
  padding: 0;
  text-align: left;
  text-transform: inherit;
  white-space: nowrap;
}

.sort-button::after {
  color: var(--muted);
  content: "↕";
  font-size: 11px;
}

.sort-button.is-asc::after {
  content: "↑";
}

.sort-button.is-desc::after {
  content: "↓";
}

.column-filter {
  font-size: 12px;
  font-weight: 800;
  min-height: 30px;
  min-width: 120px;
  padding: 4px 26px 4px 8px;
  text-transform: none;
}

.inline-select {
  background-color: white;
  font-size: 12px;
  font-weight: 800;
  min-height: 34px;
  min-width: 96px;
  padding: 6px 28px 6px 9px;
  transition: border-color 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.manager-select {
  min-width: 88px;
  padding-right: 24px;
}

.manager-select.is-alert {
  background: #fde9e9;
  border-color: #e6a8a8;
  color: #a32020;
}

.inline-select.is-saving {
  opacity: 0.55;
}

.inline-select.is-error {
  border-color: #d83b3b;
  box-shadow: 0 0 0 2px rgb(216 59 59 / 13%);
}

.chip, .pill-link {
  background: var(--soft);
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  margin: 0 4px 4px 0;
  padding: 4px 8px;
}

.chip-alert {
  background: #fde9e9;
  color: #a32020;
}

.meta-inline {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-top: 3px;
}

.traffic-light {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  min-width: 108px;
}

.traffic-picker {
  border-radius: 6px;
  display: inline-block;
  padding: 2px;
  position: relative;
}

.traffic-picker-compact {
  padding: 0;
}

.traffic-picker.is-saving {
  opacity: 0.55;
}

.traffic-picker.is-error {
  box-shadow: 0 0 0 2px rgb(216 59 59 / 18%);
}

.traffic-native-select {
  cursor: pointer;
  inset: 0;
  min-height: auto;
  opacity: 0;
  padding: 0;
  position: absolute;
  width: 100%;
}

.traffic-stack {
  background: #28313d;
  border: 1px solid #151b23;
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgb(255 255 255 / 12%), 0 1px 2px rgb(0 0 0 / 12%);
  display: inline-flex;
  flex: 0 0 auto;
  gap: 4px;
  padding: 4px;
}

.traffic-light-compact {
  min-width: 0;
}

.traffic-stack-vertical {
  border-radius: 16px;
  flex-direction: column;
  gap: 3px;
  padding: 5px 4px;
}

.traffic-dot {
  background: #5a6270;
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 28%);
  display: block;
  height: 12px;
  opacity: 0.42;
  width: 12px;
}

.traffic-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.traffic-red .traffic-dot.red {
  background: #d83b3b;
  box-shadow: 0 0 0 2px rgb(216 59 59 / 16%), 0 0 10px rgb(216 59 59 / 55%);
  opacity: 1;
}

.traffic-yellow .traffic-dot.yellow {
  background: #f3bd21;
  box-shadow: 0 0 0 2px rgb(243 189 33 / 18%), 0 0 10px rgb(243 189 33 / 58%);
  opacity: 1;
}

.traffic-green .traffic-dot.green {
  background: #28a35a;
  box-shadow: 0 0 0 2px rgb(40 163 90 / 16%), 0 0 10px rgb(40 163 90 / 52%);
  opacity: 1;
}

.traffic-red .traffic-label {
  color: #9f1d1d;
}

.traffic-yellow .traffic-label {
  color: #765200;
}

.traffic-green .traffic-label {
  color: #176235;
}

.pill-link {
  background: #eef2ff;
  color: #243b7a;
}

.files-cell .pill-link {
  display: inline-block;
  max-width: 118px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
  white-space: nowrap;
}

.vkc-pill {
  max-width: 168px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
  white-space: nowrap;
}

.project-title-line {
  align-items: center;
  display: flex;
  gap: 8px;
}

.favorite-cell {
  text-align: center;
  vertical-align: middle;
  width: 56px;
}

.edit-cell {
  text-align: center;
  vertical-align: middle;
  width: 56px;
}

.icon-link {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent-dark);
  display: inline-flex;
  font-size: 17px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  line-height: 1;
  width: 34px;
}

.favorite-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #b7bfca;
  display: inline-flex;
  flex: 0 0 36px;
  font-size: 18px;
  font-weight: 800;
  height: 36px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 36px;
}

.favorite-toggle span {
  display: block;
  transform: translateY(-1px);
}

.favorite-toggle.is-favorite {
  color: #d4a017;
}

.favorite-toggle.is-error {
  border-color: #f2b8b8;
  color: #9f1d1d;
}

.icon-link:hover {
  background: var(--soft);
  text-decoration: none;
}

.jira-icon-link {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #1868db;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
  width: 32px;
}

.jira-icon-link svg {
  display: block;
  fill: currentColor;
  height: 18px;
  width: 18px;
}

.jira-icon-link:hover {
  background: #eef5ff;
  border-color: #c6d9fb;
  box-shadow: 0 4px 10px rgb(24 104 219 / 10%);
  text-decoration: none;
  transform: translateY(-1px);
}

.vkc-icon-link {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #2ca56f;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
  width: 32px;
}

.vkc-icon-link svg {
  display: block;
  fill: currentColor;
  height: 18px;
  width: 18px;
}

.vkc-icon-link:hover {
  background: #eef9f3;
  border-color: #b7e2cb;
  box-shadow: 0 4px 10px rgb(44 165 111 / 12%);
  text-decoration: none;
  transform: translateY(-1px);
}

.miro-cell {
  text-align: center;
}

.miro-icon-link {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #516bff;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  margin: 0 4px 4px 0;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
  width: 32px;
}

.miro-icon-link svg {
  display: block;
  fill: currentColor;
  height: 18px;
  width: 18px;
}

.miro-icon-link:hover {
  background: #eef2ff;
  border-color: #c9d3ff;
  box-shadow: 0 4px 10px rgb(81 107 255 / 12%);
  text-decoration: none;
  transform: translateY(-1px);
}

.has-note {
  cursor: help;
}

.note-tooltip {
  background: #20242c;
  border-radius: 6px;
  box-shadow: 0 8px 22px rgb(0 0 0 / 18%);
  color: white;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  max-width: 320px;
  min-width: 180px;
  padding: 8px 10px;
  pointer-events: none;
  position: absolute;
  white-space: pre-line;
  z-index: 1000;
}

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

.form-grid {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  padding: 22px;
}

.autosave-status {
  color: var(--muted);
  font-size: 12px;
  min-height: 18px;
  text-align: right;
}

.autosave-status.is-saving {
  color: #765200;
}

.autosave-status.is-saved {
  color: #176235;
}

.autosave-status.is-error {
  color: #9f1d1d;
}

.project-meta {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

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

fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 16px;
}

legend {
  color: #384150;
  font-weight: 800;
  padding: 0 8px;
}

.checkbox-grid {
  display: grid;
  gap: 8px 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.checkline {
  align-items: center;
  color: var(--ink);
  display: flex;
  flex-direction: row;
  font-weight: 500;
  gap: 8px;
}

.checkline input {
  min-height: auto;
  width: auto;
}

.project-archive-toggle {
  font-size: 14px;
  font-weight: 700;
}

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

.link-row {
  display: grid;
  gap: 10px;
  grid-template-columns: 180px 1fr 1fr;
}

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

.admin-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
}

.settings-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  max-width: 520px;
  padding: 22px;
}

.admin-grid > .notice {
  grid-column: 1 / -1;
}

.admin-grid section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.admin-actions {
  display: grid;
  gap: 12px;
}

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

.import-form input[type="file"] {
  grid-column: 1 / -1;
  min-width: 0;
  width: 100%;
}

.import-form select {
  min-width: 0;
}

.team-admin-section {
  grid-column: 1 / -1;
}

.inline-form {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(120px, 180px) 1fr auto;
  margin-bottom: 14px;
}

.list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.list li {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-top: 8px;
}

.list span {
  color: var(--muted);
  font-size: 12px;
  order: 2;
}

.user-list-item {
  align-items: flex-start !important;
}

.user-list-main {
  display: grid;
  gap: 4px;
}

.user-list-meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-list-meta span {
  order: 0;
}

.online-badge {
  background: #e8f5ea;
  border: 1px solid #b8dfc4;
  border-radius: 999px;
  color: #176235 !important;
  display: inline-flex;
  font-weight: 800;
  padding: 3px 8px;
}

.member-admin-list, .status-admin-list {
  display: grid;
  gap: 4px;
}

.member-admin-row, .status-admin-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-top: 6px;
}

.member-admin-row.is-inactive, .status-admin-row.is-inactive {
  opacity: 0.68;
}

.member-edit-form, .status-edit-form {
  align-items: center;
  display: grid;
  flex: 1;
  gap: 8px;
  grid-template-columns: minmax(100px, 0.8fr) minmax(150px, 1fr) 66px minmax(330px, auto) 112px auto;
  min-width: 900px;
}

.status-edit-form {
  grid-template-columns: minmax(150px, 1fr) 72px 96px;
  min-width: 440px;
}

.member-edit-form input, .status-edit-form input {
  min-height: 34px;
  padding: 6px 8px;
}

.member-active {
  align-items: center;
  color: var(--ink);
  display: flex;
  font-size: 12px;
  gap: 5px;
}

.role-checkboxes {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: max-content;
}

.role-checkboxes .checkline {
  align-items: center;
  font-size: 12px;
  gap: 4px;
  white-space: nowrap;
}

.role-checkboxes input {
  margin: 0;
}

.member-meta {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.member-delete-form {
  flex: 0 0 auto;
}

.drag-handle {
  align-items: center;
  border-color: transparent;
  color: var(--muted);
  cursor: grab;
  display: inline-flex;
  flex: 0 0 auto;
  height: 34px;
  justify-content: center;
  padding: 0;
  width: 34px;
}

.drag-handle:active {
  cursor: grabbing;
}

.status-admin-row.is-dragging {
  opacity: 0.48;
}

.status-admin-row.is-drop-target {
  box-shadow: inset 0 2px 0 var(--accent);
}

.autosave-inline {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.autosave-inline.is-saving {
  color: #765200;
}

.autosave-inline.is-saved {
  color: #176235;
}

.autosave-inline.is-error {
  color: #9f1d1d;
}

.danger {
  border-color: #f2b8b8;
  color: #9f1d1d;
}

.alert {
  background: #fff0f0;
  border: 1px solid #f2b8b8;
  border-radius: 6px;
  color: #9f1d1d;
  margin-top: 18px;
  padding: 10px 12px;
}

.notice {
  border-radius: 6px;
  padding: 10px 12px;
}

.notice.success {
  background: #eef8f2;
  border: 1px solid #b8dfc4;
  color: #1f6b3b;
}

.notice.error {
  background: #fff0f0;
  border: 1px solid #f2b8b8;
  color: #9f1d1d;
}

.flash {
  border-radius: 6px;
  margin-bottom: 16px;
  padding: 10px 12px;
}

.flash.success {
  background: #eef8f2;
  border: 1px solid #b8dfc4;
  color: #1f6b3b;
}

.flash.error {
  background: #fff0f0;
  border: 1px solid #f2b8b8;
  color: #9f1d1d;
}

.muted {
  color: var(--muted);
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin: -8px 0 18px;
}

.admin-tabs a {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  padding: 8px 11px;
}

.admin-tabs a.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.admin-panel, .release-note-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.panel, .subpanel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.subpanel {
  background: #fbfcfd;
}

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

.compact-form-grid {
  border: 0;
  padding: 0;
}

.rich-toolbar {
  align-items: center;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
}

.rich-toolbar button {
  min-height: 32px;
  padding: 6px 9px;
}

.rich-editor {
  background: white;
  border: 1px solid var(--line);
  border-radius: 0 0 6px 6px;
  line-height: 1.45;
  min-height: 180px;
  padding: 12px;
}

.rich-content {
  line-height: 1.5;
}

.rich-content h2, .rich-content h3,
.rich-editor h2, .rich-editor h3 {
  margin: 10px 0 8px;
}

.rich-content ul, .rich-content ol,
.rich-editor ul, .rich-editor ol {
  margin: 8px 0 8px 22px;
  padding: 0;
}

.release-note-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.modal-backdrop {
  align-items: center;
  background: rgb(32 36 44 / 55%);
  inset: 0;
  display: flex;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 2000;
}

.release-modal {
  background: var(--panel);
  border-radius: 8px;
  box-shadow: 0 20px 70px rgb(0 0 0 / 28%);
  max-height: min(760px, calc(100vh - 48px));
  max-width: 760px;
  overflow: auto;
  width: min(100%, 760px);
}

.release-modal-head,
.release-modal-actions {
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.release-modal-actions {
  border-bottom: 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
}

.release-modal-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

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

.history-row {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: 132px 72px minmax(140px, 0.8fr) minmax(260px, 2fr);
  padding: 10px 0;
}

.history-row time,
.history-row strong,
.history-row span {
  font-size: 12px;
  font-weight: 800;
}

.history-row time {
  color: var(--muted);
}

.history-row p {
  color: var(--ink);
  margin: 0;
}

.nav-badge {
  align-items: center;
  background: var(--accent);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  height: 20px;
  justify-content: center;
  min-width: 20px;
  padding: 0 6px;
}

.improvements-filters {
  grid-template-columns: minmax(210px, auto) minmax(180px, 240px);
}

.improvements-page {
  display: grid;
  gap: 18px;
}

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

.section-head p {
  margin: 4px 0 0;
}

.improvement-create-form {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr) auto;
}

.improvement-list-panel .improvements-filters {
  margin-bottom: 0;
}

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

.improvement-topic-row {
  align-items: center;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px 16px;
}

.improvement-topic-row:hover {
  border-color: #b7c5d6;
}

.improvement-topic-row.is-active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.improvement-topic-main {
  display: grid;
  gap: 8px;
}

.improvement-topic-title-row,
.improvement-detail-title-row,
.improvement-topic-meta,
.comment-meta,
.improvement-actions,
.admin-subpanel-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.improvement-topic-title-row,
.improvement-detail-title-row {
  align-items: flex-start;
}

.comment-meta,
.improvement-topic-meta {
  margin: 0;
}

.improvement-topic-meta,
.comment-meta {
  color: var(--muted);
  font-size: 12px;
}

.improvement-topic-metrics {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.improvement-topic-row strong {
  font-size: 15px;
  line-height: 1.35;
}

.new-activity {
  color: #176235;
  font-weight: 800;
}

.status-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  white-space: nowrap;
}

.status-open {
  background: #eef4ff;
  color: #204d9b;
}

.status-review {
  background: #fff3e5;
  color: #8a4a00;
}

.status-planned {
  background: #ecf7ef;
  color: #176235;
}

.status-done {
  background: #e8f5ea;
  color: #14532d;
}

.status-rejected {
  background: #fbecec;
  color: #8b1e1e;
}

.rich-copy {
  line-height: 1.55;
}

.inline-vote-form {
  margin: 0;
}

.improvement-actions {
  justify-content: flex-start;
}

.improvement-status-form {
  max-width: 280px;
}

.icon-vote-button {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  min-height: 36px;
  min-width: 54px;
  padding: 8px 10px;
}

.icon-vote-button span:first-child {
  font-size: 12px;
  font-weight: 800;
}

.icon-vote-button span:last-child {
  font-size: 13px;
  font-weight: 800;
}

.icon-vote-button.is-selected {
  background: var(--soft);
  border-color: var(--accent);
  color: var(--accent-dark);
}

.improvement-count-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  min-height: 36px;
  padding: 8px 12px;
}

.admin-subpanel {
  gap: 14px;
}

.admin-subpanel h3 {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.edit-toggle-row,
.edit-form-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.edit-toggle-row h3 {
  margin: 0;
}

.edit-form-actions {
  justify-content: flex-start;
}

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

.improvement-modal-backdrop {
  align-items: center;
  padding: 24px;
}

.improvement-modal {
  background: var(--panel);
  border-radius: 8px;
  box-shadow: 0 20px 70px rgb(0 0 0 / 28%);
  max-height: min(860px, calc(100vh - 48px));
  max-width: 920px;
  overflow: auto;
  width: min(100%, 920px);
}

.improvement-modal-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px;
}

.improvement-modal-head p {
  margin: 6px 0 0;
}

.improvement-modal-body {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.modal-close-button {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 24px;
  height: 36px;
  justify-content: center;
  line-height: 1;
  width: 36px;
}

.modal-close-button:hover {
  text-decoration: none;
}

.comment-list {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

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

.empty-state {
  min-height: 320px;
}

.meeting-column,
.meeting-cell {
  width: 118px;
}

.meeting-alert {
  background: #fff3d8;
  color: #765200;
  font-weight: 800;
}

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

.meeting-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr);
  margin-bottom: 24px;
}

.meeting-import-panel,
.meeting-side-panel,
.meeting-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

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

.compact-form {
  background: transparent;
  border: 0;
  gap: 14px;
  padding: 0;
}

.dossier-group {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.dossier-group + .dossier-group {
  margin-top: 16px;
}

.dossier-group h3,
.meeting-card h3 {
  font-size: 16px;
  margin: 0 0 8px;
}

.dossier-entry {
  border-left: 3px solid var(--accent);
  margin-top: 10px;
  padding-left: 10px;
}

.dossier-entry p {
  color: var(--ink);
  font-size: 14px;
}

.insight-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.insight-card,
.meeting-card {
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.insight-card form {
  display: grid;
  gap: 12px;
}

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

.meeting-card-head {
  align-items: start;
}

.meeting-card-head form {
  justify-self: end;
}

.insight-accepted,
.insight-done {
  border-color: #b8dfc4;
}

.insight-rejected,
.insight-obsolete {
  opacity: .75;
}

.meta-row {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  margin-top: 8px;
}

.meta-row span {
  background: #eef2f4;
  border-radius: 999px;
  padding: 4px 8px;
}

.compact-actions {
  justify-content: flex-start;
}

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

.markdown-preview {
  background: #20242c;
  border-radius: 6px;
  color: #f6f7f9;
  font-size: 12px;
  line-height: 1.45;
  max-height: 340px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
}

.error-text {
  color: #9f1d1d;
}

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

  .filters, .form-grid, .admin-grid, .inline-form, .import-form, .link-row, .improvement-create-form, .improvement-topic-row, .meeting-layout, .insight-card-head, .insight-fields, .meeting-card-head {
    grid-template-columns: 1fr;
  }

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

  .section-head {
    flex-direction: column;
  }

  .improvement-topic-metrics {
    justify-content: flex-start;
  }

  main {
    padding: 18px;
  }
}
