:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #19212a;
  --muted: #697584;
  --line: #dce2e8;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #c2410c;
  --danger-bg: #fff3ed;
  --positive: #087f5b;
  --negative: #b42318;
  --shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  cursor: pointer;
  white-space: nowrap;
}

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

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 0 10px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

textarea {
  resize: vertical;
  line-height: 1.5;
  padding: 10px;
}

.work-note {
  min-height: 118px;
  border-width: 2px;
  background: #fffdf7;
}

label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

main {
  width: min(1500px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 36px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), transparent 36%),
    linear-gradient(315deg, rgba(8, 127, 91, 0.12), transparent 34%),
    var(--bg);
}

.login-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

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

h1 {
  font-size: 26px;
}

.brand-title {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.brand-title span:first-child {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.brand-title span:last-child {
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
}

h2 {
  font-size: 17px;
}

.hint,
.panel-head p,
.empty,
.list-row span {
  color: var(--muted);
}

.hint {
  margin: 0;
  font-size: 13px;
}

.topbar,
.toolbar,
.panel,
.list-row {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px 14px;
  box-shadow: var(--shadow);
}

.brand-block {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.page-tabs {
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fb;
  overflow-x: auto;
}

.page-tabs button {
  min-height: 32px;
  padding: 0 14px;
  background: transparent;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.page-tabs button.active {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.project-page {
  display: grid;
  gap: 12px;
}

.project-toolbar {
  display: grid;
  grid-template-columns: repeat(8, minmax(104px, 1fr));
  gap: 8px;
  align-items: end;
  padding: 10px;
}

.project-keyword {
  min-width: 0;
  grid-column: span 2;
}

.project-toolbar label span {
  margin-bottom: 4px;
  font-size: 11px;
}

.project-toolbar input,
.project-toolbar select {
  min-height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

.project-toolbar button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.project-list-panel {
  padding: 18px;
}

.project-list-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.project-module-sidebar {
  position: sticky;
  top: 12px;
  display: grid;
  align-content: start;
  gap: 4px;
  max-height: calc(100vh - 128px);
  padding: 10px;
  overflow: auto;
}

.project-module-sidebar-head {
  display: grid;
  gap: 2px;
  margin-bottom: 4px;
  padding: 0 2px 8px;
  border-bottom: 1px solid var(--line);
}

.project-module-sidebar-head strong {
  color: var(--text);
  font-size: 13px;
}

.project-module-sidebar-head span {
  color: var(--muted);
  font-size: 11px;
}

.project-module-sidebar-group {
  display: grid;
  gap: 2px;
}

.project-module-sidebar-project {
  margin: 6px 2px 2px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.compact-button {
  min-height: 30px;
  padding: 0 12px;
  font-size: 12px;
}

.project-scope-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.project-scope-tabs button {
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.project-scope-tabs button.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.18);
}

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

.project-card {
  width: 100%;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
}

.project-card:hover {
  border-color: #b8c4d2;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.project-progress-modal table {
  width: 100%;
  min-width: 1280px;
}

.modal.project-progress-modal {
  width: min(96vw, 1560px);
  height: calc(100vh - 48px);
  max-height: calc(100vh - 48px);
}

.project-progress-table {
  flex: 1;
  min-height: 0;
  max-height: none;
}

.project-progress-table th,
.project-progress-table td {
  text-align: center;
}

.project-progress-table th:first-child,
.project-progress-table td:first-child {
  text-align: left;
}

.project-progress-cell {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 48px;
  align-items: center;
  gap: 10px;
}

.project-progress-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.project-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #10b981);
}

.project-progress-cell strong {
  color: #334155;
  font-size: 12px;
  text-align: right;
}

.progress-version-link {
  font-size: 13px;
}

.modal.project-progress-detail-modal {
  width: min(94vw, 1380px);
  max-height: calc(100vh - 56px);
}

.project-progress-detail-table table {
  width: 100%;
  min-width: 900px;
}

.project-progress-detail-table th,
.project-progress-detail-table td {
  text-align: center;
  font-size: 13px;
}

.project-progress-detail-table th:first-child,
.project-progress-detail-table td:first-child,
.project-progress-detail-table th:nth-child(2),
.project-progress-detail-table td:nth-child(2) {
  text-align: left;
}

.modal.project-workload-modal {
  width: min(94vw, 1280px);
  max-height: calc(100vh - 56px);
}

.project-workload-summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
}

.project-workload-summary strong {
  color: var(--text);
}

.project-workload-table table {
  width: 100%;
  min-width: 1120px;
}

.project-workload-table th,
.project-workload-table td {
  text-align: center;
  font-size: 13px;
}

.project-workload-table th:nth-child(3),
.project-workload-table td:nth-child(3) {
  text-align: left;
}

.project-workload-table input[type="checkbox"] {
  width: 16px;
  min-height: 16px;
}

.workload-title {
  max-width: 260px;
  white-space: normal;
  word-break: break-word;
}

.workload-hours-input {
  width: 96px;
  min-height: 32px;
  text-align: right;
}

.project-card-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.project-card-main {
  flex: 1 1 auto;
  overflow: hidden;
}

.project-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.project-card-title strong {
  font-size: 16px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-meta {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
}

.project-meta > span:not(.priority-pill) {
  flex: 0 1 auto;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card-side {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 128px;
  max-width: calc(100% - 220px);
}

.project-code,
.project-type,
.status-pill,
.stage-pill,
.priority-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
}

.project-code {
  flex: 0 0 auto;
  color: #1f2937;
  background: #e5e7eb;
  font-family: Consolas, "Courier New", monospace;
  letter-spacing: 0;
  white-space: nowrap;
}

.project-type {
  flex: 0 0 auto;
}

.modal-code {
  vertical-align: middle;
  margin-left: 8px;
}

.project-type.requirement {
  color: #075985;
  background: #e0f2fe;
}

.project-type.bug {
  color: #b42318;
  background: #fee4e2;
}

.project-type.optimization {
  color: #087f5b;
  background: #dcfce7;
}

.status-pill {
  color: #334155;
  background: #eef2f7;
}

.priority-pill {
  flex: 0 0 70px;
  width: 70px;
  height: 22px;
  min-height: 22px;
  justify-content: center;
  overflow: hidden;
  white-space: nowrap;
}

.merge-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 1 auto;
  height: 24px;
  min-height: 24px;
  max-height: 24px;
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
  padding: 0 8px;
  border-radius: 6px;
  color: #166534;
  background: #dcfce7;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.merge-status-pill b {
  display: inline;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  color: #14532d;
  font: inherit;
  line-height: 1;
  white-space: nowrap;
}

.merge-status-pill b + b::before {
  content: ",";
  margin-right: 3px;
  color: #16a34a;
}

.priority-urgent {
  color: #991b1b;
  background: #fee2e2;
}

.priority-high {
  color: #9a3412;
  background: #ffedd5;
}

.priority-medium {
  color: #075985;
  background: #e0f2fe;
}

.priority-low {
  color: #166534;
  background: #dcfce7;
}

.stage-pill {
  width: 128px;
  min-width: 128px;
  height: 24px;
  justify-content: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-first {
  color: #075985;
  background: #e0f2fe;
}

.stage-second {
  color: #5b21b6;
  background: #ede9fe;
}

.stage-third {
  color: #9a3412;
  background: #ffedd5;
}

.stage-late {
  color: #166534;
  background: #dcfce7;
}

.stage-done {
  color: #475569;
  background: #e2e8f0;
}

.stage-closed {
  color: #991b1b;
  background: #fee2e2;
}

.project-item-modal {
  width: 90vw;
  height: 90vh;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-size: 12px;
}

.project-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 10px;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.project-item-form,
.project-flow-panel,
.project-transfer-box,
.project-history-box,
.setting-box {
  display: grid;
  gap: 8px;
}

.project-item-modal button {
  min-height: 26px;
  padding: 4px 8px;
  font-size: 11px;
}

.project-item-modal .icon-button {
  width: 26px;
  height: 26px;
  padding: 0;
}

.project-branch-tools {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  flex: 1;
  max-width: 1040px;
  flex-wrap: nowrap;
}

.branch-info,
.branch-target-field,
.merged-branch-field {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.branch-info {
  flex: 0 1 230px;
  width: 230px;
}

.merge-side-tools {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  min-width: 0;
  flex: 0 1 auto;
}

.merge-open-row {
  display: flex;
  align-items: end;
  gap: 5px;
  min-width: 0;
  flex: 0 0 auto;
}

.branch-label,
.branch-target-field span,
.merged-branch-field > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.branch-target-field select {
  width: 110px;
  height: 28px;
  min-height: 28px;
  padding: 3px 6px;
  font-size: 11px;
}

.branch-name {
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 3px 8px;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  color: #334155;
  background: #f8fafc;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 11px;
  line-height: 18px;
}

.branch-name-input {
  width: 100%;
  min-width: 0;
  height: 28px;
  border: 1px solid #dbe3ef;
  border-radius: 7px;
  padding: 3px 7px;
  color: #334155;
  background: #fff;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 11px;
}

.branch-name-input:read-only {
  color: #64748b;
  background: #f8fafc;
}

.branch-name-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

.branch-merge-button {
  align-self: end;
  min-height: 28px;
  padding: 0 8px;
  font-size: 11px;
  white-space: nowrap;
}

.project-branch-tools .icon-button {
  align-self: end;
  flex: 0 0 auto;
}

.merged-branch-field {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
}

.merged-branch-field > div {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 240px;
  overflow-x: auto;
  flex-wrap: nowrap;
}

.merge-mark {
  min-height: 20px;
  padding: 0 6px;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  color: #64748b;
  background: #f8fafc;
  font-size: 10px;
  white-space: nowrap;
}

.merge-mark.active {
  border-color: #86efac;
  color: #166534;
  background: #dcfce7;
}

.project-item-modal label > span,
.project-item-modal input,
.project-item-modal select,
.project-item-modal textarea {
  font-size: 12px;
}

.project-item-modal input,
.project-item-modal select,
.project-item-modal textarea {
  min-height: 30px;
  padding: 5px 7px;
}

.project-item-form {
  align-content: start;
  overflow: auto;
  padding-right: 4px;
}

.project-form-section {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.project-form-section h3 {
  margin: 0;
  font-size: 12px;
}

.compact-project-section {
  gap: 6px;
  padding: 8px;
}

.project-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.project-section-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.project-form-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.project-form-row.four-cols {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-form-row.assign-row {
  grid-template-columns: minmax(220px, 0.35fr);
}

.content-section {
  display: grid;
  gap: 10px;
  min-height: 500px;
}

.project-description-box,
.project-attachments,
.project-written-remarks,
.project-test-section,
.project-editor-section {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fbfdff;
  box-shadow: inset 3px 0 0 #dbeafe;
}

.project-attachments {
  box-shadow: inset 3px 0 0 #dcfce7;
}

.project-written-remarks {
  box-shadow: inset 3px 0 0 #fde68a;
}

.project-test-section {
  box-shadow: inset 3px 0 0 #e9d5ff;
}

.project-editor-section {
  box-shadow: inset 3px 0 0 #fecaca;
}

.content-section .project-section-head {
  min-height: 28px;
  padding-bottom: 7px;
  border-bottom: 1px solid #e2e8f0;
}

.content-section .project-section-head h3,
.project-editor-section > span {
  color: #1f2937;
  font-size: 13px;
  font-weight: 800;
}

.project-editor-section > span {
  display: block;
  padding-bottom: 7px;
  border-bottom: 1px solid #e2e8f0;
}

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

.project-description-item {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.project-description-item > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.project-description-item article {
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.project-description-item article > :first-child {
  margin-top: 0;
}

.project-description-item article > :last-child {
  margin-bottom: 0;
}

.project-test-section,
.project-test-list,
.project-test-item {
  display: grid;
  gap: 7px;
}

.project-test-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.project-test-add small {
  color: var(--muted);
  font-size: 11px;
}

.project-test-picker-modal {
  width: min(920px, 88vw);
  max-height: 86vh;
}

.top-backdrop {
  z-index: 80;
}

.project-test-picker-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 10px;
  min-height: 430px;
}

.project-test-picker-modules,
.project-test-picker-list {
  min-height: 0;
  overflow: auto;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fafc;
}

.project-test-picker-modules {
  display: flex;
  flex-direction: column;
  padding: 6px;
}

.project-test-picker-module {
  width: 100%;
  min-height: 26px;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #334155;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.project-test-picker-module:hover {
  background: #eef2ff;
}

.project-test-picker-module.active {
  color: #1d4ed8;
  background: #dbeafe;
}

.project-test-picker-module span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-test-picker-content {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.project-test-picker-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.project-test-picker-toolbar input {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}

.project-test-picker-toolbar span {
  color: var(--muted);
  font-size: 11px;
}

.project-test-picker-list {
  display: grid;
  align-content: start;
  padding: 6px;
  gap: 6px;
}

.project-test-picker-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 6px;
  padding: 7px;
  border: 1px solid #dbe3ef;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}

.project-test-picker-row input {
  width: 14px;
  min-height: 14px;
  margin-top: 2px;
}

.project-test-picker-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.project-test-picker-row strong {
  color: var(--text);
  font-size: 12px;
}

.project-test-picker-row span,
.project-test-picker-row p {
  color: var(--muted);
  font-size: 11px;
}

.project-test-picker-row p {
  max-height: 48px;
  overflow: hidden;
  white-space: pre-line;
  line-height: 1.45;
}

.project-test-item {
  overflow: hidden;
  padding: 0;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
}

.project-test-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 7px 8px;
  border-bottom: 1px solid #edf2f7;
  background: #f8fafc;
}

.project-test-title strong {
  color: var(--text);
  font-size: 12px;
}

.project-test-title span,
.project-test-item small {
  color: var(--muted);
  font-size: 11px;
}

.project-test-title em {
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.test-result-pending {
  color: #64748b;
  background: #f1f5f9;
}

.test-result-pass {
  color: #166534;
  background: #dcfce7;
}

.test-result-fail {
  color: #991b1b;
  background: #fee2e2;
}

.test-result-blocked {
  color: #92400e;
  background: #fef3c7;
}

.project-test-item details {
  margin: 7px;
  color: #475569;
  font-size: 12px;
}

.project-test-item summary {
  cursor: pointer;
  font-weight: 800;
}

.project-test-step-table {
  width: 100%;
  margin-top: 6px;
  border-collapse: collapse;
  table-layout: fixed;
  overflow: hidden;
  border: 1px solid #dbe3ef;
  border-radius: 7px;
  background: #fff;
}

.project-test-step-table th,
.project-test-step-table td {
  padding: 6px 7px;
  border: 1px solid #e2e8f0;
  vertical-align: top;
  overflow-wrap: anywhere;
  line-height: 1.45;
  font-size: 11px;
}

.project-test-step-table th {
  color: #334155;
  background: #eef2ff;
  font-weight: 800;
}

.project-test-step-table th:first-child,
.project-test-step-table td:first-child {
  width: 46px;
  text-align: center;
  color: #64748b;
  font-weight: 800;
}

.project-test-step-table tr:nth-child(even) td {
  background: #fbfdff;
}

.project-test-exec {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  padding: 7px;
  border-top: 1px solid #edf2f7;
  background: #fbfdff;
}

.quick-version-field {
  display: grid;
  align-content: end;
}

.quick-version-field > span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.quick-version-field > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

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

.assignment-section {
  background: #f8fafc;
  max-height: 190px;
  overflow: auto;
}

.assignment-stage-list,
.assignment-stage,
.assignment-dept,
.assignment-mini-list {
  display: grid;
  gap: 8px;
}

.assignment-stage-list {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  overflow-x: auto;
  overflow-y: auto;
  padding-bottom: 4px;
}

.assignment-stage {
  flex: 0 0 430px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.assignment-stage.reused {
  background: #f8fafc;
}

.assignment-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.assignment-stage-head em {
  color: #2563eb;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.assignment-dept {
  padding: 6px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fbfdff;
  min-width: 0;
}

.assignment-dept-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.assignment-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(90px, 1fr) 60px 52px auto;
  gap: 4px;
  align-items: center;
}

.assignment-row select,
.assignment-row input {
  min-height: 26px;
  padding: 3px 5px;
  font-size: 11px;
}

.assignment-dept-head strong,
.assignment-dept-head button {
  font-size: 11px;
}

.assignment-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 5px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: 11px;
  font-weight: 800;
}

.assignment-status.done,
.assignment-mini-item.done small {
  color: #087f5b;
}

.assignment-status.done {
  background: #dcfce7;
}

.project-current-line {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

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

.current-stage-person {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.current-stage-person.done {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.current-stage-person div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.current-stage-person strong {
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.current-stage-person span,
.current-stage-person small {
  color: var(--muted);
  font-size: 11px;
}

.current-stage-person.done small {
  color: #087f5b;
  font-weight: 800;
}

.small-action {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.assignment-mini-item {
  display: grid;
  gap: 3px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.assignment-mini-item span,
.assignment-mini-item small {
  color: var(--muted);
  font-size: 12px;
}

.assignment-mini-item strong {
  font-size: 12px;
}

.rich-editor-field {
  display: grid;
  gap: 8px;
}

.rich-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  background: #f8fafc;
}

.rich-editor {
  min-height: 360px;
  max-height: none;
  overflow: auto;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  padding: 8px;
  line-height: 1.6;
  background: #fff;
  outline: none;
}

.rich-editor img,
.project-description-item img,
.project-remark-item img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.rich-editor.remark-editor {
  min-height: 120px;
  max-height: 260px;
  border-top: 0;
}

.markdown-remark-input {
  min-height: 150px;
  max-height: 300px;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
}

.project-remark-markdown {
  display: block;
  width: 100%;
  min-height: auto;
  height: auto;
  max-height: none;
  overflow: visible;
  padding: 4px 0 0;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.project-remark-markdown > :first-child {
  margin-top: 0;
}

.project-remark-markdown > :last-child {
  margin-bottom: 0;
}

.project-remark-markdown h1,
.project-remark-markdown h2,
.project-remark-markdown h3,
.project-remark-markdown h4 {
  margin: 8px 0 6px;
  font-size: 14px;
  letter-spacing: 0;
}

.project-remark-markdown p {
  margin: 0 0 8px;
}

.project-remark-markdown ul,
.project-remark-markdown ol {
  margin: 0 0 8px 20px;
  padding: 0;
}

.project-remark-markdown blockquote {
  margin: 8px 0;
  padding: 8px 10px;
  border-left: 3px solid var(--primary);
  background: #f1f5f9;
  color: #475569;
}

.project-remark-markdown code {
  border-radius: 4px;
  padding: 1px 4px;
  background: #eef2f7;
  font-family: Consolas, "SFMono-Regular", monospace;
}

.project-remark-markdown pre {
  overflow: auto;
  margin: 8px 0;
  padding: 10px;
  border-radius: 6px;
  background: #111827;
  color: #f8fafc;
}

.project-remark-markdown pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.project-remark-markdown table {
  width: 100%;
  margin: 8px 0 10px;
  border-collapse: collapse;
  table-layout: auto;
}

.project-remark-markdown th,
.project-remark-markdown td {
  border: 1px solid var(--line);
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.55;
}

.project-remark-markdown th {
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
}

.remark-toolbar {
  border-radius: 8px 8px 0 0;
}

.hidden-file-input {
  display: none;
}

.rich-editor:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.rich-editor.readonly {
  background: #f8fafc;
}

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

.project-form-actions.editor-actions {
  padding: 6px 0 2px;
  border-top: 1px solid var(--line);
}

.project-flow-panel {
  align-content: start;
  overflow: auto;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.project-transfer-box,
.project-history-box {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.project-attachments {
  display: grid;
  gap: 8px;
}

.project-attachments-section,
.project-written-remarks {
  display: grid;
  gap: 8px;
}

.upload-button {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.upload-button.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.upload-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

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

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

.attachment-item.pending {
  grid-template-columns: minmax(0, 1fr) auto;
  background: #fffbeb;
}

.attachment-item small {
  color: var(--muted);
}

.project-remark-list {
  display: grid;
  gap: 6px;
}

.project-remark-item {
  display: grid;
  gap: 3px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.project-remark-item strong {
  font-size: 12px;
}

.project-remark-item span,
.project-remark-item p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.link-button {
  justify-self: start;
  min-height: auto;
  padding: 0;
  border: 0;
  color: var(--primary);
  background: transparent;
  text-align: left;
  overflow-wrap: anywhere;
}

.project-transfer-box h3,
.project-history-box h3,
.setting-box h3 {
  margin: 0;
  font-size: 12px;
}

.project-history-list {
  display: grid;
  gap: 10px;
  max-height: 330px;
  overflow: auto;
}

.project-history-item {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.project-history-item div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.project-history-item p,
.project-history-item small {
  margin: 0;
  color: var(--muted);
}

.project-settings-modal {
  width: min(1180px, calc(100vw - 28px));
  max-height: calc(100vh - 36px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-size: 12px;
}

.project-settings-modal button {
  min-height: 22px;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.project-settings-modal .icon-button {
  width: 22px;
  height: 22px;
  padding: 0;
}

.project-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: 220px minmax(0, 1fr);
  grid-auto-rows: 220px;
  gap: 8px;
  align-content: start;
  min-height: 0;
}

.setting-box {
  min-height: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  overflow: auto;
}

.project-config-box {
  grid-column: span 2;
}

.setting-box-head,
.setting-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.setting-box-head {
  justify-content: space-between;
  min-height: 24px;
  position: sticky;
  top: -10px;
  z-index: 1;
  padding-bottom: 4px;
  background: #fbfcfe;
}

.setting-row input,
.setting-row select {
  flex: 1;
  min-height: 28px;
  padding: 4px 7px;
  font-size: 11px;
}

.project-setting-row {
  align-items: center;
  gap: 6px;
}

.project-setting-row input:first-child {
  flex: 0 0 120px;
}

.project-setting-row input:nth-child(2) {
  flex: 1 1 240px;
}

.project-setting-row .merge-branch-editor {
  flex: 0 0 340px;
}

.merge-branch-editor {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 30px;
  padding: 3px 5px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
}

.merge-branch-tags {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 80px;
  min-height: 22px;
  max-height: 24px;
  overflow: auto;
  flex-wrap: nowrap;
}

.merge-branch-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 95px;
  min-height: 20px;
  padding: 1px 4px 1px 6px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.merge-branch-tag button {
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  border: 0;
  color: #64748b;
  background: transparent;
  font-size: 13px;
  line-height: 1;
}

.merge-branch-add {
  display: grid;
  grid-template-columns: 90px auto;
  gap: 4px;
  flex: 0 0 auto;
}

.merge-branch-add input {
  min-height: 24px;
  padding: 3px 6px;
  font-size: 11px;
}

.merge-branch-add button {
  min-height: 24px;
  padding: 0 7px;
  font-size: 11px;
}

.flow-stage-row {
  align-items: flex-start;
  gap: 6px;
  padding: 6px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
}

.stage-name-field {
  width: 150px;
  display: grid;
  gap: 4px;
  flex: 0 0 150px;
}

.stage-reuse-field {
  width: 120px;
  display: grid;
  gap: 4px;
  flex: 0 0 120px;
}

.stage-reuse-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.stage-name-field input,
.stage-reuse-field select {
  width: 100%;
}

.stage-index {
  width: auto;
  padding-top: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.flow-dept-picker {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 30px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.flow-dept-picker.disabled {
  align-items: center;
  background: #f8fafc;
}

.flow-reuse-note {
  color: #64748b;
  font-size: 11px;
}

.flow-dept-chip {
  min-height: 22px;
  padding: 2px 6px;
  border: 1px solid #cbd5e1;
  color: #334155;
  background: #f8fafc;
  font-size: 11px;
}

.flow-dept-chip.active {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
}

.flow-setting-box {
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.flow-setting-box > h3 {
  grid-column: 1 / -1;
}

.flow-type-box {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  min-height: 0;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  overflow: auto;
}

.flow-type-box .setting-box-head {
  top: -8px;
  background: #f8fafc;
}

.project-module-box,
.project-testcase-box {
  grid-column: 1 / -1;
  max-height: 330px;
}

.project-module-modal,
.project-testcase-modal {
  width: min(92vw, 1100px);
  max-height: calc(100vh - 56px);
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
}

.project-module-modal {
  width: min(88vw, 900px);
}

.project-testcase-modal {
  width: min(94vw, 1320px);
}

.project-testcase-manager {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 10px;
  min-height: 620px;
}

.project-testcase-sidebar {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 0;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px;
  background: #f8fafc;
}

.project-testcase-project-filter {
  display: grid;
  gap: 4px;
  margin-bottom: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.project-testcase-project-filter span {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.project-testcase-project-filter select {
  width: 100%;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  font-size: 12px;
}

.project-testcase-tree-project {
  display: grid;
  gap: 3px;
}

.project-test-picker-module.project-row {
  color: #0f172a;
  font-weight: 800;
}

.project-testcase-content {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  min-height: 0;
}

.project-testcase-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 320px) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
}

.project-testcase-toolbar > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.project-testcase-toolbar strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-testcase-toolbar span {
  color: #64748b;
  font-size: 11px;
}

.project-module-root-add,
.project-module-edit-line,
.project-module-child-add {
  display: grid;
  gap: 4px;
}

.project-module-root-add {
  grid-template-columns: minmax(0, 1fr) 74px;
}

.project-module-tree,
.project-module-tree-row {
  display: grid;
  gap: 4px;
}

.project-module-tree {
  padding: 0;
}

.project-module-tree-row {
  padding: 5px 6px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
}

.project-module-edit-line {
  grid-template-columns: minmax(0, 1fr) 52px 64px 52px;
  align-items: center;
}

.project-module-child-add {
  grid-template-columns: minmax(0, 1fr) 52px 52px;
  padding-left: 8px;
  border-left: 2px solid #dbeafe;
}

.project-module-modal input,
.project-module-modal button {
  min-height: 24px;
  padding: 2px 6px;
  font-size: 11px;
}

.project-module-modal .modal-head {
  min-height: 32px;
}

.project-module-modal .modal-head h2 {
  font-size: 16px;
}

.project-module-modal .modal-head p {
  font-size: 11px;
}

.project-module-form,
.project-testcase-form {
  display: grid;
  gap: 6px;
}

.project-module-form {
  grid-template-columns: 150px 170px minmax(0, 1fr) auto;
}

.project-testcase-form {
  padding: 8px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.project-testcase-form-head,
.project-testcase-basic,
.project-testcase-edit-grid,
.project-testcase-subhead,
.project-testcase-step-edit {
  display: grid;
  gap: 6px;
}

.project-testcase-form-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.project-testcase-form-head strong {
  font-size: 13px;
}

.project-testcase-form-head div,
.project-testcase-subhead {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.project-testcase-basic {
  grid-template-columns: 170px 190px minmax(0, 1fr);
}

.project-testcase-edit-grid {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.project-testcase-steps-edit {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.project-testcase-subhead {
  justify-content: space-between;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.project-testcase-step-edit {
  grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr) 48px;
  align-items: center;
}

.project-testcase-step-head {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) minmax(0, 1fr) 48px;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  color: #334155;
  background: #eef2ff;
  font-size: 11px;
  font-weight: 800;
}

.project-testcase-step-edit span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: #e0f2fe;
  color: #075985;
  font-size: 11px;
  font-weight: 700;
}

.project-testcase-form textarea {
  min-height: 86px;
  height: 86px;
  resize: vertical;
}

.project-module-list,
.project-testcase-list {
  display: grid;
  gap: 5px;
  overflow: auto;
}

.project-module-row,
.project-testcase-row {
  display: grid;
  align-items: center;
  gap: 6px;
  padding: 7px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
}

.project-testcase-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.project-testcase-row.editing {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.project-module-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.project-testcase-row button,
.project-testcase-form button,
.project-testcase-toolbar button {
  min-height: 24px;
  padding: 2px 8px;
  font-size: 11px;
}

.project-testcase-row select,
.project-testcase-row input,
.project-testcase-form select,
.project-testcase-form input,
.project-testcase-toolbar select,
.project-testcase-toolbar input {
  min-height: 26px;
  padding: 2px 7px;
  font-size: 12px;
}

.project-testcase-row-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.project-testcase-row-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.project-testcase-row-head strong {
  min-width: 0;
  color: #0f172a;
  font-size: 12px;
}

.project-testcase-row span {
  color: var(--muted);
  font-size: 11px;
}

.project-testcase-row-actions {
  display: flex;
  gap: 5px;
}

.testcase-library-table {
  margin-top: 0;
}

.project-test-steps {
  margin: 4px 0 8px 20px;
  padding: 0;
}

.project-test-steps li {
  display: grid;
  gap: 2px;
  margin: 4px 0;
}

.project-test-steps em {
  color: #64748b;
  font-style: normal;
  font-size: 12px;
}

.userbar,
.toolbar,
.row-actions,
.inline-form,
.account-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.userbar {
  align-items: flex-end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 12px;
}

.user-summary {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.user-summary strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.user-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  padding: 2px;
  border: 1px solid transparent;
  border-radius: 6px;
}

.top-action {
  min-height: 26px;
  padding: 0 8px;
  border-radius: 5px;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.top-action:hover {
  background: #f1f5f9;
  color: #334155;
}

.top-action.muted-action {
  color: #94a3b8;
}

.toolbar {
  margin: 18px 0;
  padding: 14px;
  flex-wrap: wrap;
}

.toolbar label {
  width: 180px;
}

.toolbar .search-field {
  width: 220px;
}

.employee-search-input {
  margin-bottom: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  background: #e7f7ef;
  color: var(--positive);
  font-size: 13px;
  font-weight: 700;
}

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

.primary {
  background: var(--primary);
  color: white;
}

.primary:hover {
  background: var(--primary-dark);
}

.secondary {
  background: #e8eefc;
  color: var(--primary-dark);
}

.ghost {
  background: #eef1f4;
  color: #334155;
}

.danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.link-button {
  min-height: auto;
  border-radius: 4px;
  padding: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  text-align: left;
}

.link-button:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.icon-button {
  width: 38px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.wide {
  width: 100%;
}

.message {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 3000;
  max-width: min(420px, calc(100vw - 36px));
  margin: 0;
  border: 1px solid #b7e4cf;
  border-radius: 8px;
  padding: 12px 14px;
  background: #edf7f2;
  color: var(--positive);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  font-size: 14px;
  line-height: 1.5;
}

.message.error {
  border-color: #f3b8b8;
  background: var(--danger-bg);
  color: var(--danger);
}

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

.lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(360px, 0.8fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

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

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.quick-stats div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #f8fafc;
}

.quick-stats span,
.quick-stats strong {
  display: block;
}

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

.quick-stats strong {
  margin-top: 6px;
  font-size: 22px;
}

.panel {
  padding: 16px;
}

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

.panel-head p {
  margin: 4px 0 0;
  font-size: 13px;
}

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

.summary-panel {
  min-width: 0;
}

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

table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
}

th,
td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  font-size: 14px;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
}

.sort-header {
  min-height: auto;
  width: 100%;
  justify-content: center;
  border-radius: 4px;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
}

.sort-header:hover {
  color: var(--primary);
  text-decoration: underline;
}

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

td:last-child,
th:last-child {
  border-right: 0;
}

.sticky-left {
  position: sticky;
  left: 0;
  z-index: 3;
  background: inherit;
  min-width: 120px;
}

td.sticky-left {
  background: #fff;
}

.sticky-left small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.positive {
  color: var(--positive);
  font-weight: 700;
}

.negative {
  color: var(--negative);
  font-weight: 700;
}

.empty {
  text-align: center;
  padding: 24px;
}

.empty.compact {
  padding: 12px 0 0;
  margin: 0;
}

.panel form {
  display: grid;
  gap: 12px;
}

.score-items {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.06), rgba(37, 99, 235, 0.01)),
    #fcfdff;
}

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

.score-items-head strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.score-items-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

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

.score-count {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  background: #e0ecff;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

.score-item-row {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d7e4fb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.score-item-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.score-item-index {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.score-item-index span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.score-item-fields {
  display: grid;
  gap: 12px;
}

.score-item-score,
.score-item-note {
  min-width: 0;
}

.score-item-score {
  width: 100%;
  max-width: 220px;
}

.score-item-note {
  width: 100%;
}

.compact-note {
  min-height: 132px;
  background: #fffcf2;
}

.score-item-remove {
  flex: 0 0 auto;
  min-width: 72px;
  padding: 0 12px;
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr)) auto auto auto;
  margin-bottom: 12px;
}

.employee-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr 150px;
  gap: 14px;
  align-items: end;
}

.form-group {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.form-group h3 {
  margin: 0;
  color: #334155;
  font-size: 13px;
}

.check-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.form-submit {
  min-width: 0;
}

.account-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto auto auto;
  margin-bottom: 12px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.check input {
  width: 16px;
  min-height: 16px;
}

.check span {
  margin: 0;
  color: var(--text);
}

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

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
}

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

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

.employee-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(360px, auto);
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.employee-main {
  min-width: 0;
}

.employee-title,
.employee-meta,
.employee-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.employee-title strong {
  font-size: 16px;
}

.name-edit-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.name-edit-button:hover {
  color: var(--primary);
  text-decoration: underline;
}

.inline-edit-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary-dark);
  font: inherit;
  cursor: pointer;
}

.inline-edit-button:hover {
  color: var(--primary);
  text-decoration: underline;
}

.employee-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: #eef6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.status-pill.off {
  background: #f1f5f9;
  color: #64748b;
}

.status-pill.accent {
  background: #e7f7ef;
  color: var(--positive);
}

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

.employee-actions button {
  min-height: 34px;
  padding: 0 11px;
}

.compact-table {
  max-height: 420px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  min-height: calc(100vh - 138px);
}

.docs-sidebar,
.doc-editor {
  min-height: 660px;
}

.docs-sidebar {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.docs-sidebar-head {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
}

.docs-sidebar-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.docs-sidebar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.docs-sidebar-actions button {
  min-width: 0;
  padding: 0 10px;
}

.docs-sidebar-actions .doc-action-icon {
  position: relative;
  width: 100%;
  min-height: 34px;
  padding: 0;
  color: #475569;
}

.docs-sidebar-actions .doc-action-icon::before,
.docs-sidebar-actions .doc-action-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform-origin: center;
}

.docs-sidebar-actions .expand-all::before {
  top: 9px;
  transform: translateX(-50%) rotate(45deg);
}

.docs-sidebar-actions .expand-all::after {
  top: 15px;
  transform: translateX(-50%) rotate(45deg);
}

.docs-sidebar-actions .collapse-all::before {
  top: 13px;
  transform: translateX(-50%) rotate(225deg);
}

.docs-sidebar-actions .collapse-all::after {
  top: 19px;
  transform: translateX(-50%) rotate(225deg);
}

.doc-tree {
  flex: 1;
  overflow: auto;
  padding: 8px;
}

.doc-tree-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  margin-bottom: 3px;
  padding-top: 0;
  padding-right: 8px;
  padding-bottom: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #334155;
  cursor: pointer;
  font-size: 13px;
}

.doc-tree-row:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.doc-tree-row.active {
  background: #e8eefc;
  border-color: #b7c8f8;
  color: var(--primary-dark);
}

.doc-tree-row.folder {
  cursor: pointer;
  color: #475569;
  font-weight: 650;
}

.doc-node-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 23px;
  width: 23px;
  height: 23px;
  border-radius: 5px;
  background: #eef2f7;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
}

.doc-toggle-button {
  position: relative;
  min-height: 23px;
  border: 1px solid #dce5ef;
  padding: 0;
  cursor: pointer;
  background: #f8fafc;
  color: #64748b;
  font-size: 0;
}

.doc-toggle-button::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateX(-1px) rotate(-45deg);
}

.doc-toggle-button.expanded::before {
  transform: translateY(-2px) rotate(45deg);
}

.doc-toggle-button:hover {
  background: #dbe7ff;
  border-color: #b7c8f8;
  color: var(--primary-dark);
}

.doc-tree-row.active .doc-node-icon {
  background: #dbe7ff;
  color: var(--primary-dark);
}

.doc-node-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-node-tools {
  display: none;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.doc-tree-row:hover .doc-node-tools {
  display: inline-flex;
}

.mini-button {
  min-height: 26px;
  padding: 0 8px;
  font-size: 12px;
}

.doc-create-form {
  display: grid;
  gap: 16px;
  border-bottom: 0;
}

.doc-create-form input {
  min-height: 46px;
  font-size: 16px;
}

.doc-create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.doc-create-actions button {
  min-width: 96px;
}

.permissions-modal {
  width: min(760px, 100%);
}

.permission-panel {
  display: grid;
  gap: 14px;
  overflow: auto;
  padding: 16px;
}

.permission-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.permission-rows {
  display: grid;
  gap: 10px;
}

.permission-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.doc-editor {
  display: flex;
  padding: 0;
  overflow: hidden;
}

.doc-editor-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}

.doc-editor-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.doc-title-field {
  flex: 1;
  min-width: 0;
}

.doc-title-input {
  min-height: 44px;
  font-size: 20px;
  font-weight: 800;
}

.doc-editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.doc-mode-button {
  font-size: 20px;
  font-weight: 900;
}

.dirty-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 12px;
  font-weight: 700;
}

.readonly-badge {
  background: #eef1f4;
  color: #64748b;
}

.markdown-workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: #f8fafc;
}

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

.markdown-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 16px;
}

.markdown-pane > span,
.preview-title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.markdown-input {
  flex: 1;
  min-height: 540px;
  resize: none;
  border-radius: 8px;
  font-family: Consolas, "SFMono-Regular", monospace;
  line-height: 1.7;
  background: #fff;
}

.markdown-preview-wrap {
  border-left: 1px solid var(--line);
}

.markdown-workspace.preview-only .markdown-preview-wrap {
  border-left: 0;
}

.markdown-preview {
  flex: 1;
  min-height: 540px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 22px;
  background: #fff;
  line-height: 1.75;
}

.markdown-workspace.preview-only .markdown-preview {
  min-height: 600px;
}

.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3,
.markdown-preview h4 {
  margin: 0 0 12px;
  letter-spacing: 0;
}

.markdown-preview h1 {
  font-size: 28px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.markdown-preview h2 {
  margin-top: 22px;
  font-size: 22px;
}

.markdown-preview h3 {
  margin-top: 18px;
  font-size: 18px;
}

.markdown-preview p {
  margin: 0 0 12px;
}

.markdown-preview blockquote {
  margin: 12px 0;
  padding: 10px 14px;
  border-left: 4px solid var(--primary);
  background: #f1f5f9;
  color: #475569;
}

.markdown-preview code {
  border-radius: 4px;
  padding: 2px 5px;
  background: #eef2f7;
  font-family: Consolas, "SFMono-Regular", monospace;
}

.markdown-preview pre {
  overflow: auto;
  padding: 14px;
  border-radius: 8px;
  background: #111827;
  color: #f8fafc;
}

.markdown-preview pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.markdown-preview ul,
.markdown-preview ol {
  margin: 0 0 12px 22px;
  padding: 0;
}

.markdown-preview table {
  width: 100%;
  margin: 12px 0 16px;
  border-collapse: collapse;
  table-layout: auto;
}

.markdown-preview th,
.markdown-preview td {
  border: 1px solid var(--line);
  padding: 9px 11px;
  font-size: 14px;
  line-height: 1.6;
}

.markdown-preview th {
  position: static;
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
}

.doc-empty {
  width: min(480px, 100%);
  margin: auto;
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
  color: var(--muted);
}

.doc-empty strong {
  color: var(--text);
  font-size: 20px;
}

.doc-empty.small {
  width: 100%;
  margin: 40px 0;
  padding: 0 16px;
}

.doc-empty.small strong {
  font-size: 15px;
}

.folder-empty strong {
  font-size: 24px;
}

.folder-create-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.revision-list {
  display: grid;
  gap: 12px;
  overflow: auto;
  padding: 16px;
}

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

.revision-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
}

.revision-meta strong {
  color: var(--text);
}

.revision-content {
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 14px;
  white-space: pre-wrap;
  font-family: Consolas, "SFMono-Regular", monospace;
  line-height: 1.6;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.42);
}

.modal {
  width: min(920px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.small-modal {
  width: min(460px, 100%);
}

.wide-modal {
  width: min(1080px, 100%);
}

.modal.project-item-modal {
  width: min(96vw, 1760px);
  height: calc(100vh - 24px);
  max-height: calc(100vh - 24px);
}

.modal.project-settings-modal {
  width: min(96vw, 1560px);
  height: calc(100vh - 24px);
  max-height: calc(100vh - 24px);
}

.modal.project-settings-modal .project-settings-grid {
  flex: 1;
  overflow: hidden;
  padding: 16px;
}

.modal.project-settings-modal .doc-create-actions {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

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

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

.modal-form {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.flow-filters {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  flex-wrap: wrap;
}

.flow-filters label {
  width: 170px;
}

.flow-filters button {
  flex: 0 0 auto;
}

.modal-flow-filters {
  margin: 0;
  border-width: 0 0 1px;
  border-radius: 0;
  padding: 14px 16px;
}

.log-filters {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  flex-wrap: wrap;
}

.log-filters label {
  width: 170px;
}

.log-filters .log-keyword {
  flex: 1;
  min-width: 240px;
}

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

.modal-list {
  overflow: auto;
  padding: 16px;
}

.modal-table {
  margin: 16px;
  max-height: 560px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1100px) {
  .grid,
  .lower-grid,
  .project-toolbar,
  .project-list-layout,
  .project-settings-grid,
  .project-testcase-manager {
    grid-template-columns: 1fr;
  }

  .project-module-sidebar {
    position: static;
    max-height: 240px;
  }

  .project-testcase-manager {
    min-height: auto;
  }

  .project-testcase-sidebar {
    max-height: 220px;
  }

  .project-testcase-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  main {
    width: min(100% - 20px, 1500px);
    padding-top: 12px;
  }

  .topbar,
  .toolbar,
  .doc-editor-head {
    align-items: stretch;
    flex-direction: column;
  }

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

  .userbar {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .user-summary,
  .user-actions {
    justify-content: flex-start;
  }

  .page-tabs,
  .doc-editor-actions {
    width: 100%;
  }

  .page-tabs button {
    flex: 1 0 auto;
  }

  .docs-layout,
  .markdown-workspace,
  .project-modal-grid,
  .project-form-row,
  .dept-estimate-grid,
  .assignment-row,
  .project-testcase-basic,
  .project-testcase-row {
    grid-template-columns: 1fr;
  }

  .project-testcase-step-head,
  .project-testcase-step-edit {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  .project-testcase-step-head span:nth-child(3),
  .project-testcase-step-head span:nth-child(4) {
    display: none;
  }

  .project-testcase-step-edit button {
    grid-column: 2;
  }

  .project-flow-panel {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 18px;
  }

  .docs-sidebar,
  .doc-editor {
    min-height: auto;
  }

  .markdown-preview-wrap {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .markdown-input,
  .markdown-preview {
    min-height: 320px;
  }

  .toolbar label,
  .toolbar .search-field,
  .project-toolbar label,
  .project-toolbar button,
  .flow-filters label,
  .flow-filters button,
  .log-filters label,
  .log-filters .log-keyword,
  .log-filters button,
  .toolbar button {
    width: 100%;
  }

  h1 {
    font-size: 22px;
  }

  .inline-form,
  .account-form,
  .employee-form,
  .employee-row,
  .score-item-row,
  .permission-row {
    grid-template-columns: 1fr;
  }

  .score-items-head,
  .score-items-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .score-item-bar,
  .score-item-fields {
    width: 100%;
  }

  .score-item-score {
    max-width: none;
  }

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

  .row-actions {
    width: 100%;
  }

  .row-actions button {
    flex: 1;
  }

  .employee-actions {
    justify-content: stretch;
  }

  .employee-actions button {
    flex: 1;
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }

  .project-card {
    align-items: stretch;
    flex-direction: column;
  }

  .project-card-side {
    flex: 0 0 auto;
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
    flex-wrap: wrap;
  }

  .setting-row,
  .setting-box-head {
    align-items: stretch;
    flex-direction: column;
  }
}
