:root {
  color-scheme: light;
  --page: #f3f4f5;
  --surface: #ffffff;
  --surface-soft: #f8f9f9;
  --ink: #15191d;
  --muted: #5e6870;
  --line: #d7dcdf;
  --line-strong: #b9c1c7;
  --radius-sm: 4px;
  --radius-md: 7px;
  --radius-lg: 9px;
  --brand-red: #e30613;
  --brand-red-dark: #b4000b;
  --brand-dark: #172532;
  --brand-dark-strong: #0b1824;
  --accent: #006b73;
  --accent-strong: #004e55;
  --gold: #b7892f;
  --content-max: 1360px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
}

.app-header {
  background: var(--brand-dark);
  border-bottom: 4px solid var(--brand-red);
  color: #ffffff;
}

.app-header__inner {
  width: min(var(--content-max), calc(100% - 40px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.app-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: clamp(88px, 8vw, 116px);
  height: auto;
  flex: 0 0 auto;
}

.brand-copy {
  min-width: 0;
  padding-top: 2px;
}

.app-header h1,
.baseline h2 {
  margin: 0;
  letter-spacing: 0;
}

.app-header h1 {
  color: #ffffff;
  font-size: 21px;
  font-weight: 760;
}

.app-kicker {
  margin: 0 0 6px;
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.app-header .app-kicker {
  color: #ffffff;
  opacity: 0.74;
}

.env-pill {
  display: inline-flex;
  min-width: 44px;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line));
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  color: #ffffff;
  background: color-mix(in srgb, var(--gold) 72%, var(--brand-dark));
  font-size: 12px;
  font-weight: 700;
}

.app-nav {
  width: min(var(--content-max), calc(100% - 40px));
  min-height: 46px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.app-nav__links,
.app-nav__account {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.app-nav__links {
  flex-wrap: wrap;
}

.app-nav-spacer {
  flex: 1 1 auto;
}

.app-nav-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 760;
  padding: 6px 10px;
  text-decoration: none;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.app-user {
  max-width: 320px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-nav-link:hover,
.app-nav-link:focus,
.app-nav-link-active {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  outline: 0;
}

.app-nav-link-active {
  box-shadow: inset 3px 0 0 var(--brand-red);
}

.app-nav-link-quiet {
  color: rgba(255, 255, 255, 0.86);
}

.language-select {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 650;
}

.language-select select {
  min-height: 34px;
  max-width: 220px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: var(--radius-sm);
  background: var(--brand-dark-strong);
  color: #ffffff;
  font: inherit;
  padding: 4px 28px 4px 10px;
}

.language-select select:focus {
  outline: 2px solid rgba(227, 6, 19, 0.48);
  outline-offset: 2px;
}

.app-main {
  width: min(var(--content-max), calc(100% - 40px));
  margin: 38px auto;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.page-header h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 780;
}

.page-header p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.page-header-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 8px 15px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  background: var(--brand-red);
  color: #ffffff;
}

.button-primary:hover,
.button-primary:focus {
  background: var(--brand-red-dark);
}

.button-secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.button-secondary:hover,
.button-secondary:focus {
  border-color: var(--brand-dark);
}

.empty-state,
.form-shell,
.table-shell {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(12, 24, 35, 0.04);
}

.empty-state {
  padding: 28px;
}

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.empty-state p {
  max-width: 640px;
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.55;
}

.table-shell {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  background: var(--surface-soft);
  color: #3f4950;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.data-table tbody tr:hover {
  background: #fbfbfb;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.table-action {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.table-row-link {
  color: var(--ink);
  text-decoration: none;
}

.table-action:hover,
.table-action:focus,
.table-row-link:hover,
.table-row-link:focus {
  text-decoration: underline;
}

.status-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: var(--radius-md);
  background: #eef6f6;
  color: var(--accent-strong);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
}

.status-badge-muted {
  background: #f2f4f5;
  color: var(--muted);
}

.flash-message {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: #eef6f6;
  padding: 12px 14px;
  color: var(--accent-strong);
  font-weight: 700;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.flash-error,
.flash-warning {
  border-left-color: #9f2f2f;
  background: #fff4f2;
  color: #7b241f;
}

.flash-info {
  border-left-color: var(--gold);
  background: #fffaf0;
  color: #5c4314;
}

.flash-message button {
  border: 0;
  background: transparent;
  color: currentColor;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.flash-message-hiding {
  opacity: 0;
  transform: translateY(-4px);
}

.form-shell {
  max-width: 760px;
  padding: 28px;
  border-top: 3px solid var(--brand-dark);
}

.auth-panel {
  max-width: 680px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-top: 3px solid var(--brand-red);
  padding: 28px;
}

.anonymous-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top, color-mix(in srgb, var(--brand-red) 5%, transparent) 0, transparent 42%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface-soft) 72%, var(--page)) 0%, var(--page) 100%);
}

.anonymous-page__main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}

.anonymous-page__main-layout {
  width: min(100%, 500px);
  margin: 0 auto;
}

.auth-login-shell {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-login-card {
  width: min(100%, 476px);
  display: grid;
  gap: 16px;
  border-top: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 30px 34px 34px;
}

.auth-login-card__brand,
.auth-login-card__copy {
  display: grid;
}

.auth-login-card__brand {
  justify-content: flex-start;
}

.auth-login-card__logo {
  display: block;
  width: clamp(104px, 22vw, 124px);
  height: auto;
}

.auth-login-card__copy {
  gap: 10px;
}

.auth-login-card__copy h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.55rem, 3.6vw, 1.95rem);
  font-weight: 760;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.auth-login-card__copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.auth-language-form {
  display: grid;
  gap: 0;
}

.auth-language-form__field {
  position: relative;
  padding-top: 7px;
}

.auth-language-form__label {
  position: absolute;
  top: 0;
  left: 12px;
  z-index: 1;
  background: var(--surface);
  padding: 0 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
}

.auth-language-form__select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  padding: 10px 14px;
  font: inherit;
  font-size: 14px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.auth-language-form__select:focus {
  border-color: color-mix(in srgb, var(--brand-red) 44%, var(--line));
  box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.14);
  outline: 0;
}

.auth-sign-in-button {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  gap: 10px;
  font-size: 14px;
  font-weight: 760;
}

.auth-sign-in-button__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.auth-sign-in-button__icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
  fill: none;
}

.auth-message-shell {
  width: 100%;
  display: grid;
  gap: 12px;
}

.auth-login-card__notice {
  margin: 0;
}

.auth-login-card__secondary-action {
  justify-self: start;
}

@media (max-width: 640px) {
  .anonymous-page__main {
    padding: 20px 14px;
  }

  .anonymous-page__main-layout,
  .auth-login-card {
    width: 100%;
  }

  .auth-login-card {
    padding: 22px 18px 24px;
  }
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.admin-create-user {
  max-width: none;
}

.admin-create-user h3 {
  margin: 0 0 18px;
  font-size: 18px;
}

.admin-users-list {
  min-width: 0;
}

.option-admin-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.option-set-list {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand-dark);
  background: var(--surface);
  padding: 16px;
}

.option-set-list h3,
.option-create-form h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.option-set-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  background: #ffffff;
  padding: 10px 12px;
  color: var(--ink);
  text-decoration: none;
}

.option-set-link:hover,
.option-set-link:focus,
.option-set-link-active {
  border-left-color: var(--brand-red);
  background: #fbfcfc;
}

.option-set-link small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.option-admin-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.option-set-summary {
  padding-block: 18px;
}

.option-create-form {
  max-width: none;
}

.option-create-grid {
  display: grid;
  grid-template-columns: minmax(100px, 0.7fr) minmax(220px, 1.4fr) minmax(100px, 0.6fr) minmax(150px, 1fr);
  gap: 14px;
}

.option-values-list {
  border: 1px solid var(--line);
  background: var(--surface);
  overflow-x: auto;
}

.option-values-header,
.option-value-row {
  display: grid;
  grid-template-columns: minmax(76px, 0.55fr) minmax(180px, 1.25fr) minmax(180px, 1.35fr) minmax(92px, 0.5fr) minmax(130px, 0.8fr) minmax(100px, 0.65fr) minmax(82px, 0.45fr);
  min-width: 980px;
}

.option-values-header {
  background: var(--surface-soft);
  color: #3f4950;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.option-values-header span,
.option-value-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
}

.option-value-row:last-child .option-value-cell {
  border-bottom: 0;
}

.inactive-row {
  background: #f8f9f9;
}

.table-input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 6px 8px;
  color: var(--ink);
  font: inherit;
}

.table-input-small {
  max-width: 90px;
}

.table-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.table-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.table-action-button {
  min-height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: #ffffff;
  color: var(--accent-strong);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 5px 10px;
}

.table-action-button:hover,
.table-action-button:focus {
  border-color: var(--accent-strong);
}

.form-field {
  display: grid;
  gap: 7px;
  margin-bottom: 17px;
}

.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-weight: 650;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.form-field label {
  color: #202a32;
  font-size: 14px;
  font-weight: 760;
}

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

.form-grid-compact {
  align-items: start;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cfd6db;
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(12, 24, 35, 0.02);
  padding: 9px 11px;
  color: var(--ink);
  font: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 74%, var(--line));
  box-shadow: 0 0 0 3px rgba(0, 107, 115, 0.13);
  outline: 0;
}

.form-field select {
  background: #ffffff;
}

.option-filter-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cfd6db;
  border-radius: var(--radius-md);
  background: #ffffff;
  padding: 9px 11px;
  color: var(--ink);
  font: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.option-filter-input:focus {
  border-color: color-mix(in srgb, var(--accent) 74%, var(--line));
  box-shadow: 0 0 0 3px rgba(0, 107, 115, 0.13);
  outline: 0;
}

.form-field .multi-select {
  min-height: 178px;
  padding: 0;
}

.form-field .multi-select option {
  padding: 7px 10px;
}

.option-check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 204px;
  overflow: auto;
  border: 1px solid #d4dade;
  border-radius: var(--radius-md);
  background: #ffffff;
}

.option-check {
  display: grid;
  grid-template-columns: 18px minmax(34px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border-bottom: 1px solid #edf0f2;
  padding: 7px 10px;
  font-size: 13px;
  cursor: pointer;
}

.option-check:nth-child(odd) {
  border-right: 1px solid #edf0f2;
}

.option-check:hover {
  background: #f8fafb;
}

.option-check input {
  width: 16px;
  min-height: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.option-check input:disabled {
  cursor: not-allowed;
}

.option-code {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.option-name {
  overflow: hidden;
  color: var(--ink);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-field textarea {
  min-height: 96px;
  line-height: 1.45;
  resize: vertical;
}

.form-field .textarea-compact {
  min-height: 86px;
}

.form-field input[readonly],
.form-field input:disabled,
.form-field select:disabled,
.form-field textarea:disabled {
  background: #f3f5f6;
  color: var(--muted);
}

.form-field span[data-valmsg-for],
.validation-summary {
  color: #9f2f2f;
  font-size: 13px;
}

.field-help {
  color: var(--muted);
  font-size: 13px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 30px;
  align-items: center;
}

.data-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #cfd8de;
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: #f6f9fa;
  padding: 4px 9px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 750;
}

.notice {
  display: grid;
  gap: 4px;
  margin: 22px 0;
  border-left: 4px solid var(--gold);
  background: #fffaf0;
  padding: 14px 16px;
  color: #5c4314;
}

.notice-success {
  border-left-color: var(--accent);
  background: #eef6f6;
  color: var(--accent-strong);
}

.notice span {
  line-height: 1.45;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.project-tabs {
  display: flex;
  gap: 8px;
  margin: -2px 0 18px;
  border: 1px solid #dbe0e3;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #eef2f4 0%, #e7ecef 100%);
  overflow-x: auto;
  padding: 8px;
  scrollbar-width: thin;
}

.project-tab {
  position: relative;
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(12, 24, 35, 0.04);
  border-radius: var(--radius-sm);
  padding: 9px 15px;
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.42);
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.project-tab:hover,
.project-tab:focus {
  background: rgba(255, 255, 255, 0.88);
  color: var(--brand-dark);
  outline: 0;
}

.project-tab-active {
  border-color: rgba(12, 24, 35, 0.08);
  background: #ffffff;
  color: var(--brand-red);
  box-shadow: 0 10px 24px rgba(12, 24, 35, 0.08);
}

.project-tab-active::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 4px;
  left: 10px;
  height: 3px;
  border-radius: 999px;
  background: var(--brand-red);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.assigned-task-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.detail-panel {
  border: 1px solid #d8dde1;
  border-top: 3px solid var(--brand-dark);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(12, 24, 35, 0.04);
  overflow: hidden;
  padding: 20px;
}

.specification-panel {
  border-top-color: var(--brand-red);
}

.formulation-panel {
  border-top-color: var(--brand-red);
}

.tasks-panel {
  border-top-color: var(--accent);
}

.assigned-task-list-panel {
  padding: 0;
}

.assigned-task-list-header {
  padding: 20px 20px 0;
}

.assigned-task-panel-heading {
  margin-bottom: 0;
}

.assigned-task-list {
  display: grid;
  gap: 0;
  margin-top: 18px;
}

.assigned-task-link {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 16px 20px;
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.assigned-task-link:first-child {
  border-top: 1px solid var(--line);
}

.assigned-task-link:hover,
.assigned-task-link:focus {
  background: #fbfcfd;
  outline: 0;
}

.assigned-task-link-active {
  border-left: 3px solid var(--brand-red);
  background: #fbfcfd;
  padding-left: 17px;
  box-shadow: inset 0 0 0 1px rgba(227, 6, 19, 0.06);
}

.assigned-task-link-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.assigned-task-link h4 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.35;
}

.assigned-task-link p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.assigned-task-workspace {
  display: grid;
  gap: 16px;
}

.assigned-task-detail-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.assigned-task-description {
  margin: 0;
  color: var(--ink);
  line-height: 1.6;
  white-space: pre-wrap;
}

.assigned-task-workboard {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: 16px;
  align-items: start;
}

.assigned-task-status-form,
.assigned-task-comment-form {
  gap: 10px;
}

.assigned-task-status-panel {
  position: sticky;
  top: 0;
}

.assigned-task-collaboration {
  min-height: 0;
}

.task-board-heading {
  align-items: center;
  margin-bottom: 12px;
}

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

.panel-heading h3 {
  margin: 0;
  font-size: 18px;
}

.panel-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.audit-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: -2px 0 18px;
  border: 1px solid #dbe0e3;
  border-radius: var(--radius-md);
  background: #dbe0e3;
  overflow: hidden;
}

.audit-strip div {
  min-width: 0;
  background: var(--surface-soft);
  padding: 10px 12px;
}

.audit-strip dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.audit-strip dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: #dbe0e3;
  border: 1px solid #dbe0e3;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.detail-grid div {
  min-width: 0;
  background: #fbfcfc;
  padding: 14px 15px;
}

.detail-grid dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 650;
  line-height: 1.35;
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 360px)) max-content;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
}

.inline-form .form-field {
  margin-bottom: 0;
}

.inline-form .button {
  min-width: 118px;
  padding-inline: 22px;
}

.access-panel {
  display: grid;
  gap: 18px;
}

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

.access-summary-card,
.access-add-shell,
.access-members-shell {
  border: 1px solid #dbe0e3;
  border-radius: var(--radius-lg);
  background: #fbfcfc;
}

.access-summary-card {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
}

.access-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.access-summary-card strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.access-add-shell,
.access-members-shell {
  padding: 18px;
}

.access-section-copy h4,
.access-members-heading h4 {
  margin: 0;
  font-size: 17px;
}

.access-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.9fr) auto;
  align-items: end;
  gap: 14px;
  margin-top: 14px;
}

.access-add-form .form-field {
  margin-bottom: 0;
}

.access-add-form .button {
  min-width: 120px;
}

.access-members-heading {
  margin-bottom: 14px;
}

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

.access-member-card {
  display: grid;
  grid-template-columns: minmax(240px, 1.1fr) minmax(240px, 0.9fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid #e2e7ea;
  border-radius: var(--radius-md);
  background: #ffffff;
  padding: 16px 18px;
}

.access-member-identity {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.access-member-identity strong,
.access-member-identity span {
  overflow-wrap: anywhere;
}

.access-member-identity span {
  color: var(--muted);
  font-size: 14px;
}

.access-member-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
}

.access-member-meta div {
  min-width: 0;
}

.access-member-meta dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.access-member-meta dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

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

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

.access-role-select-shell {
  display: grid;
  gap: 6px;
}

.access-role-select-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.access-role-select {
  min-width: 220px;
  min-height: 42px;
  border: 1px solid #cfd6db;
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(12, 24, 35, 0.02);
  padding: 9px 40px 9px 12px;
  color: var(--ink);
  font: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.access-role-select:focus {
  border-color: color-mix(in srgb, var(--accent) 74%, var(--line));
  box-shadow: 0 0 0 3px rgba(0, 107, 115, 0.13);
  outline: 0;
}

.specification-form {
  display: grid;
  gap: 4px;
}

.specification-form-sections {
  gap: 16px;
}

.specification-form-section {
  margin: 0;
}

.specification-audit-strip {
  margin-bottom: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.specification-import-panel {
  margin-bottom: 16px;
}

.specification-import-form {
  display: grid;
  gap: 6px;
}

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

.specification-import-meta dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.specification-import-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.formulation-create-form {
  display: grid;
  gap: 4px;
  margin-bottom: 20px;
  border: 1px solid #dbe0e3;
  border-radius: var(--radius-lg);
  background: #fbfcfc;
  padding: 18px;
}

.task-create-form {
  display: grid;
  gap: 4px;
  margin-bottom: 20px;
  border: 1px solid #dbe0e3;
  border-radius: var(--radius-lg);
  background: #fbfcfc;
  padding: 18px;
}

.task-modal {
  position: relative;
  width: min(1180px, calc(100% - 28px));
  max-height: min(860px, calc(100vh - 32px));
  border: 1px solid #cfd6db;
  border-top: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(8, 20, 31, 0.28);
  color: var(--ink);
  overflow: hidden;
  padding: 0;
}

.task-modal::backdrop {
  background: rgba(11, 24, 36, 0.58);
}

.task-modal-shell {
  display: grid;
  min-height: min(856px, calc(100vh - 36px));
}

.task-modal-shell-create {
  min-height: auto;
}

.task-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 22px 72px 18px 24px;
}

.task-modal-header-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.task-modal-header-main h4 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 28px;
  line-height: 1.15;
}

.task-modal-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.task-modal-header-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.task-modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  min-height: 0;
}

.task-modal-main,
.task-modal-sidebar {
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

.task-modal-main {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 22px 24px 24px;
}

.modal-close-form {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
}

.modal-close-button {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid #cfd6db;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--brand-dark);
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  font-weight: 650;
  line-height: 1;
}

.modal-close-button:hover,
.modal-close-button:focus {
  border-color: var(--brand-dark);
  outline: 0;
}

.task-modal-section {
  display: grid;
  gap: 2px;
  border: 1px solid #dde3e7;
  border-radius: var(--radius-md);
  background: #fbfcfd;
  padding: 18px;
}

.task-description-field {
  margin-bottom: 0;
}

.task-modal-footer {
  position: sticky;
  bottom: 0;
  justify-content: flex-end;
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: linear-gradient(to top, #ffffff 78%, rgba(255, 255, 255, 0.92));
  padding-top: 16px;
  padding-bottom: 2px;
}

.task-audit-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.task-modal-sidebar {
  display: grid;
  gap: 14px;
  align-content: start;
  border-left: 1px solid var(--line);
  background: #f6f8f9;
  padding: 22px;
}

.task-sidebar-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  border: 1px solid #dbe1e5;
  border-radius: var(--radius-md);
  background: #ffffff;
  padding: 14px;
}

.task-sidebar-meta-panel {
  gap: 10px;
}

.task-sidebar-collaboration {
  min-height: 0;
  gap: 14px;
}

.task-sidebar-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid #e3e7ea;
  padding-bottom: 10px;
}

.task-sidebar-tab {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 1 1 0;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  padding: 8px 10px;
  text-align: left;
}

.task-sidebar-tab span,
.task-sidebar-tab strong {
  pointer-events: none;
}

.task-sidebar-tab strong {
  color: inherit;
  font-size: 12px;
}

.task-sidebar-tab:hover,
.task-sidebar-tab:focus {
  background: #f6f8f9;
  color: var(--ink);
  outline: 0;
}

.task-sidebar-tab-active {
  border-color: #d7dfe4;
  background: #f6f8f9;
  color: var(--accent-strong);
}

.task-sidebar-tabpanel {
  display: grid;
  gap: 12px;
  min-height: 0;
}

.task-sidebar-tabpanel[hidden] {
  display: none;
}

.task-comment-form {
  display: grid;
  gap: 6px;
}

.task-comment-list,
.task-activity-list {
  display: grid;
  gap: 10px;
}

.task-comment-card,
.task-activity-item {
  display: grid;
  gap: 6px;
  border: 1px solid #e0e5e8;
  border-radius: var(--radius-sm);
  background: #fbfcfd;
  padding: 12px;
}

.task-comment-meta,
.task-activity-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.task-comment-meta strong,
.task-activity-meta strong {
  font-size: 13px;
}

.task-comment-meta span,
.task-activity-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.task-comment-card p,
.task-activity-item p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.task-activity-item blockquote {
  margin: 0;
  border-left: 3px solid #cfd8de;
  padding-left: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.task-empty-inline {
  min-height: 78px;
  align-content: center;
}

.attachment-upload-form {
  display: grid;
  gap: 0.9rem;
}

.attachment-upload-form-inline {
  gap: 0.85rem;
}

.attachment-upload-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.attachment-upload-field {
  margin-bottom: 0;
}

.attachment-file-input,
.attachment-upload-form input[type="file"] {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cfd6db;
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  padding: 9px 12px;
}

.attachment-file-input::file-selector-button,
.attachment-upload-form input[type="file"]::file-selector-button {
  margin-right: 12px;
  border: 1px solid #c3ccd2;
  border-radius: var(--radius-sm);
  background: #f6f8f9;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  padding: 8px 12px;
  cursor: pointer;
}

.attachment-file-input:hover::file-selector-button,
.attachment-upload-form input[type="file"]:hover::file-selector-button {
  border-color: var(--brand-dark);
}

.attachment-upload-actions {
  align-self: end;
}

.attachment-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.attachment-table-actions form {
  margin: 0;
}

.attachment-card-list {
  display: grid;
  gap: 0.85rem;
}

.attachment-card-list-compact {
  gap: 0.7rem;
}

.attachment-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
  padding: 1rem 1.05rem;
  border: 1px solid #d7dee2;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  box-shadow: 0 3px 10px rgba(12, 24, 35, 0.04);
}

.attachment-card-compact {
  padding: 0.95rem 1rem;
}

.attachment-card-library {
  grid-template-columns: minmax(0, 1fr) auto;
}

.attachment-card-main {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.attachment-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.attachment-card-main strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.attachment-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.attachment-card-meta-library {
  column-gap: 1rem;
  row-gap: 0.4rem;
}

.attachment-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: flex-start;
  justify-content: flex-end;
}

.attachment-card-actions form {
  margin: 0;
}

.task-sidebar-panel .attachment-card {
  grid-template-columns: 1fr;
}

.task-sidebar-panel .attachment-card-actions {
  justify-content: flex-start;
}

.documents-library-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  border: 1px solid #dbe1e5;
  border-radius: var(--radius-lg);
  background: #fbfcfd;
  padding: 16px;
}

.project-chat-panel {
  display: grid;
  gap: 18px;
  border-top-color: var(--brand-red);
}

.project-chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e4e8eb;
}

.project-chat-header-main {
  display: grid;
  gap: 6px;
}

.project-chat-header-main h3 {
  margin: 0;
}

.project-chat-header-main .panel-subtitle {
  margin: 0;
  max-width: 760px;
}

.project-chat-header-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.project-chat-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.project-chat-history-panel {
  margin-top: 0;
  min-height: 100%;
  background: #ffffff;
}

.project-chat-sidebar {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 18px;
}

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

.project-chat-history-head h4 {
  margin: 0;
}

.project-chat-history-head .panel-subtitle {
  margin: 6px 0 0;
  max-width: 58ch;
}

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

.project-chat-overview-card {
  display: grid;
  gap: 8px;
  border: 1px solid #dbe1e5;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fbfcfd 0%, #f5f8fa 100%);
  padding: 15px 16px;
}

.project-chat-overview-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.project-chat-overview-card strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
}

.project-chat-overview-card-wide {
  grid-column: 1 / -1;
}

.project-chat-overview-card-wide strong {
  font-size: 18px;
  line-height: 1.2;
}

.project-chat-compose-shell {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #dbe1e5;
  border-radius: var(--radius-lg);
  background: #fbfcfd;
}

.project-chat-compose-heading {
  display: grid;
  gap: 6px;
}

.project-chat-compose-heading h4 {
  margin: 0;
}

.project-chat-compose-heading .panel-subtitle {
  margin: 0;
}

.project-chat-textarea {
  min-height: 180px;
  resize: vertical;
}

.project-chat-thread {
  gap: 12px;
  position: relative;
}

.project-chat-entry {
  gap: 10px;
  border: 1px solid #dbe1e5;
  border-left: 4px solid #d3dbe0;
  background: #ffffff;
  padding: 14px 16px;
}

.project-chat-entry-latest {
  border-left-color: var(--brand-red);
  box-shadow: 0 8px 18px rgba(12, 24, 35, 0.04);
}

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

.project-chat-entry-author {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-chat-entry-author strong {
  font-size: 14px;
}

.project-chat-entry-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.project-chat-entry p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

.documents-toolbar {
  margin-bottom: 12px;
}

.documents-upload-inline {
  border: 1px solid #dbe1e5;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fbfcfd 0%, #f5f8fa 100%);
  padding: 16px;
}

.documents-upload-inline .validation-summary {
  margin: 0 0 12px;
}

.documents-upload-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.documents-upload-header h4 {
  margin: 0;
  font-size: 16px;
}

.documents-upload-inline .attachment-upload-strip {
  grid-template-columns: minmax(0, 1.5fr) minmax(180px, 0.85fr) auto;
  align-items: end;
}

.documents-library-panel .attachment-card-library {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 0.85rem 0.95rem;
}

.documents-library-panel .attachment-card-main {
  gap: 0.5rem;
}

.documents-library-panel .attachment-card-title-row {
  align-items: flex-start;
}

.documents-library-panel .attachment-card-actions {
  align-items: center;
  gap: 0.55rem;
}

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

.documents-overview-card {
  display: grid;
  gap: 6px;
  border: 1px solid #dbe1e5;
  border-radius: var(--radius-md);
  background: #fbfcfd;
  padding: 12px 14px;
}

.documents-overview-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.documents-overview-card strong {
  font-size: 24px;
  line-height: 1;
}

.documents-overview-card-public {
  background: linear-gradient(180deg, #fbfcfd 0%, #f6faf9 100%);
}

.documents-overview-card-confidential {
  background: linear-gradient(180deg, #fbfcfd 0%, #f7f8fa 100%);
}

.documents-library-panel-public {
  border-left: 3px solid var(--accent);
}

.documents-library-panel-confidential {
  border-left: 3px solid var(--brand-dark);
}

.documents-card-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.documents-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 0;
}

.documents-card-meta div {
  min-width: 0;
}

.documents-card-meta dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.documents-card-meta dd {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.link-button.documents-action-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid #d7dee2;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--brand-dark);
  font-weight: 760;
  padding: 5px 11px;
  text-decoration: none;
}

.link-button.documents-action-link:hover,
.link-button.documents-action-link:focus {
  border-color: var(--brand-dark);
  background: #f8fafb;
  color: var(--brand-dark);
  text-decoration: none;
}

.link-button.documents-action-link.danger-link {
  border-color: #e6cdcd;
  color: #9f2f2f;
}

.link-button.documents-action-link.danger-link:hover,
.link-button.documents-action-link.danger-link:focus {
  border-color: #9f2f2f;
  background: #fff8f8;
  color: #9f2f2f;
}

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

.project-overview-summary-grid {
  margin-bottom: 18px;
}

.documents-activity-details {
  margin-top: 16px;
  border: 1px solid #dbe1e5;
  border-radius: var(--radius-md);
  background: #fbfcfd;
  overflow: hidden;
}

.documents-activity-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 760;
}

.documents-activity-details summary::-webkit-details-marker {
  display: none;
}

.documents-activity-details[open] summary {
  border-bottom: 1px solid #e3e8eb;
}

.documents-activity-details-body {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(250px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.task-drag-status-form {
  display: none;
}

.kanban-column {
  min-width: 250px;
  border: 1px solid #dbe0e3;
  border-radius: var(--radius-sm);
  background: #f5f7f8;
  overflow: hidden;
}

.kanban-column-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  border-bottom: 1px solid #dbe0e3;
  background: #ffffff;
  padding: 9px 11px;
}

.kanban-column-heading h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.kanban-column-heading span {
  display: inline-flex;
  min-width: 24px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: #eef6f6;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 850;
}

.kanban-task-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 340px;
  padding: 12px;
  transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.kanban-task-list-drop-target {
  background: #eef6f6;
  box-shadow: inset 0 0 0 2px rgba(0, 107, 115, 0.2);
}

.task-card {
  display: grid;
  gap: 10px;
  border: 1px solid #d6dde1;
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 2px 5px rgba(12, 24, 35, 0.035);
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.task-card-draggable {
  cursor: grab;
}

.task-card:hover,
.task-card:focus {
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(12, 24, 35, 0.08);
  outline: 0;
  transform: translateY(-1px);
}

.task-card-dragging,
.task-card-draggable:active {
  cursor: grabbing;
}

.task-card-dragging {
  opacity: 0.58;
  transform: scale(0.98);
  box-shadow: 0 10px 24px rgba(12, 24, 35, 0.12);
}

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

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

.task-card h5 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.3;
}

.task-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.task-card-meta span {
  display: inline-flex;
  max-width: 100%;
  min-height: 24px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #d9e0e4;
  border-radius: var(--radius-sm);
  background: #f8fafb;
  color: #33404a;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kanban-empty-column {
  display: flex;
  min-height: 120px;
  align-items: center;
  justify-content: center;
  border: 1px dashed #ccd5da;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.task-status-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  border-top: 1px solid #e4e8eb;
  padding-top: 10px;
}

.task-status-form .form-field {
  margin-bottom: 0;
}

.task-status-form .button {
  width: 100%;
  min-height: 36px;
}

.version-list {
  display: grid;
  gap: 16px;
}

.version-card {
  border: 1px solid #d6dde1;
  border-left: 4px solid var(--brand-dark);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(12, 24, 35, 0.04);
  overflow: hidden;
  padding: 0;
}

.version-card-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 88px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

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

.version-card-summary::after {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid #cfd6db;
  border-radius: var(--radius-sm);
  background: #f4f7f8;
  color: var(--brand-dark);
  content: "+";
  font-size: 20px;
  font-weight: 850;
  line-height: 1;
}

.version-card[open] .version-card-summary {
  border-bottom: 1px solid #e4e8eb;
}

.version-card[open] .version-card-summary::after {
  content: "-";
}

.version-card-summary:focus-visible {
  outline: 3px solid rgba(0, 107, 115, 0.18);
  outline-offset: -3px;
}

.version-summary-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.version-summary-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.version-summary-heading h4 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.version-summary-title-block,
.version-summary-support {
  display: grid;
  gap: 4px;
}

.version-summary-label {
  color: #60717d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.version-summary-title {
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-summary-preview {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.version-summary-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 180px;
}

.version-card-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.version-card-history:not([open]) {
  border-left-color: #8fa1ad;
  box-shadow: none;
}

.version-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 16px;
  border: 1px solid #dbe0e3;
  border-radius: var(--radius-md);
  background: #dbe0e3;
  overflow: hidden;
}

.version-meta div {
  min-width: 0;
  background: #fbfcfc;
  padding: 10px 12px;
}

.version-meta dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.version-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.version-edit-form {
  display: grid;
  gap: 2px;
}

.version-overview {
  display: grid;
  gap: 8px;
}

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

.formulation-read-card,
.formulation-user-entry {
  border: 1px solid #dbe2e6;
  border-radius: var(--radius-md);
}

.formulation-read-card {
  display: grid;
  gap: 4px;
  max-width: 460px;
  padding: 10px 12px;
  background: #f6f8f9;
}

.formulation-read-label,
.formulation-user-entry-label,
.linked-record-field-label,
.formulation-meta-strip dt {
  color: #60717d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.formulation-read-value {
  color: var(--ink);
  font-size: 15px;
  font-weight: 760;
  line-height: 1.35;
}

.version-overview-primary,
.version-overview-secondary {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}

.version-overview-secondary {
  color: var(--muted);
}

.formulation-user-entry {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  background: #f7fafb;
}

.formulation-user-entry-secondary {
  background: #f3f6f8;
}

.version-overview-tags,
.version-action-row,
.linked-record-inline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.version-action-row {
  align-items: center;
}

.version-inline-section {
  border: 1px solid #dbe0e3;
  border-radius: var(--radius-md);
  background: #fbfcfc;
  overflow: hidden;
}

.version-inline-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  cursor: pointer;
  list-style: none;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
}

.version-inline-section summary::-webkit-details-marker {
  display: none;
}

.version-inline-section summary::after {
  color: var(--muted);
  content: "+";
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.version-inline-section[open] summary {
  border-bottom: 1px solid #e4e8eb;
}

.version-inline-section[open] summary::after {
  content: "-";
}

.version-inline-section .version-edit-form,
.version-inline-section .version-status-form,
.version-inline-section .version-meta {
  margin: 0;
  padding: 14px;
}

.version-inline-section .version-meta {
  padding: 0;
}

.version-inline-section-muted {
  background: #f8fafb;
}

.linked-record-group {
  margin-top: 6px;
}

.linked-record-group > summary .summary-chip {
  margin-left: auto;
}

.linked-record-group-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.linked-record-group-secondary {
  background: #f6f8f9;
}

.linked-record-group-secondary > summary {
  color: var(--muted);
}

.linked-record-group-secondary > summary span:first-child {
  font-weight: 760;
}

.version-status-form {
  display: grid;
  grid-template-columns: minmax(220px, 320px) max-content;
  align-items: end;
  gap: 12px;
}

.version-next-form {
  display: flex;
  justify-content: flex-start;
}

.version-delete-form {
  display: flex;
  justify-content: flex-start;
}

.linked-record-section {
  display: grid;
  gap: 12px;
  margin-top: 6px;
  border-top: 1px solid #e4e8eb;
  padding-top: 14px;
}

.linked-record-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.linked-record-heading h5 {
  margin: 0;
  font-size: 15px;
}

.linked-record-create,
.linked-record-card {
  border: 1px solid #dbe0e3;
  border-radius: var(--radius-md);
  background: #fbfcfc;
  overflow: hidden;
}

.linked-record-create summary,
.linked-record-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.linked-record-create summary::-webkit-details-marker,
.linked-record-summary::-webkit-details-marker {
  display: none;
}

.linked-record-create summary {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.linked-record-create[open] summary,
.linked-record-card[open] .linked-record-summary {
  border-bottom: 1px solid #e4e8eb;
}

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

.linked-record-summary-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.linked-record-summary-main strong {
  font-size: 14px;
}

.linked-record-summary-main span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.linked-record-summary-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.linked-record-summary-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #f2f4f5;
  padding: 2px 8px;
}

.linked-record-body,
.linked-record-form {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.linked-record-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.linked-record-summary-field {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.linked-record-summary-text {
  margin: 0;
  border-left: 3px solid #d6dde1;
  padding-left: 12px;
  color: var(--ink);
  line-height: 1.6;
}

.linked-record-summary-text-secondary {
  border-left-color: #e7c66a;
  color: #5c4314;
}

.formulation-meta-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  border: 1px solid #dbe2e6;
  border-radius: var(--radius-md);
  background: #dbe2e6;
  overflow: hidden;
}

.formulation-meta-strip div {
  min-width: 0;
  padding: 10px 12px;
  background: #fbfcfd;
}

.formulation-meta-strip dt {
  margin: 0 0 4px;
}

.formulation-meta-strip dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.linked-record-inline-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.linked-record-inline-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #f6f8f9;
  padding: 2px 8px;
}

.linked-record-toolbar-spacer {
  flex: 1 1 auto;
  min-height: 1px;
}

.version-status-form .form-field {
  margin-bottom: 0;
}

.inline-note {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: #fff6df;
  color: #5c4314;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 760;
}

.inline-note-accent {
  background: #eef6f6;
  color: var(--accent-strong);
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #d9e0e4;
  border-radius: 999px;
  background: #f8fafb;
  color: #33404a;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 760;
}

.summary-chip-subtle {
  background: #fbfcfc;
}

.material-field {
  margin-bottom: 14px;
}

.compact-table {
  font-size: 13px;
}

.empty-inline {
  display: grid;
  gap: 4px;
  border-left: 4px solid var(--line-strong);
  background: var(--surface-soft);
  padding: 14px 16px;
  color: var(--muted);
}

.empty-inline strong {
  color: var(--ink);
}

.muted-text {
  margin: 0 0 18px;
  color: var(--muted);
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--brand-red);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0;
  text-align: left;
}

.link-button:hover,
.link-button:focus {
  text-decoration: underline;
}

.danger-link {
  color: #9f2f2f;
}

.baseline {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  gap: 32px;
  align-items: start;
}

.baseline__intro {
  max-width: 560px;
}

.baseline h2 {
  font-size: 34px;
  line-height: 1.12;
  font-weight: 700;
}

.baseline p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.status-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--surface);
}

.status-grid div {
  min-width: 0;
  padding: 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.status-grid div:nth-child(2n) {
  border-right: 0;
}

.status-grid div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.status-grid dt {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 650;
}

.roadmap-page-header {
  align-items: flex-start;
  padding: 10px 0 12px;
}

.roadmap-count-pill {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d8e0e7;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8fbfd 0%, #eef3f7 100%);
  color: #516273;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 760;
}

.roadmap-workspace-shell {
  border: 1px solid #dbe2e8;
  border-top: 0;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
  box-shadow: 0 16px 42px rgba(17, 31, 47, 0.08);
}

.roadmap-panel,
.roadmap-unscheduled-panel {
  display: grid;
  gap: 18px;
}

.roadmap-filter-form {
  display: block;
}

.roadmap-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.roadmap-toolbar-label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0;
  min-width: auto;
}

.roadmap-toolbar-label span {
  color: #5e6e80;
  font-size: 0.84rem;
  font-weight: 760;
}

.roadmap-filter-actions {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
}

.roadmap-filter-field {
  flex: 0 0 220px;
  margin-bottom: 0;
}

.roadmap-legend {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  min-width: 0;
  white-space: nowrap;
  overflow: visible;
}

.roadmap-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.roadmap-legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #5a6875;
}

.roadmap-legend-dot-active {
  background: #197e45;
}

.roadmap-legend-dot-draft {
  background: #006b73;
}

.roadmap-legend-dot-onhold {
  background: #1b2743;
}

.roadmap-legend-dot-completed {
  background: #d14a41;
}

.roadmap-shell {
  margin-top: 0;
  overflow-x: auto;
  padding-bottom: 0;
}

.roadmap-grid {
  min-width: var(--roadmap-grid-width);
  display: grid;
  gap: 0;
  border: 1px solid #dbe2e8;
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
}

.roadmap-grid-row {
  display: grid;
  grid-template-columns: minmax(340px, 360px) minmax(560px, 1fr);
  gap: 0;
  align-items: stretch;
  border-top: 1px solid #e2e8ee;
}

.roadmap-grid-row:first-child {
  border-top: 0;
}

.roadmap-grid-header {
  align-items: end;
  background: #f4f7fa;
}

.roadmap-project-heading {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  color: #5f7185;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.roadmap-months,
.roadmap-track-grid {
  display: grid;
  grid-template-columns: repeat(var(--roadmap-month-count), minmax(152px, 1fr));
}

.roadmap-month-heading {
  display: flex;
  align-items: center;
  min-height: 44px;
  border-left: 1px solid #e2e8ee;
  padding: 0 14px;
  color: #6a7a8b;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.roadmap-month-heading:first-child,
.roadmap-track-cell:first-child {
  border-left: 0;
}

.roadmap-project-cell {
  position: relative;
  display: block;
  min-width: 0;
  background: #ffffff;
  padding: 0;
}

.roadmap-project-cell::before {
  content: none;
}

.roadmap-project-accent-intake::before {
  background: #6f8394;
}

.roadmap-project-accent-specification::before {
  background: #a46f17;
}

.roadmap-project-accent-formulation::before {
  background: #006b73;
}

.roadmap-project-accent-testing::before {
  background: #197e45;
}

.roadmap-project-accent-review::before {
  background: #7b4aa1;
}

.roadmap-project-accent-handover::before {
  background: #455fc6;
}

.roadmap-project-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  min-height: 68px;
}

.roadmap-grip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  color: #8b99a7;
  font-size: 18px;
  line-height: 1;
  letter-spacing: -2px;
  user-select: none;
}

.roadmap-project-title-block {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 16px;
  align-content: start;
}

.roadmap-project-trigger,
.roadmap-code-trigger {
  width: fit-content;
  max-width: 100%;
  border: 0;
  background: transparent;
  color: #17304a;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: left;
}

.roadmap-project-trigger {
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.28;
}

.roadmap-code-trigger {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 760;
}

.roadmap-project-trigger:hover,
.roadmap-project-trigger:focus,
.roadmap-code-trigger:hover,
.roadmap-code-trigger:focus {
  text-decoration: underline;
  outline: 0;
}

.roadmap-project-title-block .table-row-link {
  color: #17304a;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.28;
}

.roadmap-project-meta {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  align-items: center;
}

.roadmap-project-dates {
  margin: 0;
  color: #6c7c8b;
  font-size: 0.74rem;
  font-weight: 700;
}

.roadmap-date-form-error {
  display: block;
  margin-top: 6px;
  color: #9f2f2f;
  font-size: 13px;
}

.roadmap-track {
  position: relative;
  min-height: 68px;
  border-left: 1px solid #dbe2e8;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 151px,
      rgba(129, 145, 165, 0.12) 152px
    ),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  overflow: visible;
}

.roadmap-track-grid {
  height: 100%;
}

.roadmap-track-cell {
  border-left: 1px solid #edf1f5;
}

.roadmap-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(227, 6, 19, 0.65);
  box-shadow: 0 0 0 1px rgba(227, 6, 19, 0.08);
  z-index: 1;
}

.roadmap-bar {
  position: absolute;
  top: 8px;
  display: flex;
  align-items: center;
  min-width: 18px;
  min-height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 12px rgba(16, 31, 50, 0.12);
  color: #ffffff;
  text-decoration: none;
  z-index: 2;
  overflow: hidden;
}

.roadmap-bar-button {
  border: 0;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: left;
}

.roadmap-bar-progress {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  min-width: 0;
  border-radius: 999px;
  z-index: 0;
}

.roadmap-bar-cap {
  flex: 0 0 auto;
  width: 18px;
  height: 26px;
  border-radius: 999px;
  margin-left: 0;
  background: rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
}

.roadmap-bar-content {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 10px;
  position: relative;
  z-index: 2;
}

.roadmap-bar-content span {
  display: block;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roadmap-bar-percentage {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
}

.roadmap-bar-date {
  position: absolute;
  bottom: -16px;
  color: #6f7f8d;
  font-size: 0.68rem;
  font-weight: 780;
}

.roadmap-bar-date-start {
  left: 0;
}

.roadmap-bar-date-end {
  right: 0;
}

.roadmap-bar-active {
  background: #b6e6c6;
}

.roadmap-bar-active .roadmap-bar-cap {
  background: #0f6b39;
}

.roadmap-bar-active .roadmap-bar-progress {
  background: linear-gradient(90deg, #0f6b39 0%, #187f45 100%);
}

.roadmap-bar-draft {
  background: #9fdae0;
}

.roadmap-bar-draft .roadmap-bar-cap {
  background: #0a5460;
}

.roadmap-bar-draft .roadmap-bar-progress {
  background: linear-gradient(90deg, #0f6672 0%, #157b85 100%);
}

.roadmap-bar-onhold {
  background: #c4d2e5;
}

.roadmap-bar-onhold .roadmap-bar-cap {
  background: #1a2743;
}

.roadmap-bar-onhold .roadmap-bar-progress {
  background: linear-gradient(90deg, #111b34 0%, #213353 100%);
}

.roadmap-bar-completed {
  background: #f2b0ad;
}

.roadmap-bar-completed .roadmap-bar-cap {
  background: #aa3028;
}

.roadmap-bar-completed .roadmap-bar-progress {
  background: linear-gradient(90deg, #bf352d 0%, #d4473f 100%);
}

.roadmap-bar-cancelled {
  background: #dcc8c5;
}

.roadmap-bar-cancelled .roadmap-bar-cap {
  background: #69463f;
}

.roadmap-bar-cancelled .roadmap-bar-progress {
  background: linear-gradient(90deg, #77514a 0%, #8b645f 100%);
}

.roadmap-bar:hover,
.roadmap-bar:focus {
  filter: brightness(1.02);
  outline: 0;
}

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

.roadmap-unscheduled-card {
  display: grid;
  gap: 14px;
  border: 1px solid #d8dde1;
  border-radius: 16px;
  background: #fbfcfc;
  padding: 16px;
}

.roadmap-unscheduled-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.roadmap-unscheduled-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.roadmap-card-action {
  min-width: 132px;
}

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

.roadmap-edit-modal {
  width: min(720px, calc(100% - 28px));
}

.roadmap-edit-modal-shell {
  min-height: auto;
}

.roadmap-edit-modal-main {
  gap: 18px;
  padding-bottom: 24px;
}

.roadmap-modal-date-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.roadmap-modal-date-grid .form-field {
  margin-bottom: 0;
}

.roadmap-edit-summary-section {
  background: #f8fafb;
}

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

.roadmap-edit-modal-footer {
  gap: 12px;
}

@media (max-width: 1120px) {
  .assigned-task-layout,
  .assigned-task-workboard {
    grid-template-columns: 1fr;
  }

  .task-modal {
    width: min(980px, calc(100% - 24px));
  }

  .task-modal-shell {
    min-height: auto;
  }

  .task-modal-body {
    grid-template-columns: 1fr;
  }

  .task-modal-main,
  .task-modal-sidebar {
    overflow: visible;
  }

  .task-modal-sidebar {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .kanban-board {
    grid-template-columns: repeat(2, minmax(250px, 1fr));
  }

  .attachment-upload-strip,
  .attachment-card {
    grid-template-columns: 1fr;
  }

  .attachment-card-actions,
  .attachment-table-actions {
    justify-content: flex-start;
  }

  .assigned-task-status-panel {
    position: static;
  }

  .roadmap-grid-row {
    grid-template-columns: minmax(280px, 320px) minmax(420px, 1fr);
  }
}

@media (max-width: 760px) {
  .app-header__inner,
  .app-nav,
  .app-main {
    width: min(100% - 28px, var(--content-max));
  }

  .app-header__inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 14px 0;
  }

  .brand-lockup {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .brand-logo {
    width: 118px;
  }

  .app-header h1 {
    font-size: 21px;
  }

  .app-header__actions,
  .language-select {
    width: 100%;
  }

  .app-header__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .app-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 12px 0;
  }

  .app-nav__links,
  .app-nav__account {
    align-items: stretch;
    width: 100%;
  }

  .app-nav__links {
    display: grid;
    grid-template-columns: 1fr;
  }

  .app-nav__account {
    justify-content: space-between;
  }

  .app-nav-link {
    justify-content: flex-start;
  }

  .app-nav-spacer {
    display: none;
  }

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

  .language-select select {
    width: 100%;
    max-width: none;
  }

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

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

  .page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .page-header .button,
  .page-header-actions {
    align-self: flex-start;
  }

  .project-tabs {
    margin-top: -2px;
  }

  .project-tab {
    min-height: 42px;
    padding-inline: 13px;
  }

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

  .option-check-list {
    grid-template-columns: 1fr;
    max-height: 240px;
  }

  .option-check:nth-child(odd) {
    border-right: 0;
  }

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

  .assigned-task-link-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .attachment-card-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .documents-overview-strip,
  .documents-card-meta {
    grid-template-columns: 1fr;
  }

  .audit-strip {
    grid-template-columns: 1fr;
  }

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

  .access-summary-strip,
  .access-member-meta {
    grid-template-columns: 1fr;
  }

  .access-add-form,
  .access-member-card {
    grid-template-columns: 1fr;
  }

  .access-member-actions,
  .access-role-form {
    align-items: stretch;
    flex-direction: column;
  }

  .access-role-select,
  .access-add-form .button,
  .access-role-form .button {
    width: 100%;
  }

  .documents-upload-header {
    flex-direction: column;
  }

  .project-chat-header,
  .project-chat-history-head,
  .project-chat-entry-head {
    align-items: stretch;
    flex-direction: column;
  }

  .project-chat-header-meta {
    justify-content: flex-start;
  }

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

  .project-chat-sidebar {
    order: -1;
    position: static;
  }

  .project-chat-overview-grid {
    grid-template-columns: 1fr;
  }

  .documents-card-tags {
    justify-content: flex-start;
  }

  .version-card-summary {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px 12px;
  }

  .version-summary-main {
    flex: 1 1 100%;
  }

  .version-summary-meta {
    flex: 1 1 220px;
    justify-content: flex-start;
    min-width: 0;
  }

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

  .version-action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .version-action-row form,
  .version-action-row .button,
  .version-action-row .link-button {
    width: 100%;
  }

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

  .linked-record-heading,
  .linked-record-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .linked-record-summary-meta {
    justify-content: flex-start;
  }

  .linked-record-inline-meta {
    flex-direction: column;
  }

  .task-board-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .task-board-heading .button {
    align-self: flex-start;
  }

  .task-modal {
    width: min(100% - 18px, 1180px);
    max-height: calc(100vh - 18px);
  }

  .task-modal-shell {
    min-height: auto;
  }

  .task-modal-header,
  .task-modal-header-badges,
  .task-modal-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .task-modal-header {
    padding: 18px 58px 16px 18px;
  }

  .task-modal-header-main h4 {
    font-size: 24px;
  }

  .task-modal-body {
    grid-template-columns: 1fr;
  }

  .task-modal-main,
  .task-modal-sidebar {
    overflow: visible;
  }

  .task-modal-main {
    padding: 18px;
  }

  .task-modal-section {
    padding: 16px;
  }

  .task-audit-strip {
    grid-template-columns: 1fr;
  }

  .task-modal-sidebar {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding: 18px;
  }

  .task-comment-meta,
  .task-activity-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .documents-library-panel {
    margin-top: 14px;
  }

  .kanban-board {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .kanban-column {
    min-width: 0;
  }

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

  .option-admin-layout,
  .option-create-grid {
    grid-template-columns: 1fr;
  }

  .option-values-list {
    overflow-x: visible;
  }

  .option-values-header {
    display: none;
  }

  .option-value-row {
    display: grid;
    grid-template-columns: 1fr;
    min-width: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
  }

  .option-value-row:last-child {
    border-bottom: 0;
  }

  .option-value-cell {
    display: grid;
    grid-template-columns: minmax(110px, 36%) 1fr;
    gap: 12px;
    border-bottom: 0;
    padding: 8px 14px;
  }

  .option-value-cell::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table th,
  .data-table td,
  .data-table tr {
    display: block;
  }

  .data-table thead {
    display: none;
  }

  .data-table tr {
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
  }

  .data-table tr:last-child {
    border-bottom: 0;
  }

  .data-table td {
    display: grid;
    grid-template-columns: minmax(110px, 40%) 1fr;
    gap: 12px;
    border-bottom: 0;
    padding: 8px 14px;
  }

  .data-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }

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

  .status-grid div,
  .status-grid div:nth-child(2n),
  .status-grid div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .status-grid div:last-child {
    border-bottom: 0;
  }

  .roadmap-toolbar,
  .roadmap-filter-actions,
  .roadmap-panel-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .roadmap-filter-field {
    flex: 1 1 auto;
  }

  .roadmap-legend {
    flex-wrap: wrap;
    white-space: normal;
    overflow-x: visible;
  }

  .roadmap-grid {
    min-width: 0;
    gap: 16px;
    border: 0;
    background: transparent;
  }

  .roadmap-grid-row,
  .roadmap-grid-header {
    grid-template-columns: 1fr;
  }

  .roadmap-grid-header {
    gap: 8px;
    background: transparent;
  }

  .roadmap-project-heading {
    padding-left: 2px;
  }

  .roadmap-months,
  .roadmap-track-grid {
    grid-template-columns: repeat(var(--roadmap-month-count), minmax(80px, 1fr));
  }

  .roadmap-track {
    min-height: 82px;
    border: 1px solid #dbe2e8;
    border-radius: 14px;
  }

  .roadmap-bar {
    min-width: 96px;
    padding: 8px 10px;
  }

  .roadmap-project-cell {
    border: 1px solid #dbe2e8;
    border-radius: 14px;
    margin-bottom: 10px;
  }

  .roadmap-project-dates {
    margin-left: 0;
  }

  .roadmap-unscheduled-card-head {
    flex-direction: column;
  }

  .roadmap-unscheduled-actions {
    justify-items: start;
  }

  .roadmap-unscheduled-meta {
    grid-template-columns: 1fr;
  }

  .roadmap-modal-date-grid,
  .roadmap-edit-summary-grid {
    grid-template-columns: 1fr;
  }
}

.notification-screen-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.notification-summary-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafb 100%);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notification-summary-card span {
  font-size: 0.86rem;
  color: var(--muted);
}

.notification-summary-card strong {
  font-size: 1.2rem;
  color: var(--text);
}

.notification-summary-card-wide {
  background: linear-gradient(180deg, #f7f8fa 0%, #eef2f5 100%);
}

.notification-policy-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.notification-policy-group {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: #fbfcfd;
}

.notification-policy-group-header {
  margin-bottom: 16px;
}

.notification-policy-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.notification-policy-card {
  border: 1px solid #d9e2ea;
  border-radius: 16px;
  background: #ffffff;
}

.notification-policy-card-main {
  padding: 18px;
}

.notification-policy-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 16px;
}

.notification-policy-card-header h5,
.notification-policy-block h6 {
  margin: 0;
}

.notification-policy-grid {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 18px;
}

.notification-policy-block {
  padding: 14px 16px;
  border-radius: 14px;
  background: #f7f9fb;
  border: 1px solid #e4ebf0;
}

.notification-policy-block h6 {
  margin-bottom: 12px;
}

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

.checkbox-field,
.toggle-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.checkbox-field-disabled {
  opacity: 0.52;
}

.notification-policy-actions {
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .notification-screen-summary,
  .notification-policy-grid,
  .notification-recipient-grid {
    grid-template-columns: 1fr;
  }

  .notification-policy-card-header {
    flex-direction: column;
    align-items: stretch;
  }

  .specification-audit-strip,
  .specification-import-meta {
    grid-template-columns: 1fr;
  }
}

:root {
  --page: #edf2f7;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-soft: #f6f9fc;
  --surface-muted: #eef3f8;
  --ink: #112233;
  --muted: #5d6d7c;
  --line: #d7e0ea;
  --line-strong: #c0ccd8;
  --brand-red: #d92a2f;
  --brand-red-dark: #b32127;
  --brand-dark: #152433;
  --brand-dark-strong: #0e1a27;
  --accent: #1f5a8c;
  --accent-strong: #164568;
  --gold: #a98334;
  --content-max: 1680px;
  --shell-sidebar-width: 286px;
  --shell-sidebar-collapsed-width: 94px;
  --shell-radius: 22px;
  --shell-radius-sm: 16px;
  --shell-shadow-soft: 0 14px 34px rgba(17, 34, 51, 0.08);
  --shell-shadow-strong: 0 22px 48px rgba(17, 34, 51, 0.12);
}

html,
body {
  min-height: 100%;
}

body {
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(31, 90, 140, 0.1), transparent 26%),
    linear-gradient(180deg, #f5f8fb 0%, var(--page) 100%);
  color: var(--ink);
  font-family: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
}

body.app-body-sidebar-open {
  overflow: hidden;
}

a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--shell-sidebar-width) minmax(0, 1fr);
  height: 100vh;
  min-height: 100vh;
}

.app-shell.app-shell-sidebar-collapsed {
  grid-template-columns: var(--shell-sidebar-collapsed-width) minmax(0, 1fr);
}

.app-sidebar {
  position: relative;
  z-index: 40;
  padding: 18px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 30%),
    linear-gradient(180deg, var(--brand-dark) 0%, var(--brand-dark-strong) 100%);
  color: #edf4fb;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.app-sidebar__inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: calc(100vh - 36px);
  padding: 8px;
}

.app-sidebar__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.app-sidebar__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.app-sidebar__brand-logo {
  width: 109px;
  height: auto;
  flex: 0 0 auto;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.18));
}

.app-sidebar__brand-copy {
  display: block;
  min-width: 0;
}

.app-sidebar__eyebrow,
.app-topbar__eyebrow {
  margin: 0;
  color: rgba(237, 244, 251, 0.62);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.app-sidebar__brand-copy strong {
  display: block;
  overflow: visible;
  font-size: 0.96rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: normal;
}

.app-sidebar__brand-meta {
  color: rgba(237, 244, 251, 0.74);
  font-size: 0.82rem;
}

.app-sidebar__collapse,
.app-topbar__menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #edf4fb;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.app-sidebar__collapse:hover,
.app-sidebar__collapse:focus,
.app-topbar__menu:hover,
.app-topbar__menu:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.16);
  outline: 0;
}

.app-sidebar__collapse span {
  font-size: 1.3rem;
  line-height: 1;
}

.app-shell.app-shell-sidebar-collapsed .app-sidebar__collapse span {
  transform: rotate(180deg);
}

.app-sidebar__nav {
  display: grid;
  gap: 10px;
}

.app-sidebar__link {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  color: inherit;
  text-decoration: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.app-sidebar__link:hover,
.app-sidebar__link:focus {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  outline: 0;
}

.app-sidebar__link-active {
  background: linear-gradient(180deg, rgba(217, 42, 47, 0.24), rgba(217, 42, 47, 0.1));
  border-color: rgba(255, 184, 186, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 26px rgba(7, 15, 23, 0.22);
}

.app-sidebar__link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 780;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app-sidebar__link-copy {
  display: block;
  min-width: 0;
}

.app-sidebar__link-copy strong {
  display: block;
  overflow: hidden;
  font-size: 0.88rem;
  line-height: 1.3;
  font-weight: 680;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-sidebar__footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.app-shell.app-shell-sidebar-collapsed .app-sidebar__brand-copy,
.app-shell.app-shell-sidebar-collapsed .app-sidebar__link-copy,
.app-shell.app-shell-sidebar-collapsed .app-sidebar__panel,
.app-shell.app-shell-sidebar-collapsed .app-sidebar__account-copy,
.app-shell.app-shell-sidebar-collapsed .app-sidebar__account-action-copy {
  display: none;
}

.app-shell.app-shell-sidebar-collapsed .app-sidebar__header {
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.app-shell.app-shell-sidebar-collapsed .app-sidebar__brand {
  justify-content: center;
  align-items: center;
}

.app-shell.app-shell-sidebar-collapsed .app-sidebar__brand-logo {
  width: 58px;
}

.app-shell.app-shell-sidebar-collapsed .app-sidebar__link {
  grid-template-columns: 1fr;
  justify-items: stretch;
  min-height: 56px;
  padding: 8px 6px;
  border-radius: 6px;
}

.app-shell.app-shell-sidebar-collapsed .app-sidebar__link-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border-radius: 4px;
  font-size: 0.7rem;
}

.app-shell.app-shell-sidebar-collapsed .app-sidebar__footer {
  margin-top: auto;
}

.app-sidebar__panel,
.app-sidebar__account {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
}

.app-sidebar__field {
  display: grid;
  gap: 8px;
}

.app-sidebar__field span,
.app-sidebar__account-copy span {
  color: rgba(237, 244, 251, 0.72);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-sidebar__field select {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(8, 18, 29, 0.46);
  color: #ffffff;
  font: inherit;
  padding: 8px 12px;
}

.app-sidebar__field select:focus {
  outline: 2px solid rgba(217, 42, 47, 0.28);
  outline-offset: 2px;
}

.app-sidebar__meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.env-pill {
  min-height: 30px;
  border-radius: 999px;
  padding: 4px 12px;
  border-color: rgba(169, 131, 52, 0.46);
  background: rgba(169, 131, 52, 0.18);
  color: #fff5d6;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
}

.app-sidebar__account {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 8px;
  padding: 12px 14px;
}

.app-sidebar__account-actions {
  display: grid;
  gap: 8px;
}

.app-sidebar__account-copy {
  display: block;
  min-width: 0;
}

.app-sidebar__account-copy strong {
  display: block;
  overflow: visible;
  color: #ffffff;
  font-size: 0.84rem;
  line-height: 1.32;
  overflow-wrap: anywhere;
  white-space: normal;
}

.app-sidebar__account-action {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 34px;
  width: 100%;
  padding: 0 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 760;
  text-decoration: none;
}

.app-sidebar__account-action-active {
  background: linear-gradient(180deg, rgba(217, 42, 47, 0.24), rgba(217, 42, 47, 0.1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.app-sidebar__account-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.app-sidebar__account-action-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-sidebar__account-action-copy {
  min-width: 0;
}

.app-sidebar__account-action:hover,
.app-sidebar__account-action:focus {
  background: rgba(255, 255, 255, 0.14);
  outline: 0;
}

.app-sidebar__account-action-active:hover,
.app-sidebar__account-action-active:focus {
  background: linear-gradient(180deg, rgba(217, 42, 47, 0.3), rgba(217, 42, 47, 0.14));
}

.app-shell.app-shell-sidebar-collapsed .app-sidebar__account {
  justify-items: center;
  padding: 10px 6px;
}

.app-shell.app-shell-sidebar-collapsed .app-sidebar__account-actions {
  width: 100%;
}

.app-shell.app-shell-sidebar-collapsed .app-sidebar__account-action {
  justify-content: center;
  min-height: 40px;
  padding: 0;
}

.app-shell__main {
  height: 100vh;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 0;
  padding: 12px 28px 0;
}

.app-topbar__menu {
  display: none;
  color: var(--brand-dark);
  border-color: rgba(17, 34, 51, 0.08);
  background: rgba(255, 255, 255, 0.78);
}

.app-main {
  width: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 12px 28px 34px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.app-shell__backdrop {
  display: none;
}

.button {
  min-height: 42px;
  border-radius: 14px;
  padding: 9px 16px;
  font-weight: 720;
  letter-spacing: -0.01em;
  box-shadow: none;
}

.button-primary {
  background: linear-gradient(180deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
}

.button-primary:hover,
.button-primary:focus {
  filter: brightness(1.02);
}

.button-secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
}

.button-secondary:hover,
.button-secondary:focus {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.flash-message {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-left-width: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shell-shadow-soft);
  padding: 14px 16px;
}

.page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  margin-bottom: 18px;
  padding: 20px 22px;
  border: 1px solid rgba(182, 196, 209, 0.56);
  border-radius: var(--shell-radius);
  background:
    linear-gradient(135deg, rgba(21, 36, 51, 0.04), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 252, 0.98));
  box-shadow: var(--shell-shadow-soft);
}

.page-header h2 {
  font-size: clamp(1.8rem, 2.2vw, 2.45rem);
  font-weight: 760;
  letter-spacing: -0.05em;
}

.page-header p {
  max-width: 72ch;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.55;
}

.page-header-actions {
  align-items: flex-start;
}

.app-kicker {
  color: var(--accent-strong);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

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

.workspace-summary-card {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid rgba(182, 196, 209, 0.56);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 252, 0.98));
  box-shadow: var(--shell-shadow-soft);
}

.workspace-summary-card span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-summary-card strong {
  font-size: clamp(1.55rem, 2.2vw, 2.1rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.workspace-summary-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.workspace-summary-card-primary {
  background:
    linear-gradient(135deg, rgba(217, 42, 47, 0.08), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 1));
}

.empty-state,
.form-shell,
.table-shell,
.auth-panel,
.detail-panel,
.option-set-list,
.option-values-list {
  border: 1px solid rgba(182, 196, 209, 0.56);
  border-radius: var(--shell-radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.98));
  box-shadow: var(--shell-shadow-soft);
}

.form-shell,
.auth-panel,
.detail-panel {
  padding: 22px;
}

.detail-panel {
  border-top: 0;
}

.panel-heading {
  margin-bottom: 18px;
}

.panel-heading h3,
.panel-heading h4,
.detail-panel h3,
.detail-panel h4 {
  letter-spacing: -0.03em;
}

.panel-subtitle,
.muted-text,
.inline-note,
.field-help {
  color: var(--muted);
}

.status-badge,
.summary-chip,
.data-chip {
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.status-badge {
  background: #e7f1fb;
  color: var(--accent-strong);
}

.status-badge-muted,
.summary-chip-subtle {
  background: #eef3f8;
  color: var(--muted);
}

.summary-chip {
  background: rgba(31, 90, 140, 0.1);
  color: var(--accent-strong);
}

.data-chip {
  border: 1px solid rgba(31, 90, 140, 0.12);
  border-left-width: 1px;
  background: rgba(31, 90, 140, 0.08);
}

.projects-summary-grid,
.roadmap-summary-grid,
.project-detail-summary-strip,
.assigned-task-summary-grid {
  margin-top: 0;
}

.project-status-board {
  grid-template-columns: repeat(5, minmax(260px, 1fr));
  align-items: stretch;
  height: calc(100vh - 176px);
  padding-bottom: 8px;
}

.project-status-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 20px;
  border-color: rgba(182, 196, 209, 0.56);
  background: linear-gradient(180deg, rgba(245, 248, 251, 0.98), rgba(236, 242, 248, 0.96));
  box-shadow: var(--shell-shadow-soft);
  overflow: hidden;
}

.project-status-column-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 12px 14px;
  border-bottom-color: rgba(182, 196, 209, 0.56);
}

.project-status-column-heading-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.project-status-column-heading h4 {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-status-column-create {
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(182, 196, 209, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-strong);
  font-size: 1.05rem;
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.project-status-column-create:hover,
.project-status-column-create:focus {
  border-color: rgba(22, 69, 104, 0.52);
  background: #ffffff;
  transform: translateY(-1px);
  outline: 0;
}

.project-status-list {
  min-height: 0;
  gap: 12px;
  padding: 14px;
  overflow-y: auto;
  align-content: start;
  align-items: start;
  grid-auto-rows: max-content;
}

.project-status-list .kanban-empty-column {
  min-height: 100%;
  border-radius: 16px;
  border-color: rgba(182, 196, 209, 0.76);
  background: rgba(255, 255, 255, 0.42);
}

.project-board-card {
  min-height: 0;
  align-self: start;
  padding: 0;
}

.project-board-card[data-project-draggable="true"] {
  cursor: grab;
}

.project-board-card-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.project-board-card-code {
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.project-board-card h5 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.project-board-card-owner {
  display: grid;
  gap: 2px;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
  overflow: visible;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
}

.project-board-card-owner span {
  color: #70808f;
  overflow-wrap: anywhere;
}

.project-board-card-owner strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.project-board-card {
  gap: 0;
  border-left-width: 4px;
  border-radius: 18px;
  padding: 14px;
  text-decoration: none;
}

.project-board-card-heading {
  align-items: start;
}

.project-board-card-title {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.project-board-card-code {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-board-card .task-card-content {
  gap: 12px;
}

.project-board-card .task-card h5,
.project-board-card h5 {
  font-size: 1rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.project-board-card-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--line);
}

.project-board-card-facts div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.9);
}

.project-board-card-facts dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-board-card-facts dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1.35;
}

.project-board-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.project-board-card-range {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.project-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  display: grid;
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid rgba(182, 196, 209, 0.56);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(21, 36, 51, 0.03), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 252, 1));
  box-shadow: var(--shell-shadow-soft);
}

.project-card__header,
.project-card__footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.project-card__identity {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.project-card__identity h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.project-card__code {
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.project-card__code:hover,
.project-card__code:focus {
  text-decoration: underline;
}

.project-card__badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.project-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.project-card__meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef3f8;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.project-card__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--line);
}

.project-card__facts div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.9);
}

.project-card__facts dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-card__facts dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.4;
}

.project-card__schedule {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid rgba(31, 90, 140, 0.12);
  border-radius: 18px;
  background: rgba(31, 90, 140, 0.05);
}

.project-card__schedule strong {
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.project-card__schedule span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.project-card__schedule-missing {
  border-color: rgba(169, 131, 52, 0.18);
  background: rgba(169, 131, 52, 0.08);
}

.project-card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.project-detail-actions {
  display: flex;
  justify-content: flex-end;
  margin: -2px 0 16px;
}

.project-tabs {
  gap: 10px;
  margin: 0 0 18px;
  padding: 10px;
  border: 1px solid rgba(182, 196, 209, 0.56);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(247, 250, 252, 0.98), rgba(236, 242, 248, 0.98));
  box-shadow: var(--shell-shadow-soft);
}

.project-tab {
  min-height: 42px;
  border-radius: 14px;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.66);
}

.project-tab-active {
  border-color: rgba(31, 90, 140, 0.12);
  color: var(--brand-dark);
  box-shadow: 0 12px 20px rgba(17, 34, 51, 0.08);
}

.project-tab-active::after {
  right: 12px;
  left: 12px;
  bottom: 5px;
  height: 3px;
}

.detail-layout,
.assigned-task-workspace,
.assigned-task-workboard,
.project-chat-workspace {
  gap: 18px;
}

.audit-strip,
.detail-grid,
.status-grid {
  border-radius: 18px;
  overflow: hidden;
}

.audit-strip div,
.detail-grid div,
.status-grid div {
  padding: 14px 16px;
}

.audit-strip dt,
.detail-grid dt,
.status-grid dt {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.audit-strip dd,
.detail-grid dd,
.status-grid dd {
  font-size: 0.96rem;
  line-height: 1.42;
}

.project-overview-summary-grid,
.assigned-task-detail-grid,
.roadmap-edit-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.roadmap-page-header {
  margin-bottom: 18px;
}

.roadmap-count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(21, 36, 51, 0.06);
  color: var(--accent-strong);
  font-size: 0.85rem;
  font-weight: 800;
}

.roadmap-filters-panel,
.roadmap-panel,
.roadmap-unscheduled-panel {
  padding: 18px 20px;
}

.roadmap-filter-form {
  display: block;
}

.roadmap-filter-row {
  align-items: flex-end;
  gap: 12px 14px;
}

.roadmap-filter-row .form-field {
  min-width: 180px;
}

.roadmap-filter-row .form-field label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.roadmap-filter-actions {
  align-items: flex-end;
}

.roadmap-filter-buttons {
  padding-top: 22px;
}

.roadmap-legend {
  gap: 8px 12px;
}

.roadmap-legend span:first-child {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.roadmap-grid {
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.roadmap-grid-row {
  grid-template-columns: minmax(320px, 344px) minmax(620px, 1fr);
}

.roadmap-grid-header {
  background: linear-gradient(180deg, rgba(244, 248, 252, 1), rgba(236, 242, 248, 1));
}

.roadmap-project-heading,
.roadmap-month-heading {
  min-height: 48px;
}

.roadmap-project-cell {
  gap: 6px;
  padding: 14px 18px 12px 16px;
}

.roadmap-project-cell::before {
  width: 5px;
}

.roadmap-project-title-row {
  gap: 0;
}

.roadmap-grip {
  width: 22px;
  margin-top: 2px;
  color: #7d8c9b;
}

.roadmap-project-trigger,
.roadmap-code-trigger,
.roadmap-project-title-block .table-row-link {
  max-width: 100%;
}

.roadmap-project-trigger,
.roadmap-project-title-block .table-row-link {
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.roadmap-project-meta {
  gap: 0;
}

.roadmap-project-dates {
  margin: 0;
  font-size: 0.82rem;
}

.roadmap-track {
  min-height: 88px;
}

.roadmap-bar {
  min-height: 32px;
  box-shadow: 0 14px 22px rgba(17, 34, 51, 0.12);
}

.roadmap-bar-content {
  justify-content: flex-start;
  padding-right: 14px;
}

.roadmap-bar-percentage {
  font-size: 0.8rem;
}

.roadmap-filter-field {
  min-width: 170px;
  margin: 0;
}

.roadmap-filter-field select {
  min-height: 38px;
  padding: 7px 34px 7px 12px;
  border-radius: 14px;
  font-size: 0.84rem;
  font-weight: 700;
}

.roadmap-filter-actions {
  align-items: center;
}

.roadmap-legend {
  gap: 8px 10px;
  font-size: 0.75rem;
}

.roadmap-legend-item {
  gap: 6px;
}

.roadmap-panel {
  padding: 16px 18px;
}

.roadmap-shell {
  margin-top: 0;
}

.roadmap-grid {
  border-radius: 18px;
}

.roadmap-grid-row {
  grid-template-columns: minmax(312px, 404px) minmax(720px, 1fr);
}

.roadmap-project-heading,
.roadmap-month-heading {
  min-height: 42px;
  font-size: 0.78rem;
}

.roadmap-project-cell {
  display: block;
  padding: 0;
  background: #ffffff;
}

.roadmap-project-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  min-height: 68px;
}

.roadmap-grid-row-draggable .roadmap-project-title-row {
  grid-template-columns: 28px minmax(0, 1fr);
}

.roadmap-row-handle {
  position: relative;
  width: 28px;
  min-height: 68px;
  padding: 0;
  border: 0;
  border-right: 1px solid rgba(201, 214, 230, 0.82);
  background: linear-gradient(180deg, rgba(247, 250, 252, 0.92) 0%, rgba(241, 245, 249, 0.96) 100%);
  cursor: grab;
}

.roadmap-row-handle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 28px;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle, rgba(100, 116, 139, 0.82) 1.4px, transparent 1.6px) 0 0 / 5px 7px,
    radial-gradient(circle, rgba(100, 116, 139, 0.82) 1.4px, transparent 1.6px) 5px 0 / 5px 7px;
}

.roadmap-row-handle:hover,
.roadmap-row-handle:focus-visible {
  background: linear-gradient(180deg, rgba(237, 244, 251, 0.98) 0%, rgba(226, 236, 248, 0.98) 100%);
  outline: none;
}

.roadmap-project-title-block {
  padding: 10px 16px 6px;
  gap: 4px;
  align-content: start;
}

.roadmap-project-trigger,
.roadmap-project-title-block .table-row-link {
  font-size: 0.9rem;
  line-height: 1.28;
}

.roadmap-code-trigger,
.roadmap-project-meta .table-action {
  font-size: 0.78rem;
  font-weight: 780;
}

.roadmap-project-dates {
  padding: 0;
  font-size: 0.74rem;
  font-weight: 700;
}

.roadmap-track {
  min-height: 68px;
  border-left: 1px solid #e2e8ee;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 151px,
      rgba(129, 145, 165, 0.12) 152px
    ),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  overflow: visible;
}

.roadmap-toolbar {
  gap: 10px 12px;
}

.roadmap-grid-row-draggable .roadmap-project-title-row {
  grid-template-columns: 28px minmax(0, 1fr);
}

.roadmap-bar {
  top: 8px;
  min-width: 18px;
  min-height: 26px;
  transform: none;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 12px rgba(16, 31, 50, 0.12);
}

.roadmap-bar-cap {
  width: 18px;
  height: 26px;
  margin-left: 0;
}

.roadmap-bar-content {
  justify-content: center;
  padding: 0 10px;
}

.roadmap-bar-percentage {
  font-size: 0.72rem;
  font-weight: 900;
}

.roadmap-bar-date {
  bottom: -16px;
  font-size: 0.68rem;
}

.roadmap-grid-row.roadmap-row-dragging {
  opacity: 0.74;
}

.roadmap-grid-row.roadmap-row-dragging .roadmap-project-cell,
.roadmap-grid-row.roadmap-row-dragging .roadmap-track {
  background: linear-gradient(180deg, rgba(242, 247, 252, 0.98) 0%, rgba(233, 241, 250, 0.98) 100%);
}

.roadmap-grid-row.roadmap-row-over-before,
.roadmap-grid-row.roadmap-row-over-after {
  position: relative;
}

.roadmap-grid-row.roadmap-row-over-before::before,
.roadmap-grid-row.roadmap-row-over-after::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(36, 92, 146, 0.42);
  z-index: 5;
}

.roadmap-grid-row.roadmap-row-over-before::before {
  top: -1px;
}

.roadmap-grid-row.roadmap-row-over-after::after {
  bottom: -1px;
}

.roadmap-unscheduled-card {
  gap: 16px;
  border-radius: 20px;
}

.assigned-task-layout {
  grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
  gap: 18px;
}

.assigned-task-list-panel,
.task-sidebar-panel,
.project-chat-sidebar,
.project-chat-history-panel,
.documents-library-panel {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
}

.assigned-task-link {
  gap: 12px;
  padding: 16px 18px;
}

.assigned-task-link-active {
  border-left-width: 4px;
  padding-left: 14px;
  background:
    linear-gradient(90deg, rgba(217, 42, 47, 0.06), transparent 26%),
    #fbfcfd;
}

.assigned-task-status-panel {
  top: 12px;
}

.task-sidebar-tabs {
  gap: 8px;
  padding: 8px;
  border-radius: 18px;
  background: #eef3f8;
}

.task-sidebar-tab {
  border-radius: 14px;
}

.task-sidebar-tab-active {
  box-shadow: 0 10px 18px rgba(17, 34, 51, 0.08);
}

.table-shell {
  overflow: hidden;
}

.data-table th {
  background: #f4f8fb;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
}

.data-table tbody tr:hover {
  background: rgba(31, 90, 140, 0.04);
}

.form-field input,
.form-field select,
.form-field textarea,
.table-input,
.option-filter-input {
  min-height: 44px;
  border-radius: 14px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.form-field textarea {
  min-height: 110px;
}

@media (min-width: 981px) {
  .roadmap-filter-form.roadmap-toolbar {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px 12px;
  }

  .roadmap-filter-form.roadmap-toolbar .roadmap-filter-field {
    flex: 0 0 220px;
    width: 220px;
    min-width: 220px;
    margin: 0;
  }

  .roadmap-filter-form.roadmap-toolbar .roadmap-filter-actions {
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
  }
}

.task-modal,
.roadmap-edit-modal {
  border: 0;
  background: transparent;
}

.task-modal-shell {
  border-radius: 26px;
  border: 1px solid rgba(182, 196, 209, 0.56);
  box-shadow: var(--shell-shadow-strong);
}

.task-modal-header {
  background:
    linear-gradient(135deg, rgba(21, 36, 51, 0.04), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 252, 1));
}

@media (max-width: 1280px) {
  .workspace-summary-grid,
  .projects-summary-grid,
  .roadmap-summary-grid,
  .project-detail-summary-strip,
  .assigned-task-summary-grid,
  .project-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-status-board {
    grid-template-columns: repeat(3, minmax(260px, 1fr));
    height: auto;
  }

  .roadmap-grid-row {
    grid-template-columns: minmax(280px, 320px) minmax(540px, 1fr);
  }
}

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

  .app-shell,
  .app-shell.app-shell-sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(320px, calc(100vw - 42px));
    padding: 16px;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: 0 22px 48px rgba(7, 15, 23, 0.28);
  }

  .app-shell.app-shell-sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .app-sidebar__inner {
    height: calc(100vh - 32px);
  }

  .app-topbar {
    padding: 16px 18px 0;
  }

  .app-topbar__menu {
    display: inline-flex;
  }

  .app-main {
    padding: 18px 18px 30px;
    overflow-y: auto;
  }

  .app-shell__backdrop {
    position: fixed;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(9, 18, 28, 0.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
    z-index: 35;
  }

  .app-shell.app-shell-sidebar-open .app-shell__backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .workspace-summary-grid,
  .projects-summary-grid,
  .roadmap-summary-grid,
  .project-detail-summary-strip,
  .assigned-task-summary-grid,
  .project-card-grid,
  .project-overview-summary-grid {
    grid-template-columns: 1fr;
  }

  .project-status-board {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    height: auto;
  }

  .page-header,
  .project-card__header,
  .project-card__footer,
  .roadmap-panel-heading {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .project-card__actions,
  .page-header-actions,
  .project-detail-actions {
    justify-content: flex-start;
  }

  .roadmap-grid {
    min-width: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .roadmap-grid-row,
  .roadmap-grid-header {
    grid-template-columns: 1fr;
  }

  .roadmap-project-cell {
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
  }

  .roadmap-track {
    border: 1px solid var(--line);
    border-radius: 18px;
  }
}

@media (max-width: 760px) {
  .page-header,
  .workspace-summary-card,
  .project-card,
  .detail-panel,
  .form-shell,
  .auth-panel {
    padding: 18px;
  }

  .app-topbar__title strong {
    font-size: 1.06rem;
  }

  .project-card__facts,
  .project-board-card-facts,
  .detail-grid,
  .status-grid,
  .audit-strip {
    grid-template-columns: 1fr;
  }

  .project-card__meta,
  .project-card__badges {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-tabs {
    padding: 8px;
  }

  .project-tab {
    flex: 1 1 auto;
    justify-content: center;
  }

  .project-status-board {
      grid-template-columns: 1fr;
      overflow-x: visible;
    }

  .project-status-column {
      min-width: 0;
      min-height: 0;
    }

  .app-sidebar__account {
    grid-template-columns: 1fr;
  }
}

/* Assigned tasks work surface: compact, task-first layout. */
.assigned-task-layout {
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 16px;
}

.assigned-task-list-panel {
  max-height: calc(100vh - 150px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.assigned-task-list-header {
  padding: 16px 18px 0;
}

.assigned-task-queue-heading {
  align-items: center;
}

.assigned-task-queue-heading h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.assigned-task-list {
  min-height: 0;
  margin-top: 12px;
  overflow-y: auto;
}

.assigned-task-link {
  gap: 8px;
  padding: 13px 18px;
}

.assigned-task-link h4 {
  font-size: 0.95rem;
  line-height: 1.25;
}

.assigned-task-link p {
  font-size: 0.82rem;
  line-height: 1.35;
  -webkit-line-clamp: 2;
}

.assigned-task-link .task-card-meta {
  gap: 6px;
}

.assigned-task-workspace {
  gap: 14px;
  padding: 18px 20px;
}

.assigned-task-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.assigned-task-title-block {
  min-width: 0;
}

.assigned-task-title-block h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.18;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.assigned-task-inline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.assigned-task-header-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.assigned-task-done-form {
  margin: 0;
}

.assigned-task-done-form .button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 14px;
  font-size: 0.84rem;
}

.assigned-task-detail-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-radius: 16px;
  overflow: hidden;
}

.assigned-task-detail-grid div {
  padding: 12px 14px;
}

.assigned-task-detail-grid dt {
  font-size: 0.7rem;
}

.assigned-task-detail-grid dd {
  font-size: 0.92rem;
  line-height: 1.35;
}

.assigned-task-section {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
}

.assigned-task-section h3,
.assigned-task-tab-heading {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.assigned-task-description {
  font-size: 0.94rem;
  line-height: 1.5;
}

.assigned-task-workboard {
  display: block;
}

.assigned-task-collaboration {
  padding: 14px;
}

.assigned-task-collaboration .task-sidebar-tabpanel {
  padding-top: 12px;
}

.assigned-task-comment-form,
.attachment-upload-form-inline {
  margin-top: 10px;
}

@media (max-width: 1180px) {
  .assigned-task-layout {
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  }

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

@media (max-width: 980px) {
  .assigned-task-layout {
    grid-template-columns: 1fr;
  }

  .assigned-task-list-panel {
    max-height: none;
  }

  .assigned-task-list {
    max-height: 42vh;
  }
}

@media (max-width: 760px) {
  .assigned-task-workspace,
  .assigned-task-collaboration {
    padding: 14px;
  }

  .assigned-task-detail-header {
    flex-direction: column;
  }

  .assigned-task-header-actions {
    justify-content: flex-start;
  }

  .assigned-task-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* KGS internal UI alignment overrides. Keep this section last. */
:root {
  --radius-sm: 3px;
  --radius-md: 5px;
  --radius-lg: 8px;
  --shell-radius: 6px;
  --shell-shadow-soft: none;
  --shell-shadow-strong: 0 18px 44px rgba(12, 24, 35, 0.22);
}

body {
  font-family: "Gotham", Arial, Helvetica, sans-serif;
}

.app-sidebar {
  padding: 14px;
  background: var(--brand-dark);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.app-sidebar__inner {
  gap: 14px;
  height: calc(100vh - 28px);
  padding: 4px;
}

.app-sidebar__brand {
  gap: 8px;
}

.app-sidebar__brand-logo {
  width: 94px;
  filter: none;
}

.app-sidebar__brand-copy strong,
.page-header h2,
.workspace-summary-card strong,
.assigned-task-section h3,
.assigned-task-tab-heading {
  letter-spacing: 0;
}

.app-sidebar__collapse,
.app-topbar__menu {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
}

.app-sidebar__nav {
  gap: 6px;
}

.app-sidebar__link {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  min-height: 42px;
  padding: 6px 8px;
  border-color: transparent;
  border-radius: var(--radius-md);
  background: transparent;
  box-shadow: none;
  transform: none;
}

.app-sidebar__link:hover,
.app-sidebar__link:focus {
  transform: none;
  background: rgba(255, 255, 255, 0.08);
}

.app-sidebar__link-active {
  border-color: rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--brand-red);
  background: rgba(11, 24, 36, 0.72);
  box-shadow: none;
}

.app-sidebar__link-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: transparent;
}

.app-sidebar__link-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-sidebar__panel,
.app-sidebar__account {
  border-radius: var(--radius-md);
}

.app-sidebar__field select,
.app-sidebar__account-action {
  border-radius: var(--radius-sm);
}

.page-header {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-color: var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: none;
}

.page-header h2 {
  font-size: 1.42rem;
  font-weight: 700;
}

.workspace-summary-card,
.empty-state,
.form-shell,
.table-shell,
.auth-panel,
.detail-panel,
.option-set-list,
.option-values-list,
.project-card,
.project-status-column,
.project-board-card,
.documents-library-panel,
.task-sidebar-panel,
.assigned-task-section,
.notification-summary-card,
.notification-policy-card,
.access-summary-card,
.access-member-card,
.documents-overview-card,
.project-chat-overview-card,
.version-card,
.linked-record-card,
.attachment-card {
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: none;
}

.detail-panel,
.form-shell,
.auth-panel {
  padding: 16px;
}

.button,
.button-primary,
.button-secondary,
.link-button,
.table-action,
.table-row-link,
.table-action-button,
.summary-chip,
.status-badge,
.env-pill {
  border-radius: var(--radius-sm);
}

.button-primary {
  background: var(--brand-red);
}

.button-primary:hover,
.button-primary:focus {
  background: var(--brand-red-dark);
}

.roadmap-page-title {
  margin-bottom: 10px;
}

.roadmap-filter-shell {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.roadmap-filter-shell summary {
  min-height: 38px;
  padding: 9px 12px;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}

.roadmap-filter-shell[open] summary {
  border-bottom: 1px solid var(--line);
}

.roadmap-filter-shell .roadmap-toolbar {
  margin: 0;
  padding: 10px 12px;
  border: 0;
  background: transparent;
}

.roadmap-panel,
.roadmap-shell,
.roadmap-grid,
.roadmap-track,
.roadmap-row-handle,
.roadmap-bar,
.roadmap-bar-button {
  box-shadow: none;
}

.roadmap-panel,
.roadmap-unscheduled-panel {
  border-radius: var(--radius-md);
}

.roadmap-bar,
.roadmap-bar-button {
  border-radius: var(--radius-sm);
}

@media (min-width: 761px) {
  .roadmap-filter-shell summary {
    display: none;
  }

  .roadmap-filter-shell[open] summary {
    border-bottom: 0;
  }
}

@media (max-width: 760px) {
  .page-header,
  .workspace-summary-card,
  .project-card,
  .detail-panel,
  .auth-panel {
    border-radius: var(--radius-md);
  }

  .anonymous-page__main {
    padding: 16px;
  }

  .auth-sign-in-button {
    width: 100%;
  }

  .roadmap-filter-shell:not([open]) .roadmap-toolbar {
    display: none;
  }
}

.detail-grid dt,
.status-grid dt,
.documents-card-meta dt,
.access-member-meta dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.record-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  margin: 0 0 10px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
}

.record-header-main {
  min-width: 0;
}

.record-header h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin: 0;
  color: var(--ink);
  font-size: 1.42rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.record-header-code {
  color: var(--brand-dark);
  font-weight: 850;
}

.record-header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.record-metadata-strip,
.record-detail-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 0 0 12px;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--line);
}

.record-metadata-strip div,
.record-detail-list div {
  min-width: 0;
}

.record-metadata-strip dt,
.record-detail-list dt,
.record-progress-list span {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.record-metadata-strip dd,
.record-detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 720;
  line-height: 1.28;
}

.record-detail-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 0;
}

.record-progress-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.record-progress-list section {
  min-width: 0;
  border-left: 3px solid var(--line);
  background: var(--surface-soft);
  padding: 10px 12px;
}

.record-progress-list strong {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.32;
}

.record-edit-form {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.record-form-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  max-width: 1180px;
}

.record-form-fields .form-field {
  min-width: 0;
}

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

.project-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.project-tab {
  min-height: 38px;
  padding: 9px 12px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
}

.project-tab:hover,
.project-tab:focus {
  background: var(--surface-soft);
  color: var(--ink);
}

.project-tab-active {
  border-bottom-color: var(--brand-red);
  background: transparent;
  color: var(--ink);
}

.project-tab-active::after {
  display: none;
}

.detail-layout {
  display: block;
}

.detail-panel {
  border-color: var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.panel-heading,
.project-chat-header,
.documents-upload-header,
.notification-policy-group-header,
.access-members-heading {
  min-height: 0;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h3,
.panel-heading h4,
.project-chat-header-main h3,
.project-chat-history-head h4,
.project-chat-compose-heading h4,
.documents-upload-header h4,
.notification-policy-group-header h4,
.access-section-copy h4 {
  font-size: 1rem;
  letter-spacing: 0;
}

.status-grid,
.detail-grid,
.specification-audit-strip,
.specification-import-meta,
.documents-card-meta,
.access-member-meta {
  border-radius: 0;
}

.project-overview-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

.detail-grid div,
.status-grid div {
  padding: 10px 12px;
}

.specification-form,
.specification-form-sections,
.version-list,
.notification-policy-form,
.access-member-list {
  gap: 12px;
}

.documents-library-panel,
.project-chat-history-panel,
.project-chat-compose-shell,
.specification-import-panel,
.specification-form-section,
.access-add-shell,
.access-members-shell,
.notification-policy-group {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: none;
}

.specification-form-section {
  padding: 14px;
}

.specification-panel-heading {
  align-items: flex-start;
}

.specification-panel-heading-main {
  min-width: 0;
}

.specification-panel-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.specification-summary-shell {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.specification-editor-form,
.specification-import-layout,
.specification-import-overview,
.specification-import-form-inline {
  min-width: 0;
}

.specification-form-section {
  padding: 14px;
}

.specification-import-panel {
  padding: 14px;
  border-color: var(--theme-border-soft);
  border-width: 1px;
  border-style: solid;
  background: var(--theme-surface-panel-soft);
}

.specification-form-section-imported {
  border-width: 1px;
  border-style: solid;
  background: var(--theme-surface-panel);
}

.specification-form-section.specification-form-section-manual {
  border-width: 1px;
  border-style: solid;
  background: var(--theme-surface-panel);
}

.specification-import-heading {
  align-items: flex-start;
  margin-bottom: 10px;
}

.specification-import-subtitle {
  max-width: 60ch;
}

.specification-import-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) minmax(360px, 1.4fr);
  gap: 14px;
  align-items: start;
}

.specification-import-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--theme-border-grid);
  border-radius: var(--radius-md);
  background: var(--theme-border-grid);
  overflow: hidden;
}

.specification-import-source {
  min-width: 0;
  background: var(--theme-surface-card-fact);
  padding: 12px 14px;
}

.specification-import-source dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.specification-import-source dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

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

.specification-import-file-field {
  margin-bottom: 0;
}

.specification-import-actions {
  justify-content: flex-start;
}

.specification-import-readonly {
  margin: 0;
  align-self: center;
}

.specification-audit-strip {
  margin: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.specification-form-actions {
  justify-content: flex-end;
  margin-top: 2px;
  padding-top: 4px;
  border-top: 1px solid var(--theme-border-soft);
}

@media (max-width: 1100px) {
  .specification-import-layout,
  .specification-import-form-inline {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .specification-panel-heading,
  .specification-import-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .specification-panel-heading-actions {
    justify-content: flex-start;
  }

  .specification-import-overview,
  .specification-audit-strip {
    grid-template-columns: 1fr;
  }
}

.project-chat-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 12px;
}

.project-chat-sidebar {
  gap: 12px;
}

.task-comment-card,
.project-chat-entry,
.attachment-card,
.access-member-card,
.notification-policy-card,
.version-card,
.linked-record-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: none;
}

.project-chat-entry-latest {
  border-left: 3px solid var(--brand-red);
}

.formulation-create-form {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.version-card-summary {
  min-height: 48px;
  padding: 10px 12px;
}

.version-card-body {
  padding: 12px;
}

.kanban-board {
  gap: 10px;
}

.kanban-column {
  border-radius: var(--radius-md);
}

.kanban-column-heading {
  min-height: 40px;
  padding: 9px 10px;
}

.task-card {
  border-radius: var(--radius-sm);
}

.documents-toolbar {
  margin-bottom: 12px;
}

.documents-upload-inline {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.documents-upload-header {
  align-items: center;
}

.documents-library-panel-public,
.documents-library-panel-confidential {
  margin-top: 12px;
}

.attachment-card-library {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 10px 12px;
}

.notification-policy-card {
  padding: 12px;
}

.notification-policy-card-header {
  align-items: center;
}

.notification-policy-card-header h5,
.notification-policy-block h6 {
  letter-spacing: 0;
}

.notification-policy-grid {
  gap: 12px;
}

.access-add-shell {
  margin-bottom: 12px;
  padding: 12px;
}

.access-add-form {
  grid-template-columns: minmax(240px, 1fr) minmax(180px, 240px) auto;
}

.access-member-card {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(260px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
}

.access-member-actions {
  justify-content: flex-end;
}

@media (max-width: 1180px) {
  .record-metadata-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .project-chat-workspace,
  .access-member-card,
  .access-add-form {
    grid-template-columns: 1fr;
  }

  .access-member-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .record-header,
  .record-metadata-strip,
  .record-detail-list,
  .record-progress-list,
  .record-form-fields {
    grid-template-columns: 1fr;
  }

  .record-header-actions {
    justify-content: flex-start;
  }

  .project-overview-summary-grid {
    grid-template-columns: 1fr;
  }

  .project-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .project-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .attachment-card-library {
    grid-template-columns: 1fr;
  }
}

html[data-color-mode="dark"] {
  color-scheme: dark;
  --page: #101820;
  --surface: #17222c;
  --surface-soft: #1d2a35;
  --ink: #f4f7f8;
  --muted: #a8b5be;
  --line: #33424d;
  --line-strong: #50606b;
  --accent: #3fa4ad;
  --accent-strong: #8bd1d7;
  --gold: #d2aa52;
}

@media (prefers-color-scheme: dark) {
  html[data-color-mode="auto"] {
    color-scheme: dark;
    --page: #101820;
    --surface: #17222c;
    --surface-soft: #1d2a35;
    --ink: #f4f7f8;
    --muted: #a8b5be;
    --line: #33424d;
    --line-strong: #50606b;
    --accent: #3fa4ad;
    --accent-strong: #8bd1d7;
    --gold: #d2aa52;
  }
}

html[data-color-mode="dark"] .form-field input,
html[data-color-mode="dark"] .form-field select,
html[data-color-mode="dark"] .form-field textarea,
html[data-color-mode="dark"] .table-input,
html[data-color-mode="dark"] .option-filter-input,
html[data-color-mode="dark"] .preference-choice,
html[data-color-mode="dark"] .profile-settings-user div {
  background: #111b24;
  color: var(--ink);
  border-color: var(--line);
}

@media (prefers-color-scheme: dark) {
  html[data-color-mode="auto"] .form-field input,
  html[data-color-mode="auto"] .form-field select,
  html[data-color-mode="auto"] .form-field textarea,
  html[data-color-mode="auto"] .table-input,
  html[data-color-mode="auto"] .option-filter-input,
  html[data-color-mode="auto"] .preference-choice,
  html[data-color-mode="auto"] .profile-settings-user div {
    background: #111b24;
    color: var(--ink);
    border-color: var(--line);
  }
}

.profile-settings-shell {
  display: grid;
  max-width: 920px;
  gap: 14px;
}

.profile-settings-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 16px;
}

.profile-settings-section__header {
  display: grid;
  grid-template-columns: minmax(180px, 0.5fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.profile-settings-section__header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 760;
}

.profile-settings-user {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.profile-settings-user div {
  min-width: 0;
  background: var(--surface-soft);
  padding: 10px 12px;
}

.profile-settings-user dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile-settings-user dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  font-weight: 700;
}

.profile-settings-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(280px, 1.15fr);
  gap: 16px;
  align-items: start;
}

.preference-choice-field {
  margin: 0;
  padding: 0;
  border: 0;
}

.preference-choice-field legend {
  margin-bottom: 7px;
  color: #202a32;
  font-size: 14px;
  font-weight: 760;
}

html[data-color-mode="dark"] .preference-choice-field legend {
  color: var(--ink);
}

@media (prefers-color-scheme: dark) {
  html[data-color-mode="auto"] .preference-choice-field legend {
    color: var(--ink);
  }
}

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

.preference-choice {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  padding: 8px 10px;
  color: var(--ink);
  font-weight: 760;
  cursor: pointer;
}

.preference-choice input {
  width: 17px;
  height: 17px;
  accent-color: var(--brand-red);
}

.preference-choice:has(input:checked) {
  border-color: var(--brand-red);
  box-shadow: inset 3px 0 0 var(--brand-red);
}

@media (max-width: 760px) {
  .profile-settings-section__header,
  .profile-settings-grid,
  .profile-settings-user,
  .preference-choice-grid {
    grid-template-columns: 1fr;
  }
}

/* Shared color-mode tokens and surface fixes. Keep this section last. */
:root {
  --theme-page-top: #f5f8fb;
  --theme-page-glow: rgba(31, 90, 140, 0.1);
  --theme-surface-panel: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.98));
  --theme-surface-panel-soft: rgba(255, 255, 255, 0.92);
  --theme-surface-panel-muted: #fbfcfd;
  --theme-surface-panel-strong: linear-gradient(180deg, rgba(244, 248, 252, 1), rgba(236, 242, 248, 1));
  --theme-surface-overlay: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 252, 1));
  --theme-surface-track: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  --theme-surface-track-drag: linear-gradient(180deg, rgba(242, 247, 252, 0.98) 0%, rgba(233, 241, 250, 0.98) 100%);
  --theme-surface-handle: linear-gradient(180deg, rgba(247, 250, 252, 0.92) 0%, rgba(241, 245, 249, 0.96) 100%);
  --theme-surface-handle-hover: linear-gradient(180deg, rgba(237, 244, 251, 0.98) 0%, rgba(226, 236, 248, 0.98) 100%);
  --theme-surface-tab-strip: transparent;
  --theme-surface-tab-hover: var(--surface-soft);
  --theme-surface-tab-active: transparent;
  --theme-surface-field: rgba(255, 255, 255, 0.92);
  --theme-surface-field-disabled: #f3f5f6;
  --theme-surface-selected: linear-gradient(90deg, rgba(217, 42, 47, 0.06), transparent 26%), #fbfcfd;
  --theme-surface-accent-soft: rgba(31, 90, 140, 0.08);
  --theme-surface-accent-soft-strong: rgba(31, 90, 140, 0.12);
  --theme-surface-accent-hover: rgba(31, 90, 140, 0.04);
  --theme-surface-danger-soft: #fff8f8;
  --theme-surface-warning-soft: #fffaf0;
  --theme-surface-success-soft: #eef6f6;
  --theme-surface-muted-soft: #eef3f8;
  --theme-surface-card-fact: rgba(255, 255, 255, 0.9);
  --theme-surface-board-empty: rgba(255, 255, 255, 0.42);
  --theme-border-soft: rgba(182, 196, 209, 0.56);
  --theme-border-strong: var(--line);
  --theme-border-header: #e4e8eb;
  --theme-border-grid: #e2e8ee;
  --theme-border-grid-soft: #edf1f5;
  --theme-border-contrast: rgba(201, 214, 230, 0.82);
  --theme-ink-label: #202a32;
  --theme-ink-subtle: #70808f;
  --theme-link-strong: #17304a;
  --theme-handle-dot: rgba(100, 116, 139, 0.82);
  --theme-track-grid-line: rgba(129, 145, 165, 0.12);
  --theme-shadow-panel: var(--shell-shadow-soft);
  --theme-shadow-modal: var(--shell-shadow-strong);
  --theme-shadow-card-active: 0 8px 18px rgba(12, 24, 35, 0.04);
  --theme-shadow-tab-active: none;
  --theme-shadow-roadmap-bar: 0 4px 12px rgba(16, 31, 50, 0.12);
  --theme-shadow-roadmap-grid: inset 0 1px 0 rgba(255, 255, 255, 0.56);
  --theme-backdrop: rgba(11, 24, 36, 0.58);
  --theme-row-indicator: rgba(36, 92, 146, 0.42);
}

html[data-color-mode="dark"] {
  --theme-page-top: #17232d;
  --theme-page-glow: rgba(63, 164, 173, 0.08);
  --theme-surface-panel: linear-gradient(180deg, rgba(23, 34, 44, 0.98), rgba(20, 30, 39, 1));
  --theme-surface-panel-soft: rgba(23, 34, 44, 0.94);
  --theme-surface-panel-muted: #1d2a35;
  --theme-surface-panel-strong: linear-gradient(180deg, rgba(30, 43, 54, 1), rgba(24, 36, 46, 1));
  --theme-surface-overlay: linear-gradient(180deg, rgba(27, 40, 51, 0.98), rgba(20, 31, 40, 1));
  --theme-surface-track: linear-gradient(180deg, #16212b 0%, #131c24 100%);
  --theme-surface-track-drag: linear-gradient(180deg, rgba(36, 50, 63, 0.98) 0%, rgba(30, 43, 54, 0.98) 100%);
  --theme-surface-handle: linear-gradient(180deg, rgba(29, 42, 53, 0.98) 0%, rgba(23, 34, 44, 1) 100%);
  --theme-surface-handle-hover: linear-gradient(180deg, rgba(36, 52, 65, 1) 0%, rgba(28, 41, 52, 1) 100%);
  --theme-surface-tab-strip: transparent;
  --theme-surface-tab-hover: rgba(255, 255, 255, 0.06);
  --theme-surface-tab-active: transparent;
  --theme-surface-field: #111b24;
  --theme-surface-field-disabled: #16212b;
  --theme-surface-selected: linear-gradient(90deg, rgba(227, 6, 19, 0.14), transparent 28%), rgba(24, 36, 46, 0.96);
  --theme-surface-accent-soft: rgba(63, 164, 173, 0.16);
  --theme-surface-accent-soft-strong: rgba(63, 164, 173, 0.22);
  --theme-surface-accent-hover: rgba(63, 164, 173, 0.12);
  --theme-surface-danger-soft: rgba(180, 52, 64, 0.16);
  --theme-surface-warning-soft: rgba(210, 170, 82, 0.15);
  --theme-surface-success-soft: rgba(63, 164, 173, 0.14);
  --theme-surface-muted-soft: rgba(255, 255, 255, 0.08);
  --theme-surface-card-fact: rgba(17, 27, 36, 0.88);
  --theme-surface-board-empty: rgba(255, 255, 255, 0.05);
  --theme-border-soft: rgba(62, 77, 90, 0.9);
  --theme-border-strong: #33424d;
  --theme-border-header: #33424d;
  --theme-border-grid: #33424d;
  --theme-border-grid-soft: rgba(82, 97, 108, 0.4);
  --theme-border-contrast: rgba(82, 97, 108, 0.72);
  --theme-ink-label: var(--ink);
  --theme-ink-subtle: #b5c0c9;
  --theme-link-strong: var(--ink);
  --theme-handle-dot: rgba(184, 198, 210, 0.76);
  --theme-track-grid-line: rgba(82, 97, 108, 0.36);
  --theme-shadow-panel: 0 14px 28px rgba(4, 10, 15, 0.18);
  --theme-shadow-modal: 0 24px 68px rgba(3, 9, 14, 0.56);
  --theme-shadow-card-active: 0 10px 24px rgba(3, 10, 15, 0.22);
  --theme-shadow-tab-active: none;
  --theme-shadow-roadmap-bar: 0 10px 20px rgba(3, 10, 15, 0.24);
  --theme-shadow-roadmap-grid: none;
  --theme-backdrop: rgba(4, 10, 15, 0.72);
  --theme-row-indicator: rgba(139, 209, 215, 0.52);
}

@media (prefers-color-scheme: dark) {
  html[data-color-mode="auto"] {
    --theme-page-top: #17232d;
    --theme-page-glow: rgba(63, 164, 173, 0.08);
    --theme-surface-panel: linear-gradient(180deg, rgba(23, 34, 44, 0.98), rgba(20, 30, 39, 1));
    --theme-surface-panel-soft: rgba(23, 34, 44, 0.94);
    --theme-surface-panel-muted: #1d2a35;
    --theme-surface-panel-strong: linear-gradient(180deg, rgba(30, 43, 54, 1), rgba(24, 36, 46, 1));
    --theme-surface-overlay: linear-gradient(180deg, rgba(27, 40, 51, 0.98), rgba(20, 31, 40, 1));
    --theme-surface-track: linear-gradient(180deg, #16212b 0%, #131c24 100%);
    --theme-surface-track-drag: linear-gradient(180deg, rgba(36, 50, 63, 0.98) 0%, rgba(30, 43, 54, 0.98) 100%);
    --theme-surface-handle: linear-gradient(180deg, rgba(29, 42, 53, 0.98) 0%, rgba(23, 34, 44, 1) 100%);
    --theme-surface-handle-hover: linear-gradient(180deg, rgba(36, 52, 65, 1) 0%, rgba(28, 41, 52, 1) 100%);
    --theme-surface-tab-strip: transparent;
    --theme-surface-tab-hover: rgba(255, 255, 255, 0.06);
    --theme-surface-tab-active: transparent;
    --theme-surface-field: #111b24;
    --theme-surface-field-disabled: #16212b;
    --theme-surface-selected: linear-gradient(90deg, rgba(227, 6, 19, 0.14), transparent 28%), rgba(24, 36, 46, 0.96);
    --theme-surface-accent-soft: rgba(63, 164, 173, 0.16);
    --theme-surface-accent-soft-strong: rgba(63, 164, 173, 0.22);
    --theme-surface-accent-hover: rgba(63, 164, 173, 0.12);
    --theme-surface-danger-soft: rgba(180, 52, 64, 0.16);
    --theme-surface-warning-soft: rgba(210, 170, 82, 0.15);
    --theme-surface-success-soft: rgba(63, 164, 173, 0.14);
    --theme-surface-muted-soft: rgba(255, 255, 255, 0.08);
    --theme-surface-card-fact: rgba(17, 27, 36, 0.88);
    --theme-surface-board-empty: rgba(255, 255, 255, 0.05);
    --theme-border-soft: rgba(62, 77, 90, 0.9);
    --theme-border-strong: #33424d;
    --theme-border-header: #33424d;
    --theme-border-grid: #33424d;
    --theme-border-grid-soft: rgba(82, 97, 108, 0.4);
    --theme-border-contrast: rgba(82, 97, 108, 0.72);
    --theme-ink-label: var(--ink);
    --theme-ink-subtle: #b5c0c9;
    --theme-link-strong: var(--ink);
    --theme-handle-dot: rgba(184, 198, 210, 0.76);
    --theme-track-grid-line: rgba(82, 97, 108, 0.36);
    --theme-shadow-panel: 0 14px 28px rgba(4, 10, 15, 0.18);
    --theme-shadow-modal: 0 24px 68px rgba(3, 9, 14, 0.56);
    --theme-shadow-card-active: 0 10px 24px rgba(3, 10, 15, 0.22);
    --theme-shadow-tab-active: none;
    --theme-shadow-roadmap-bar: 0 10px 20px rgba(3, 10, 15, 0.24);
    --theme-shadow-roadmap-grid: none;
    --theme-backdrop: rgba(4, 10, 15, 0.72);
    --theme-row-indicator: rgba(139, 209, 215, 0.52);
  }
}

body {
  background:
    radial-gradient(circle at top left, var(--theme-page-glow), transparent 26%),
    linear-gradient(180deg, var(--theme-page-top) 0%, var(--page) 100%);
}

.page-header,
.workspace-summary-card,
.empty-state,
.form-shell,
.table-shell,
.auth-panel,
.detail-panel,
.option-set-list,
.option-values-list,
.project-status-column,
.project-board-card,
.project-card,
.documents-library-panel,
.task-sidebar-panel,
.assigned-task-section,
.notification-summary-card,
.notification-policy-card,
.access-summary-card,
.access-member-card,
.documents-overview-card,
.project-chat-overview-card,
.version-card,
.linked-record-card,
.attachment-card,
.project-chat-compose-shell,
.documents-upload-inline,
.documents-activity-details,
.formulation-create-form,
.task-create-form,
.profile-settings-section,
.access-add-shell,
.access-members-shell,
.notification-policy-group,
.specification-import-panel,
.specification-form-section,
.roadmap-workspace-shell,
.roadmap-panel,
.roadmap-unscheduled-panel,
.roadmap-grid,
.roadmap-unscheduled-card,
.roadmap-edit-summary-section,
.roadmap-filter-shell,
.preference-choice,
.project-chat-entry,
.documents-library-panel-public,
.documents-library-panel-confidential {
  border-color: var(--theme-border-soft);
  background: var(--theme-surface-panel);
  box-shadow: var(--theme-shadow-panel);
}

.documents-library-panel,
.project-chat-history-panel,
.project-chat-sidebar,
.task-sidebar-panel,
.assigned-task-list-panel {
  background: var(--theme-surface-panel-soft);
}

.audit-strip,
.detail-grid,
.status-grid,
.profile-settings-user,
.project-board-card-facts,
.project-card__facts {
  border-color: var(--theme-border-strong);
  background: var(--theme-border-strong);
}

.audit-strip div,
.detail-grid div,
.status-grid div,
.profile-settings-user div,
.project-board-card-facts div,
.project-card__facts div,
.assigned-task-detail-grid div {
  background: var(--theme-surface-card-fact);
}

.project-status-column,
.project-tabs,
.task-sidebar-tabs {
  background: var(--theme-surface-panel-strong);
}

.kanban-column {
  border-color: var(--theme-border-soft);
  background: var(--theme-surface-panel-soft);
}

.kanban-column-heading {
  border-bottom-color: var(--theme-border-strong);
  background: var(--theme-surface-panel-muted);
}

.kanban-column-heading h4 {
  color: var(--ink);
}

.kanban-column-heading span,
.project-status-column-create {
  border-color: var(--theme-border-soft);
  background: var(--theme-surface-accent-soft);
  color: var(--accent-strong);
}

.kanban-task-list-drop-target {
  background: var(--theme-surface-accent-hover);
  box-shadow: inset 0 0 0 2px var(--theme-surface-accent-soft-strong);
}

.project-status-list .kanban-empty-column {
  background: var(--theme-surface-board-empty);
}

.kanban-empty-column {
  border-color: var(--theme-border-contrast);
  color: var(--muted);
}

.task-card {
  border-color: var(--theme-border-soft);
  background: var(--theme-surface-panel);
  box-shadow: var(--theme-shadow-panel);
}

.task-card:hover,
.task-card:focus {
  box-shadow: var(--theme-shadow-card-active);
}

.task-card h5,
.task-card p {
  color: var(--ink);
}

.task-card p {
  color: var(--theme-ink-subtle);
}

.task-card-meta span,
.linked-record-summary-meta span,
.linked-record-inline-meta span {
  border-color: var(--theme-border-soft);
  background: var(--theme-surface-muted-soft);
  color: var(--ink);
}

.project-tab {
  background: var(--theme-surface-tab-strip);
  color: var(--muted);
}

.project-tab:hover,
.project-tab:focus {
  background: var(--theme-surface-tab-hover);
  color: var(--ink);
}

.project-tab-active {
  background: var(--theme-surface-tab-active);
  color: var(--ink);
  box-shadow: var(--theme-shadow-tab-active);
}

.assigned-task-link:hover,
.assigned-task-link:focus,
.table-action-button:hover,
.table-action-button:focus,
.link-button.documents-action-link:hover,
.link-button.documents-action-link:focus,
.data-table tbody tr:hover {
  background: var(--theme-surface-accent-hover);
}

.assigned-task-link-active {
  background: var(--theme-surface-selected);
}

.status-badge {
  background: var(--theme-surface-accent-soft);
  color: var(--accent-strong);
}

.status-badge-muted,
.summary-chip-subtle,
.project-card__meta span,
.task-sidebar-tabs {
  background: var(--theme-surface-muted-soft);
  color: var(--muted);
}

.summary-chip,
.data-chip,
.project-card__schedule {
  background: var(--theme-surface-accent-soft);
}

.data-chip,
.project-card__schedule {
  border-color: var(--theme-surface-accent-soft-strong);
}

.flash-message,
.notice-success {
  background: var(--theme-surface-success-soft);
}

.flash-info,
.notice {
  background: var(--theme-surface-warning-soft);
}

.notice,
.notice-success {
  color: var(--ink);
}

.notice {
  border-left-color: var(--gold);
}

.notice-success {
  border-left-color: var(--accent);
}

.flash-error,
.flash-warning,
.link-button.documents-action-link.danger-link:hover,
.link-button.documents-action-link.danger-link:focus {
  background: var(--theme-surface-danger-soft);
}

.button-secondary,
.table-action-button,
.link-button.documents-action-link,
.modal-close-button {
  border-color: var(--theme-border-strong);
  background: var(--theme-surface-field);
  color: var(--ink);
}

.option-set-link,
.documents-overview-card,
.project-chat-overview-card,
.task-modal-section {
  background: var(--theme-surface-panel-muted);
}

.task-modal::backdrop,
.roadmap-edit-modal::backdrop {
  background: var(--theme-backdrop);
}

.task-modal-shell {
  border-color: var(--theme-border-soft);
  background: var(--theme-surface-panel);
  box-shadow: var(--theme-shadow-modal);
}

.task-modal-header {
  background: var(--theme-surface-overlay);
}

.task-modal-sidebar {
  border-left-color: var(--theme-border-strong);
  background: var(--theme-surface-panel-muted);
}

.task-sidebar-tabs {
  border-bottom-color: var(--theme-border-strong);
}

.task-sidebar-tab-active {
  background: var(--theme-surface-field);
  color: var(--ink);
  box-shadow: var(--theme-shadow-tab-active);
}

.task-sidebar-tab,
.task-sidebar-tab span,
.task-sidebar-tab strong {
  color: var(--muted);
}

.task-sidebar-tab:hover,
.task-sidebar-tab:focus {
  background: var(--theme-surface-tab-hover);
  color: var(--ink);
}

.task-sidebar-tab:hover span,
.task-sidebar-tab:hover strong,
.task-sidebar-tab:focus span,
.task-sidebar-tab:focus strong,
.task-sidebar-tab-active,
.task-sidebar-tab-active span,
.task-sidebar-tab-active strong {
  color: var(--ink);
}

.task-modal-footer {
  border-top-color: var(--theme-border-strong);
  background: linear-gradient(to top, var(--theme-surface-panel-soft) 72%, rgba(0, 0, 0, 0));
}

.roadmap-count-pill {
  background: var(--theme-surface-accent-soft);
  color: var(--accent-strong);
}

.roadmap-grid {
  box-shadow: var(--theme-shadow-roadmap-grid);
}

.roadmap-grid-header {
  background: var(--theme-surface-panel-strong);
}

.roadmap-grid-row {
  border-top-color: var(--theme-border-grid);
}

.roadmap-project-cell {
  background: var(--theme-surface-panel-soft);
}

.roadmap-project-heading,
.roadmap-month-heading,
.roadmap-toolbar-label span,
.roadmap-project-dates,
.roadmap-bar-date {
  color: var(--muted);
}

.roadmap-month-heading,
.roadmap-track-cell,
.roadmap-track,
.documents-activity-details[open] summary,
.project-chat-header,
.task-sidebar-tabs,
.panel-heading,
.project-chat-history-head,
.project-chat-compose-heading,
.documents-upload-header,
.notification-policy-group-header,
.access-members-heading,
.record-header,
.record-metadata-strip,
.record-detail-list {
  border-color: var(--theme-border-header);
}

.roadmap-track {
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 151px,
      var(--theme-track-grid-line) 152px
    ),
    var(--theme-surface-track);
}

.roadmap-row-handle {
  border-right-color: var(--theme-border-contrast);
  background: var(--theme-surface-handle);
}

.roadmap-row-handle::before {
  background:
    radial-gradient(circle, var(--theme-handle-dot) 1.4px, transparent 1.6px) 0 0 / 5px 7px,
    radial-gradient(circle, var(--theme-handle-dot) 1.4px, transparent 1.6px) 5px 0 / 5px 7px;
}

.roadmap-row-handle:hover,
.roadmap-row-handle:focus-visible {
  background: var(--theme-surface-handle-hover);
}

.roadmap-grid-row.roadmap-row-dragging .roadmap-project-cell,
.roadmap-grid-row.roadmap-row-dragging .roadmap-track {
  background: var(--theme-surface-track-drag);
}

.roadmap-grid-row.roadmap-row-over-before::before,
.roadmap-grid-row.roadmap-row-over-after::after {
  background: var(--theme-row-indicator);
}

.roadmap-bar {
  box-shadow: var(--theme-shadow-roadmap-bar);
}

.documents-overview-card-public,
.documents-library-panel-public {
  border-left-color: var(--accent);
}

.documents-overview-card-confidential,
.documents-library-panel-confidential {
  border-left-color: var(--brand-red);
}

.documents-overview-card-public {
  background:
    linear-gradient(135deg, rgba(63, 164, 173, 0.12), transparent 46%),
    var(--theme-surface-panel);
}

.documents-overview-card-confidential {
  background:
    linear-gradient(135deg, rgba(227, 6, 19, 0.12), transparent 46%),
    var(--theme-surface-panel);
}

.documents-upload-inline,
.project-chat-compose-shell,
.documents-activity-details,
.project-chat-overview-card,
.notification-policy-card,
.access-member-card,
.task-comment-card,
.task-activity-item {
  background: var(--theme-surface-panel-muted);
}

.notification-policy-group {
  border-color: var(--theme-border-soft);
  background: var(--theme-surface-panel-soft);
}

.notification-policy-card {
  border-color: var(--theme-border-soft);
}

.notification-policy-block {
  border-color: var(--theme-border-strong);
  background: var(--theme-surface-field);
}

.notification-policy-card-header,
.notification-policy-group-header {
  color: var(--ink);
}

.notification-policy-card-header h5,
.notification-policy-block h6,
.checkbox-field,
.toggle-field {
  color: var(--ink);
}

.checkbox-field-disabled {
  color: var(--muted);
}

.form-field label,
.preference-choice-field legend,
.roadmap-project-trigger,
.roadmap-project-title-block .table-row-link,
.roadmap-code-trigger,
.table-row-link,
.option-set-link,
.project-board-card-owner strong,
.record-header-code {
  color: var(--theme-link-strong);
}

.project-board-card-owner span {
  color: var(--theme-ink-subtle);
}

.version-inline-section,
.linked-record-create,
.linked-record-card {
  border-color: var(--theme-border-soft);
  background: var(--theme-surface-panel-muted);
}

.version-card {
  border-color: var(--theme-border-soft);
  background: var(--theme-surface-panel);
  box-shadow: none;
}

.version-card-summary {
  background: var(--theme-surface-panel);
}

.version-card-summary::after {
  border-color: var(--theme-border-strong);
  background: var(--theme-surface-panel-soft);
  color: var(--theme-link-strong);
}

.version-card[open] .version-card-summary {
  border-bottom-color: var(--theme-border-header);
}

.version-summary-label,
.formulation-read-label,
.formulation-user-entry-label,
.linked-record-field-label,
.formulation-meta-strip dt {
  color: var(--theme-ink-subtle);
}

.version-summary-title-block,
.version-summary-support {
  padding-left: 1px;
}

.version-summary-support {
  max-width: 720px;
}

.version-card-history:not([open]) {
  border-left-color: var(--theme-border-strong);
}

.version-meta {
  border-color: var(--theme-border-soft);
  background: var(--theme-border-soft);
}

.version-meta div {
  background: var(--theme-surface-panel-soft);
}

.version-meta dt {
  color: var(--theme-ink-subtle);
}

.version-meta dd {
  color: var(--ink);
}

.formulation-read-card {
  border-color: var(--theme-border-soft);
  background: color-mix(in srgb, var(--theme-surface-panel-soft) 90%, var(--theme-surface-panel));
}

.formulation-read-card-title {
  border-left: 3px solid var(--theme-border-strong);
}

.formulation-user-entry {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--theme-border-soft));
  border-left: 3px solid color-mix(in srgb, var(--accent) 58%, var(--theme-border-strong));
  background: color-mix(in srgb, var(--theme-surface-accent-soft) 72%, var(--theme-surface-panel));
}

.formulation-user-entry-secondary {
  border-left-color: color-mix(in srgb, var(--gold) 52%, var(--theme-border-strong));
  background: color-mix(in srgb, var(--theme-surface-warning-soft) 56%, var(--theme-surface-panel));
}

.formulation-meta-strip {
  border-color: var(--theme-border-soft);
  background: var(--theme-border-soft);
}

.formulation-meta-strip div {
  background: color-mix(in srgb, var(--theme-surface-panel-soft) 94%, var(--theme-surface-panel));
}

.formulation-meta-strip dd,
.linked-record-summary-field span:last-child {
  color: var(--ink);
}

.version-inline-section summary,
.linked-record-create summary,
.linked-record-summary {
  background: var(--theme-surface-panel-soft);
  color: var(--ink);
}

.version-inline-section[open] summary,
.linked-record-create[open] summary,
.linked-record-card[open] .linked-record-summary,
.linked-record-section {
  border-color: var(--theme-border-header);
}

.linked-record-group-secondary {
  background: var(--theme-surface-panel-soft);
}

.linked-record-group-secondary > summary,
.version-inline-section summary::after,
.linked-record-summary-meta,
.linked-record-inline-meta,
.task-activity-item blockquote {
  color: var(--muted);
}

.version-inline-section-muted {
  background: color-mix(in srgb, var(--theme-surface-panel-soft) 82%, var(--theme-surface-panel));
}

.linked-record-group > summary,
.linked-record-group-secondary > summary {
  background: color-mix(in srgb, var(--theme-surface-panel-soft) 92%, var(--theme-surface-panel));
}

.linked-record-summary-meta span,
.linked-record-inline-meta span,
.summary-chip,
.summary-chip-subtle {
  border-color: var(--theme-border-strong);
  background: var(--theme-surface-panel-soft);
}

.linked-record-summary-text,
.linked-record-summary-text-secondary {
  color: var(--ink);
}

.linked-record-summary-text {
  border-left-color: color-mix(in srgb, var(--accent) 42%, var(--theme-border-strong));
}

.linked-record-summary-text-secondary {
  border-left-color: color-mix(in srgb, var(--gold) 58%, var(--theme-border-strong));
}

.formulation-panel-heading {
  align-items: center;
}

.formulation-modal {
  width: min(780px, calc(100% - 28px));
}

.formulation-modal-compact {
  width: min(520px, calc(100% - 28px));
}

.formulation-modal-shell {
  min-height: auto;
}

.formulation-modal-main {
  gap: 16px;
}

.version-action-row-toolbar {
  margin-top: 2px;
  padding-bottom: 2px;
}

.linked-record-heading-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.linked-record-card-static {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.linked-record-card-static .linked-record-summary-static {
  padding: 0;
  cursor: default;
}

.linked-record-card-static .linked-record-summary-meta {
  justify-content: flex-start;
}

.linked-record-toolbar-inline {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--theme-border-soft, #e4e8eb);
  padding-top: 12px;
}

.linked-record-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.linked-record-card-secondary {
  background: var(--theme-surface-panel-soft, #f7f9fa);
}

@media (max-width: 960px) {
  .formulation-modal,
  .formulation-modal-compact {
    width: min(100%, calc(100% - 20px));
  }

  .version-card-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .version-summary-meta {
    justify-content: flex-start;
    min-width: 0;
  }

  .linked-record-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .linked-record-heading-main {
    justify-content: space-between;
  }

  .formulation-meta-strip {
    grid-template-columns: 1fr;
  }

  .linked-record-toolbar-inline,
  .linked-record-toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

.inline-note {
  background: var(--theme-surface-warning-soft);
  color: var(--ink);
}

.inline-note-accent {
  background: var(--theme-surface-accent-soft);
  color: var(--accent-strong);
}

.attachment-file-input,
.attachment-upload-form input[type="file"] {
  background: var(--theme-surface-field);
  border-color: var(--theme-border-strong);
  color: var(--ink);
}

.attachment-file-input::file-selector-button,
.attachment-upload-form input[type="file"]::file-selector-button {
  border-color: var(--theme-border-soft);
  background: var(--theme-surface-panel-muted);
  color: var(--ink);
}

.form-field input,
.form-field select,
.form-field textarea,
.table-input,
.option-filter-input,
.preference-choice,
.profile-settings-user div {
  background: var(--theme-surface-field);
  border-color: var(--theme-border-strong);
  color: var(--ink);
}

.form-field input[readonly],
.form-field input:disabled,
.form-field select:disabled,
.form-field textarea:disabled {
  background: var(--theme-surface-field-disabled);
}

.form-field label,
.preference-choice-field legend {
  color: var(--theme-ink-label);
}

html[data-color-mode="dark"] .project-tab,
html[data-color-mode="dark"] .project-tab:hover,
html[data-color-mode="dark"] .project-tab:focus,
html[data-color-mode="dark"] .project-tab-active,
html[data-color-mode="dark"] .project-tab-active:hover,
html[data-color-mode="dark"] .project-tab-active:focus {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

html[data-color-mode="dark"] .project-tab:not(.project-tab-active) {
  color: var(--muted);
}

html[data-color-mode="dark"] .form-field input,
html[data-color-mode="dark"] .form-field select,
html[data-color-mode="dark"] .form-field textarea,
html[data-color-mode="dark"] .table-input,
html[data-color-mode="dark"] .option-filter-input,
html[data-color-mode="dark"] .preference-choice,
html[data-color-mode="dark"] .profile-settings-user div,
html[data-color-mode="dark"] .access-role-select,
html[data-color-mode="dark"] .attachment-file-input,
html[data-color-mode="dark"] .attachment-upload-form input[type="file"] {
  background: var(--theme-surface-field);
  border-color: var(--theme-border-strong);
  color: var(--ink);
}

html[data-color-mode="dark"] .form-field input[readonly],
html[data-color-mode="dark"] .form-field input:disabled,
html[data-color-mode="dark"] .form-field select:disabled,
html[data-color-mode="dark"] .form-field textarea:disabled {
  background: var(--theme-surface-field-disabled);
}

@media (prefers-color-scheme: dark) {
  html[data-color-mode="auto"] .project-tab,
  html[data-color-mode="auto"] .project-tab:hover,
  html[data-color-mode="auto"] .project-tab:focus,
  html[data-color-mode="auto"] .project-tab-active,
  html[data-color-mode="auto"] .project-tab-active:hover,
  html[data-color-mode="auto"] .project-tab-active:focus {
    background: transparent;
    color: var(--ink);
    box-shadow: none;
  }

  html[data-color-mode="auto"] .project-tab:not(.project-tab-active) {
    color: var(--muted);
  }

  html[data-color-mode="auto"] .form-field input,
  html[data-color-mode="auto"] .form-field select,
  html[data-color-mode="auto"] .form-field textarea,
  html[data-color-mode="auto"] .table-input,
  html[data-color-mode="auto"] .option-filter-input,
  html[data-color-mode="auto"] .preference-choice,
  html[data-color-mode="auto"] .profile-settings-user div,
  html[data-color-mode="auto"] .access-role-select,
  html[data-color-mode="auto"] .attachment-file-input,
  html[data-color-mode="auto"] .attachment-upload-form input[type="file"] {
    background: var(--theme-surface-field);
    border-color: var(--theme-border-strong);
    color: var(--ink);
  }

  html[data-color-mode="auto"] .form-field input[readonly],
  html[data-color-mode="auto"] .form-field input:disabled,
  html[data-color-mode="auto"] .form-field select:disabled,
  html[data-color-mode="auto"] .form-field textarea:disabled {
    background: var(--theme-surface-field-disabled);
  }
}

.data-table th {
  background: var(--theme-surface-panel-strong);
  color: var(--muted);
}

.inactive-row,
.project-chat-entry-latest,
.documents-card-meta,
.access-member-meta {
  background: transparent;
}

.project-chat-entry-latest {
  box-shadow: var(--theme-shadow-card-active);
}

.record-header h1,
.record-header h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0;
  color: var(--ink);
  font-size: 1.42rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.record-header-code {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--theme-border-strong);
  border-radius: var(--radius-sm);
  background: var(--theme-surface-panel-strong);
  color: var(--theme-link-strong);
}

.record-metadata-strip,
.record-detail-list {
  gap: 10px 14px;
}

.overview-metadata-strip {
  margin-bottom: 16px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--theme-border-header);
}

.record-metadata-item,
.record-detail-item {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--theme-border-soft);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--theme-surface-panel-soft) 92%, var(--theme-surface-panel));
}

.record-metadata-item-status {
  border-left: 3px solid color-mix(in srgb, var(--accent) 58%, var(--theme-border-strong));
  background: color-mix(in srgb, var(--theme-surface-accent-soft) 56%, var(--theme-surface-panel-soft));
}

.record-metadata-item-progress {
  border-left: 3px solid color-mix(in srgb, var(--gold) 62%, var(--theme-border-strong));
  background: color-mix(in srgb, var(--theme-surface-warning-soft) 48%, var(--theme-surface-panel-soft));
}

.record-metadata-item-confidentiality {
  border-left: 3px solid color-mix(in srgb, var(--brand-red) 62%, var(--theme-border-strong));
  background: color-mix(in srgb, var(--theme-surface-danger-soft) 42%, var(--theme-surface-panel-soft));
}

.record-detail-item {
  background: color-mix(in srgb, var(--theme-surface-panel-muted) 84%, var(--theme-surface-panel));
}

.record-progress-list {
  gap: 14px;
}

.record-operational-note {
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--theme-border-soft));
  border-left: 3px solid color-mix(in srgb, var(--accent) 58%, var(--theme-border-strong));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--theme-surface-accent-soft) 72%, var(--theme-surface-panel));
  padding: 12px 14px;
}

.record-operational-note-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--theme-ink-subtle);
  font-size: 0.8rem;
  line-height: 1.35;
}

.project-tabs {
  margin-bottom: 14px;
  padding: 4px 6px 0;
  border: 1px solid var(--theme-border-header);
  border-radius: var(--radius-md);
  background: var(--theme-surface-panel-strong);
}

.project-tab {
  font-weight: 760;
}

.project-tab-active {
  background: color-mix(in srgb, var(--theme-surface-accent-soft) 46%, var(--theme-surface-panel-soft));
}

.project-detail-section {
  gap: 0;
  overflow: hidden;
  padding: 0;
  border-color: var(--theme-border-soft);
  background: var(--theme-surface-panel-soft);
}

.project-detail-section .panel-heading {
  margin: 0;
  padding: 12px 16px;
  background: var(--theme-surface-panel-strong);
}

.project-detail-section .attachment-card-list,
.project-detail-section .empty-inline {
  margin: 16px;
}

.project-detail-card {
  border-color: var(--theme-border-soft);
  background: var(--theme-surface-panel);
}

.project-detail-system-meta {
  color: var(--theme-ink-subtle);
}

.project-detail-user-content {
  display: block;
  margin: 8px 0 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--theme-border-soft));
  border-left: 3px solid color-mix(in srgb, var(--accent) 58%, var(--theme-border-strong));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--theme-surface-accent-soft) 72%, var(--theme-surface-panel));
  color: var(--ink);
  line-height: 1.5;
}

.status-badge {
  border: 1px solid var(--theme-surface-accent-soft-strong);
}

.status-badge-muted {
  border-color: var(--theme-border-soft);
}

.status-badge-success {
  border-color: color-mix(in srgb, #24754f 26%, var(--theme-border-soft));
  background: color-mix(in srgb, #24754f 16%, var(--theme-surface-panel-soft));
  color: color-mix(in srgb, #24754f 72%, var(--ink));
}

.status-badge-warning {
  border-color: color-mix(in srgb, var(--gold) 30%, var(--theme-border-soft));
  background: color-mix(in srgb, var(--gold) 16%, var(--theme-surface-panel-soft));
  color: color-mix(in srgb, var(--gold) 78%, var(--ink));
}

.status-badge-danger {
  border-color: color-mix(in srgb, var(--brand-red) 28%, var(--theme-border-soft));
  background: color-mix(in srgb, var(--brand-red) 14%, var(--theme-surface-panel-soft));
  color: color-mix(in srgb, var(--brand-red) 74%, var(--ink));
}

.project-chat-room {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: clamp(640px, calc(100vh - 240px), 860px);
  gap: 0;
  overflow: hidden;
  padding: 0;
  border-color: var(--theme-border-soft);
  background: var(--theme-surface-panel-soft);
}

.project-chat-thread-shell {
  flex: 1 1 320px;
  padding: 16px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.project-chat-empty-state {
  margin: 0;
}

.project-chat-thread {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100%;
  gap: 12px;
}

.project-chat-entry {
  gap: 8px;
  border-color: var(--theme-border-soft);
  border-left: 3px solid var(--theme-border-strong);
  background: color-mix(in srgb, var(--theme-surface-panel) 94%, var(--theme-surface-panel-soft));
  padding: 14px 16px;
}

.project-chat-entry-latest {
  border-left-color: var(--brand-red);
  background: color-mix(in srgb, var(--theme-surface-accent-soft) 28%, var(--theme-surface-panel));
}

.project-chat-entry-head {
  align-items: baseline;
}

.project-chat-entry-author strong {
  color: var(--theme-link-strong);
  font-size: 14px;
}

.project-chat-entry-time {
  color: var(--theme-ink-subtle);
}

.project-chat-compose-shell {
  padding: 10px 16px 14px;
  border-top: 1px solid var(--theme-border-header);
  background: var(--theme-surface-panel-strong);
}

.project-chat-compose-form {
  gap: 8px;
}

.project-chat-composer-label {
  margin: 0;
  color: var(--theme-ink-subtle);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-chat-composer-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 10px 10px 10px 12px;
  border: 1px solid var(--theme-border-strong);
  border-radius: var(--radius-md);
  background: var(--theme-surface-field);
}

.project-chat-composer-box:focus-within {
  border-color: color-mix(in srgb, var(--brand-red) 38%, var(--theme-border-strong));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-red) 16%, transparent);
}

.project-chat-textarea {
  min-height: 44px;
  max-height: 96px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  line-height: 1.45;
  resize: none;
  overflow-y: auto;
}

.project-chat-textarea:focus {
  outline: 0;
  box-shadow: none;
}

.project-chat-send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--brand-red);
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.16s ease, transform 0.16s ease;
}

.project-chat-send-button:hover,
.project-chat-send-button:focus {
  background: var(--brand-red-dark);
  transform: translateY(-1px);
  outline: 0;
}

.project-chat-send-button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  fill: none;
}

.documents-panel {
  gap: 12px;
}

.documents-panel > .panel-heading {
  margin-bottom: 0;
}

.documents-toolbar {
  margin-bottom: 0;
}

.documents-upload-inline {
  gap: 12px;
  padding: 14px 16px 16px;
  border-left: 4px solid color-mix(in srgb, var(--accent) 40%, var(--theme-border-soft));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--theme-surface-accent-soft) 24%, var(--theme-surface-panel-muted)) 0%, color-mix(in srgb, var(--theme-surface-panel-muted) 92%, var(--theme-surface-panel)) 100%);
}

.documents-upload-header {
  margin-bottom: 0;
}

.documents-upload-header-copy {
  display: grid;
  gap: 6px;
}

.documents-upload-header-copy h4 {
  margin: 0;
}

.documents-upload-inline .form-field {
  margin-bottom: 0;
}

.documents-upload-inline .attachment-upload-strip {
  grid-template-columns: minmax(320px, 620px) minmax(220px, 360px) auto;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
}

.documents-upload-action-label {
  visibility: hidden;
  display: block;
  min-height: 20px;
  font-size: 14px;
  font-weight: 760;
  line-height: 1.2;
}

.documents-upload-actions {
  align-self: start;
}

.documents-library-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.documents-library-panel {
  gap: 0;
  min-height: 0;
  padding: 0;
  border-width: 1px 1px 1px 4px;
  border-style: solid;
}

.documents-library-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--theme-border-header);
}

.documents-library-heading {
  display: grid;
  gap: 0;
  min-width: 0;
}

.documents-library-heading h4 {
  margin: 0;
}

.documents-library-intro {
  margin: 0;
  color: var(--theme-ink-subtle);
  font-size: 0.8rem;
  line-height: 1.42;
  max-width: 72ch;
}

.documents-section-chip,
.documents-visibility-chip {
  width: fit-content;
  border: 1px solid transparent;
  font-weight: 780;
}

.documents-count-badge {
  min-width: 38px;
  justify-content: center;
  align-self: start;
}

.documents-section-chip-public,
.documents-visibility-chip-public,
.documents-count-badge-public {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--theme-border-soft));
  background: color-mix(in srgb, var(--theme-surface-accent-soft) 72%, var(--theme-surface-panel));
  color: color-mix(in srgb, var(--accent-strong) 82%, var(--ink));
}

.documents-section-chip-confidential,
.documents-visibility-chip-confidential,
.documents-count-badge-confidential {
  border-color: color-mix(in srgb, var(--brand-red) 28%, var(--theme-border-soft));
  background: color-mix(in srgb, var(--theme-surface-danger-soft) 72%, var(--theme-surface-panel));
  color: color-mix(in srgb, var(--brand-red) 74%, var(--ink));
}

.documents-library-panel-public {
  border-left-color: color-mix(in srgb, var(--accent) 60%, var(--theme-border-soft));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--theme-surface-accent-soft) 18%, var(--theme-surface-panel-soft)) 0%, var(--theme-surface-panel-soft) 96px);
}

.documents-library-panel-public .documents-library-header {
  background: color-mix(in srgb, var(--theme-surface-accent-soft) 22%, var(--theme-surface-panel-strong));
}

.documents-library-panel-confidential {
  border-left-color: color-mix(in srgb, var(--brand-red) 62%, var(--theme-border-soft));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--theme-surface-danger-soft) 18%, var(--theme-surface-panel-soft)) 0%, var(--theme-surface-panel-soft) 96px);
}

.documents-library-panel-confidential .documents-library-header {
  background: color-mix(in srgb, var(--theme-surface-danger-soft) 22%, var(--theme-surface-panel-strong));
}

.documents-library-panel .attachment-card-list {
  margin: 12px 16px 16px;
}

.documents-card {
  border-color: var(--theme-border-soft);
  box-shadow: none;
}

.documents-card-public {
  border-left: 3px solid color-mix(in srgb, var(--accent) 52%, var(--theme-border-strong));
  background: color-mix(in srgb, var(--theme-surface-accent-soft) 12%, var(--theme-surface-panel));
}

.documents-card-confidential {
  border-left: 3px solid color-mix(in srgb, var(--brand-red) 52%, var(--theme-border-strong));
  background: color-mix(in srgb, var(--theme-surface-danger-soft) 12%, var(--theme-surface-panel));
}

.documents-library-panel .attachment-card-library {
  align-items: start;
  padding: 12px 14px;
}

.documents-library-panel .attachment-card-main {
  gap: 8px;
}

.documents-library-panel .attachment-card-title-row {
  align-items: center;
}

.documents-card-tags {
  justify-content: flex-start;
}

.documents-card-meta {
  grid-template-columns: repeat(3, minmax(120px, max-content));
  gap: 8px 18px;
}

.documents-library-panel .attachment-card-actions {
  justify-content: flex-end;
  gap: 8px;
  align-self: center;
}

.documents-library-panel.specification-import-panel,
.documents-library-panel.specification-form-section {
  border-width: 1px;
  border-left-width: 1px;
}

.specification-panel {
  display: grid;
  gap: 16px;
}

.specification-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--theme-border-soft);
}

.specification-panel-heading-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.specification-panel-mode-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.specification-panel-mode-strip .summary-chip-subtle,
.specification-command-chip,
.specification-surface-header .summary-chip-subtle {
  border-color: var(--theme-border-soft);
  background: color-mix(in srgb, var(--theme-surface-panel-soft) 82%, var(--theme-surface-panel) 18%);
  color: var(--muted);
}

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

.specification-summary-shell {
  display: grid;
  gap: 10px;
  margin-bottom: 0;
}

.specification-command-bar,
.specification-surface {
  border: 1px solid var(--theme-border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.specification-command-bar {
  background: color-mix(in srgb, var(--theme-surface-panel-soft) 78%, var(--theme-surface-panel) 22%);
}

.specification-command-bar-header,
.specification-surface-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--theme-border-soft);
}

.specification-command-bar-header {
  background: color-mix(in srgb, var(--theme-surface-panel-muted) 72%, var(--theme-surface-panel) 28%);
}

.specification-surface-header {
  background: color-mix(in srgb, var(--theme-surface-panel-soft) 64%, var(--theme-surface-panel) 36%);
}

.specification-command-bar-header h4,
.specification-surface-header h4,
.specification-edit-block-heading h5 {
  margin: 0;
  color: var(--ink);
}

.specification-command-bar-body {
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(360px, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px;
}

.specification-command-facts,
.specification-record-strip {
  margin: 0;
  display: grid;
  gap: 1px;
  border: 1px solid var(--theme-border-grid);
  border-radius: var(--radius-md);
  background: var(--theme-border-grid);
  overflow: hidden;
}

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

.specification-command-fact,
.specification-record-strip > div {
  min-width: 0;
  padding: 12px 14px;
  background: var(--theme-surface-panel);
}

.specification-command-fact dt,
.specification-record-strip dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.specification-command-fact dd,
.specification-record-strip dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.specification-command-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  min-width: 0;
}

.specification-command-form .validation-summary {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.specification-command-file-field {
  margin-bottom: 0;
  min-width: 0;
}

.specification-command-file-field input[type="file"] {
  width: 100%;
}

.specification-command-actions {
  margin: 0;
  padding: 0;
  justify-content: flex-start;
}

.specification-command-note {
  margin: 0;
  align-self: center;
}

.specification-record-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.specification-record-strip > div {
  background: color-mix(in srgb, var(--theme-surface-panel-muted) 76%, var(--theme-surface-panel) 24%);
}

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

.specification-edit-stack {
  display: grid;
  gap: 16px;
}

.specification-surface {
  background: var(--theme-surface-panel);
}

.specification-surface-imported {
  background: color-mix(in srgb, var(--theme-surface-panel) 88%, var(--theme-surface-panel-soft) 12%);
}

.specification-surface-manual {
  background: color-mix(in srgb, var(--theme-surface-panel) 80%, var(--theme-surface-panel-soft) 20%);
}

.specification-surface-body-imported {
  display: grid;
}

.specification-surface-manual .specification-surface-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.specification-edit-block {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 18px;
  padding: 18px 16px;
}

.specification-edit-block + .specification-edit-block {
  border-top: 1px solid var(--theme-border-soft);
}

.specification-edit-block-heading {
  align-self: start;
  min-width: 0;
  padding-top: 2px;
}

.specification-edit-block-heading h5 {
  font-size: 1rem;
  line-height: 1.3;
}

.specification-edit-block-body {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.specification-panel .form-grid,
.specification-panel .form-grid-compact {
  gap: 12px 16px;
}

.specification-panel .form-field {
  margin-bottom: 0;
}

.specification-surface textarea.textarea-compact {
  min-height: 104px;
}

.specification-form-actions {
  justify-content: flex-end;
  gap: 10px;
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid var(--theme-border-soft);
}

@media (max-width: 1180px) {
  .specification-command-bar-body,
  .specification-command-form,
  .specification-edit-block {
    grid-template-columns: 1fr;
  }

  .specification-edit-block {
    gap: 12px;
  }
}

@media (max-width: 900px) {
  .specification-record-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .specification-panel-heading,
  .specification-command-bar-header,
  .specification-surface-header {
    flex-direction: column;
    align-items: stretch;
  }

  .specification-panel-heading-actions {
    justify-content: flex-start;
  }

  .specification-command-facts,
  .specification-record-strip {
    grid-template-columns: 1fr;
  }

  .specification-command-bar-body,
  .specification-surface-manual .specification-surface-body,
  .specification-edit-block {
    padding: 14px;
  }
}

.documents-empty {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px dashed var(--theme-border-strong);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--theme-surface-panel-muted) 82%, var(--theme-surface-panel));
}

.documents-empty-public {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--theme-border-soft));
  background: color-mix(in srgb, var(--theme-surface-accent-soft) 24%, var(--theme-surface-panel));
}

.documents-empty-confidential {
  border-color: color-mix(in srgb, var(--brand-red) 34%, var(--theme-border-soft));
  background: color-mix(in srgb, var(--theme-surface-danger-soft) 22%, var(--theme-surface-panel));
}

.documents-activity-details {
  margin-top: 0;
  background: var(--theme-surface-panel-soft);
}

.documents-activity-details summary {
  min-height: 52px;
  background: var(--theme-surface-panel-strong);
}

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

.documents-activity-item {
  padding: 12px 14px;
  border: 1px solid var(--theme-border-soft);
  border-left: 3px solid color-mix(in srgb, var(--brand-dark) 42%, var(--theme-border-strong));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--theme-surface-panel-muted) 82%, var(--theme-surface-panel));
}

@media (max-width: 1180px) {
  .documents-library-panel .attachment-card-library {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .documents-library-panel .attachment-card-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .documents-upload-inline .attachment-upload-strip {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
  }

  .documents-library-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .documents-count-badge {
    width: fit-content;
  }

  .documents-card-meta {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .project-chat-room {
    display: flex;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  .project-chat-thread-shell,
  .project-chat-compose-shell {
    padding: 14px;
  }

  .project-chat-thread-shell {
    flex: 1 1 auto;
    overflow-y: auto;
  }

  .project-chat-thread {
    min-height: 100%;
    justify-content: flex-end;
  }

  .project-chat-entry {
    padding: 12px;
  }

  .project-chat-entry-head {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  .project-chat-composer-box {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .project-chat-send-button {
    justify-self: end;
  }
}

.app-main.app-main-chat-page {
  overflow: hidden;
}

.project-detail-page {
  min-width: 0;
}

.project-detail-page-chat {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 0;
  height: 100%;
  min-height: 0;
}

.project-detail-page-chat .record-header,
.project-detail-page-chat .record-metadata-strip,
.project-detail-page-chat .project-tabs {
  flex-shrink: 0;
}

.project-detail-page-chat .detail-layout,
.project-detail-page-chat .project-chat-panel {
  min-height: 0;
}

.project-detail-page-chat .detail-layout {
  height: 100%;
}

.project-detail-page-chat .project-chat-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  height: 100%;
  min-height: clamp(640px, calc(100vh - 240px), 860px);
}

.project-detail-page-chat .project-chat-room {
  min-height: 0;
  height: clamp(640px, calc(100vh - 240px), 860px);
}

@media (max-width: 980px) {
  .project-detail-page-chat {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    height: 100%;
    min-height: 0;
  }

  .project-detail-page-chat .detail-layout,
  .project-detail-page-chat .project-chat-panel,
  .project-detail-page-chat .project-chat-room,
  .project-chat-thread-shell {
    min-height: 0;
  }

  .project-detail-page-chat .detail-layout,
  .project-detail-page-chat .project-chat-panel,
  .project-detail-page-chat .project-chat-room {
    height: 100%;
  }

  .project-detail-page-chat .project-chat-panel,
  .project-detail-page-chat .project-chat-room {
    min-height: 0;
  }
}

.notification-policy-form {
  display: grid;
  gap: 16px;
}

.notification-policy-workbench {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 16px;
}

.notification-category-tabs {
  margin: 0;
}

.notification-category-tab {
  min-width: 0;
}

.notification-category-panel {
  gap: 0;
}

.notification-policy-table {
  display: grid;
  gap: 10px;
}

.notification-policy-table-header,
.notification-policy-row {
  display: grid;
  grid-template-columns: minmax(220px, 2.7fr) repeat(6, minmax(72px, 0.82fr));
  align-items: center;
  column-gap: 8px;
  min-width: 760px;
}

.notification-policy-table-header {
  padding: 0 14px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.notification-policy-table-header span:not(:first-child) {
  text-align: center;
}

.notification-policy-table-body {
  display: grid;
  gap: 8px;
}

.notification-policy-row {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  padding: 8px 14px;
}

.notification-policy-row-main {
  min-width: 0;
  padding: 4px 0;
}

.notification-policy-row-main strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.35;
}

.notification-policy-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin: 0;
  padding: 6px 4px;
}

.notification-policy-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.notification-policy-toggle-disabled {
  opacity: 0.5;
}

.notification-policy-mobile-label {
  display: none;
}

.notification-policy-actions {
  justify-content: flex-end;
}

.notification-policy-actions-sticky {
  position: sticky;
  bottom: 0;
  z-index: 3;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent 0%, var(--surface) 26%);
}

@media (max-width: 1040px) {
  .notification-policy-workbench {
    padding: 14px;
  }

  .notification-category-panel {
    overflow-x: auto;
    padding-bottom: 2px;
  }
}

@media (max-width: 900px) {
  .notification-category-tabs {
    flex-wrap: wrap;
    border-bottom: 0;
    padding-bottom: 0;
  }

  .notification-category-tab {
    flex: 1 1 180px;
  }

  .notification-policy-table-header {
    display: none;
  }

  .notification-policy-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    gap: 10px 14px;
    padding: 14px;
  }

  .notification-policy-row-main {
    grid-column: 1 / -1;
    padding: 0;
  }

  .notification-policy-toggle {
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--line);
    min-height: 0;
    padding: 10px 0 0;
  }

  .notification-policy-mobile-label {
    display: inline;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
  }
}

@media (max-width: 560px) {
  .notification-policy-row {
    grid-template-columns: 1fr;
  }

  .notification-category-tab {
    flex-basis: 100%;
  }
}
