:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-2: #eef3f5;
  --text: #20272b;
  --muted: #66727a;
  --line: #d9e0e4;
  --primary: #1769aa;
  --primary-strong: #0f4f83;
  --ok: #16845f;
  --warn: #b7791f;
  --danger: #c2413a;
  --accent: #5b6c2f;
  --shadow: 0 16px 40px rgba(38, 50, 56, 0.10);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

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

button {
  border: 0;
}

a {
  color: inherit;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(23, 105, 170, 0.13), transparent 38%),
    linear-gradient(315deg, rgba(22, 132, 95, 0.12), transparent 36%),
    var(--bg);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #1769aa;
  color: #fff;
  font-weight: 800;
}

.brand h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
}

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

.demo-note {
  margin-top: 18px;
  padding: 12px;
  border-radius: 8px;
  background: #f7faf7;
  color: #4c5b45;
  border: 1px solid #d7e3d1;
  line-height: 1.7;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #24313a;
  color: #f7fbfc;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sidebar .brand {
  margin: 0;
}

.sidebar .brand-mark {
  background: #eaf2f6;
  color: #1769aa;
}

.sidebar h1 {
  font-size: 20px;
}

.sidebar p {
  color: #b8c7cf;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav a {
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 8px;
  color: #dfe8ed;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav > a,
.nav-group {
  align-self: start;
}

.nav a.active,
.nav a:hover {
  background: #33444f;
  color: #fff;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-group-title {
  padding: 11px 12px;
  border-radius: 8px;
  color: #dfe8ed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}

.nav-group.active .nav-group-title {
  background: #33444f;
  color: #fff;
}

.nav-sub {
  display: grid;
  gap: 4px;
  padding-left: 14px;
}

.nav-sub a {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.04);
}

.nav-sub a.active,
.nav-sub a:hover {
  background: #415662;
}

.user-box {
  margin-top: auto;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #dfe8ed;
}

.user-box strong {
  display: block;
  color: #fff;
  margin-bottom: 4px;
}

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

.topbar {
  min-height: 72px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 16px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar h2 {
  margin: 0;
  font-size: 22px;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
}

.task-detail-page .topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 8px 18px rgba(32, 39, 43, 0.08);
}

.content {
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 12px 14px 28px;
}

.panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: none;
}

.panel-head {
  padding: 10px 10px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.panel-title {
  margin: 0;
  font-size: 15px;
}

.panel-note {
  margin: 4px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

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

.panel-body {
  min-width: 0;
  padding: 10px;
}

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

.detail-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.detail-grid dt {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.detail-grid dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 260px));
  gap: 12px;
  margin: 0 18px 18px;
}

.evidence-grid a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.evidence-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.history-item {
  margin: 12px 18px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.history-item:first-of-type {
  margin-top: 16px;
}

.history-item p {
  margin: 8px 0 0;
  color: var(--text);
  line-height: 1.6;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.selection-toolbar {
  min-height: 44px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.selection-toolbar span {
  color: var(--muted);
  font-weight: 700;
}

.selection-toolbar .selection-count {
  margin-right: auto;
}

.print-mode-field {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.print-mode-field span {
  white-space: nowrap;
}

.print-mode-select {
  min-width: 210px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.segmented-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f7f9;
}

.segmented-tabs a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.segmented-tabs a.active {
  background: #fff;
  color: var(--primary-strong);
  box-shadow: 0 1px 4px rgba(32, 39, 43, 0.1);
}

.filters {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 6px;
}

.filters input,
.filters select,
.filters button {
  min-height: 28px;
  font-size: 12px;
}

.form-grid {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field,
.modal form > label,
.modal .form-grid > label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field[hidden] {
  display: none !important;
}

.modal form > .field + .field,
.modal form > .field + .field-hint,
.modal form > .field-hint + .field,
.modal form > .form-grid + .field,
.modal form > .field + .form-grid,
.modal form > .form-grid + label,
.modal form > label + .field,
.modal form > label + label,
.modal form > label + .field-hint,
.modal form > .field-hint + label {
  margin-top: 12px;
}

.field.compact {
  gap: 5px;
}

.field.full,
.modal form > label.full,
.modal .form-grid > label.full {
  grid-column: 1 / -1;
}

.field label,
.modal form > label,
.modal .form-grid > label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field label .label-tip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fde8e8;
  color: #d92d20;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.field input,
.field select,
.field textarea,
.modal form > label > input,
.modal form > label > select,
.modal form > label > textarea,
.modal .form-grid > label > input,
.modal .form-grid > label > select,
.modal .form-grid > label > textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 38px;
  border: 1px solid #cbd5da;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 7px 10px;
  outline: none;
}

.field textarea,
.modal form > label > textarea,
.modal .form-grid > label > textarea {
  min-height: 112px;
  line-height: 1.45;
  resize: vertical;
}

.field textarea.compact-textarea,
.modal form > label.compact-textarea > textarea,
.modal .form-grid > label.compact-textarea > textarea {
  min-height: 76px;
}

.field input[type="file"],
.modal form > label > input[type="file"],
.modal .form-grid > label > input[type="file"] {
  min-height: 38px;
  padding: 6px 8px;
  background: #f8fafb;
}

.field textarea.expected-finish-reason-input {
  min-height: 148px;
  line-height: 1.55;
}

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

.product-library-filters {
  align-items: end;
  margin-bottom: 16px;
}

.product-filter-actions .btn {
  width: fit-content;
}

.field select[multiple] {
  min-height: 112px;
  padding: 6px;
}

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

.ai-audit-evidence-field {
  margin-top: 18px !important;
  border: 1px solid #c6dced;
  border-radius: 10px;
  padding: 14px 16px;
  background: #f7fbff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.ai-audit-evidence-field label {
  display: block;
  margin-bottom: 10px;
  color: #17374c;
  font-weight: 700;
}

.ai-audit-evidence-field .checkbox-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 14px;
  padding: 12px 14px;
  border: 1px solid #cfe0ec;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
  color: #17374c;
  cursor: pointer;
  font-weight: 400;
  line-height: 1.45;
  box-shadow: 0 1px 2px rgba(20, 62, 88, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.ai-audit-evidence-field .checkbox-line input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ai-audit-evidence-field .ai-audit-exemption-mark {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 2px solid #b8cfdf;
  border-radius: 999px;
  background: #fff;
  color: transparent;
  font-size: 16px;
  font-weight: 900;
  box-shadow: inset 0 0 0 3px #fff;
}

.ai-audit-evidence-field .ai-audit-exemption-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ai-audit-evidence-field .ai-audit-exemption-copy strong {
  color: #17374c;
  font-size: 14px;
  font-weight: 800;
}

.ai-audit-evidence-field .ai-audit-exemption-copy small {
  color: #5b7386;
  font-size: 12px;
}

.ai-audit-evidence-field .checkbox-line:has(input:checked) {
  border-color: #8fd3ad;
  background: linear-gradient(180deg, #f5fff9 0%, #eaf8f0 100%);
  box-shadow: 0 0 0 3px rgba(31, 151, 91, 0.1);
}

.ai-audit-evidence-field .checkbox-line:has(input:checked) .ai-audit-exemption-mark {
  border-color: #1f975b;
  background: #1f975b;
  color: #fff;
}

.ai-audit-evidence-field .checkbox-line.danger {
  border-color: #f2c6c4;
  background: linear-gradient(180deg, #fffafa 0%, #fff2f1 100%);
}

.ai-audit-evidence-field .checkbox-line.danger .ai-audit-exemption-mark {
  border-color: #e7aaa7;
}

.ai-audit-evidence-field .checkbox-line.danger:has(input:checked) {
  border-color: #e47470;
  background: linear-gradient(180deg, #fff6f5 0%, #fdecea 100%);
  box-shadow: 0 0 0 3px rgba(201, 61, 56, 0.1);
}

.ai-audit-evidence-field .checkbox-line.danger:has(input:checked) .ai-audit-exemption-mark {
  border-color: #c93d38;
  background: #c93d38;
  color: #fff;
}

.ai-audit-evidence-field .checkbox-line:has(input:focus-visible) {
  outline: 2px solid rgba(23, 105, 170, 0.35);
  outline-offset: 2px;
}

.ai-audit-evidence-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.ai-audit-evidence-field input[type="file"] {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #c9d8e3;
  border-radius: 7px;
  background: #fff;
}

.ai-audit-evidence-field .field-hint {
  margin: 0;
  color: #426277;
}

.ai-audit-evidence-preview {
  margin-top: 10px;
  padding: 6px 9px;
  width: fit-content;
  border-radius: 999px;
  background: #edf4fa;
  color: var(--muted);
  font-size: 12px;
}

.ai-audit-evidence-preview.ok {
  background: #e6f6ee;
  color: #0f6b45;
  font-weight: 700;
}

.ai-audit-evidence-preview.special {
  background: #fdeaea;
  color: #b42318;
  font-weight: 800;
}

.audit-evidence-preview-modal {
  width: min(1120px, calc(100vw - 36px));
}

.audit-evidence-preview-modal header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.audit-evidence-preview-counter {
  padding: 4px 10px;
  border-radius: 999px;
  background: #e8f2fb;
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

.audit-evidence-preview-body {
  position: relative;
  padding: 14px 18px 0;
  max-height: calc(100vh - 180px);
  overflow: auto;
}

.audit-evidence-preview-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.audit-evidence-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid #cfe0ed;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--primary);
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(33, 59, 82, 0.14);
  cursor: pointer;
}

.audit-evidence-nav:hover {
  background: #e8f2fb;
}

.audit-evidence-nav.prev {
  left: 26px;
}

.audit-evidence-nav.next {
  right: 26px;
}

.audit-evidence-preview-actions {
  padding: 0 18px 18px;
}

.danger-text {
  color: #b42318;
}

.hidden {
  display: none !important;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 105, 170, 0.12);
}

.check-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}

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

.modal .form-grid > label.check-field,
.modal form > label.check-field {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #dbe7ee;
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.modal .form-grid > label.check-field > input[type="checkbox"],
.modal form > label.check-field > input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  border-radius: 4px;
}

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

.task-concerned-people-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid #dbe7ee;
  border-radius: 8px;
  background: #f8fbfd;
}

.checkbox-card {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  cursor: pointer;
}

.checkbox-card.compact {
  min-height: 32px;
  padding: 6px 11px;
  border-radius: 999px;
}

.task-concerned-people-picker .checkbox-card.compact {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 28px;
  gap: 0;
  padding: 5px 12px;
  border-color: transparent;
  background: transparent;
  color: #52616b;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.task-concerned-people-picker .checkbox-card.compact input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.task-concerned-people-picker .checkbox-card.compact:has(input:checked) {
  border-color: #1769aa;
  background: #1769aa;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 3px 8px rgba(23, 105, 170, 0.18);
}

.task-concerned-people-picker .checkbox-card.compact:has(input:checked) span::before {
  content: "✓";
  margin-right: 5px;
  font-weight: 800;
}

.task-concerned-people-picker .checkbox-card.compact:hover {
  background: #edf4f8;
  color: #0f4f83;
}

.task-concerned-people-picker .checkbox-card.compact:has(input:checked):hover {
  background: #0f5f99;
  color: #fff;
}

.task-concerned-people-picker {
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.task-concerned-people-picker .checkbox-card.compact {
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid #d8e6fb;
  background: #f7faff;
  color: #2f67bd;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.task-concerned-people-picker .checkbox-card.compact:has(input:checked) {
  border-color: #a9dbc0;
  background: #e8f7ef;
  color: #137052;
  font-weight: 700;
  box-shadow: none;
}

.task-concerned-people-picker .checkbox-card.compact:has(input:checked) span::before {
  content: none;
}

.task-concerned-people-picker .checkbox-card.compact:hover {
  border-color: #abc8f5;
  background: #eef5ff;
  color: #1554b7;
}

.task-concerned-people-picker .checkbox-card.compact:has(input:checked):hover {
  border-color: #91d8b2;
  background: #dcf3e7;
  color: #0f6b49;
}

.inline-select-tip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef7ff;
  color: #1769aa;
  font-size: 12px;
  font-weight: 700;
}

.stage-delete-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  margin-top: 12px;
}

.stage-delete-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
  cursor: pointer;
}

.stage-delete-option:hover {
  border-color: #e08b83;
  background: #fff8f7;
}

.stage-delete-option input {
  width: 16px;
  height: 16px;
  margin-top: 3px;
}

.stage-delete-option strong,
.stage-delete-option small {
  display: block;
}

.stage-delete-option small {
  margin-top: 4px;
  color: var(--muted);
}

.modal.batch-stage-edit-modal {
  width: min(1500px, calc(100vw - 36px));
}

.batch-stage-edit-hint {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  background: #f0f7fc;
  color: #314955;
}

.batch-stage-edit-list {
  display: grid;
  gap: 12px;
  max-height: min(70vh, 780px);
  overflow: auto;
  padding-right: 4px;
}

.batch-stage-edit-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfd;
}

.batch-stage-edit-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e7f2ff;
  color: #075b9f;
  font-weight: 700;
}

.batch-stage-edit-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.batch-stage-edit-grid {
  display: grid;
  gap: 10px;
  align-items: end;
}

.batch-stage-edit-grid.top {
  grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 0.8fr) minmax(180px, 1fr) minmax(160px, 0.85fr);
}

.batch-stage-edit-grid.middle {
  grid-template-columns: minmax(160px, 0.95fr) 88px 88px 120px minmax(220px, 1.2fr);
}

.batch-stage-edit-grid.bottom {
  grid-template-columns: minmax(220px, 1fr) 120px 88px repeat(3, max-content);
}

.batch-stage-edit-grid .check-field.compact {
  min-height: 40px;
  align-self: end;
  white-space: nowrap;
}

.batch-stage-requirement textarea {
  min-height: 70px;
}

.checkbox-card input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.checkbox-card span {
  display: grid;
  gap: 2px;
}

.checkbox-card small {
  color: var(--muted);
}

.btn {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  color: var(--text);
  background: #e9eef1;
  border: 1px solid #d3dde2;
  text-decoration: none;
  white-space: nowrap;
  font-size: 12px;
}

.btn:hover {
  filter: brightness(0.98);
}

.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

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

.btn.ok {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}

.btn.warn {
  background: #f3d28a;
  border-color: #e8bd5e;
  color: #4f3a09;
}

.btn.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn.ghost {
  background: transparent;
  border-color: transparent;
}

.btn.small {
  min-height: 24px;
  padding: 3px 7px;
  font-size: 12px;
}

.table-wrap {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: auto;
  border: 1px solid #d4dde3;
  border-radius: 4px;
  background: #fff;
}

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

.token-code {
  display: block;
  max-width: 520px;
  overflow-wrap: anywhere;
  white-space: normal;
  color: #0f4f83;
  background: #eef3f5;
  border: 1px solid #d9e0e4;
  border-radius: 6px;
  padding: 8px 10px;
}

.compact-toolbar {
  gap: 8px;
  flex-wrap: wrap;
}

.ai-usage-log-table th:nth-child(1),
.ai-usage-log-table td:nth-child(1) {
  width: 92px;
  min-width: 92px;
}

.ai-usage-log-table th:nth-child(2),
.ai-usage-log-table td:nth-child(2) {
  width: 128px;
  min-width: 128px;
}

.ai-usage-log-table {
  min-width: 1180px;
  table-layout: fixed;
  border: 1px solid #d8e1e6;
  font-size: 12px;
}

.ai-usage-log-table th,
.ai-usage-log-table td {
  padding: 6px 8px;
  border-right: 1px solid #e2e8ec;
  border-bottom: 1px solid #d8e1e6;
  line-height: 1.35;
  vertical-align: middle;
}

.ai-usage-log-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef3f6;
  color: #263b47;
  white-space: nowrap;
}

.ai-usage-log-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-usage-log-table th:nth-child(3),
.ai-usage-log-table td:nth-child(3) {
  width: 150px;
}

.ai-usage-log-table th:nth-child(4),
.ai-usage-log-table td:nth-child(4),
.ai-usage-log-table th:nth-child(5),
.ai-usage-log-table td:nth-child(5) {
  width: 140px;
}

.ai-usage-log-table th:nth-child(6),
.ai-usage-log-table td:nth-child(6) {
  width: 64px;
  text-align: center;
}

.ai-usage-log-table th:nth-child(7),
.ai-usage-log-table td:nth-child(7) {
  width: 360px;
}

.ai-usage-log-table th:nth-child(8),
.ai-usage-log-table td:nth-child(8) {
  width: 190px;
}

.ai-usage-log-table th:nth-child(9),
.ai-usage-log-table td:nth-child(9) {
  width: 86px;
}

.ai-usage-log-row {
  cursor: pointer;
}

.ai-usage-log-row:hover td {
  background: #eef7fc;
}

.nowrap {
  white-space: nowrap;
}

.ai-usage-detail-modal {
  width: min(980px, 100%);
}

.ai-usage-detail-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.ai-usage-detail-body {
  padding: 16px;
}

.ai-usage-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid #d8e1e6;
  margin: 0 0 14px;
}

.ai-usage-detail-grid div {
  min-width: 0;
  padding: 8px 10px;
  border-right: 1px solid #e2e8ec;
  border-bottom: 1px solid #e2e8ec;
}

.ai-usage-detail-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ai-usage-detail-grid dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.ai-usage-detail-section {
  margin-top: 14px;
}

.ai-usage-detail-section h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.ai-usage-detail-section pre {
  max-height: 240px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border: 1px solid #d8e1e6;
  background: #f8fafb;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 13px/1.55 var(--font);
}

.ai-usage-detail-standard-table {
  min-width: 820px;
  font-size: 12px;
  border: 1px solid #d8e1e6;
}

.ai-usage-detail-standard-table th,
.ai-usage-detail-standard-table td {
  padding: 7px 8px;
  border-right: 1px solid #e2e8ec;
  vertical-align: top;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1020px;
  table-layout: fixed;
  font-size: 12px;
  line-height: 1.25;
}

.data-table.stage-record-table {
  min-width: 1720px;
}

.stage-record-table th:nth-child(1),
.stage-record-table td:nth-child(1) {
  width: 150px;
}

.stage-record-table th:nth-child(2),
.stage-record-table td:nth-child(2) {
  width: 142px;
}

.stage-record-table th:nth-child(3),
.stage-record-table td:nth-child(3),
.stage-record-table th:nth-child(4),
.stage-record-table td:nth-child(4),
.stage-record-table th:nth-child(5),
.stage-record-table td:nth-child(5),
.stage-record-table th:nth-child(6),
.stage-record-table td:nth-child(6) {
  width: 112px;
}

.stage-record-table th:nth-child(7),
.stage-record-table td:nth-child(7) {
  width: 142px;
}

.stage-record-table th:nth-child(8),
.stage-record-table td:nth-child(8) {
  width: 88px;
}

.stage-record-table th:nth-child(9),
.stage-record-table td:nth-child(9) {
  width: 210px;
}

.stage-record-table th:nth-child(10),
.stage-record-table td:nth-child(10) {
  width: 320px;
}

.stage-record-table th:nth-child(11),
.stage-record-table td:nth-child(11) {
  width: 230px;
}

.data-table .select-col {
  width: 44px;
  text-align: center;
}

.data-table .select-col input {
  width: 16px;
  height: 16px;
}

.data-table.position-stats-table {
  min-width: 1120px;
}

.data-table.person-stats-table {
  min-width: 1120px;
}

.data-table.task-list-table {
  min-width: 1720px;
  table-layout: fixed;
}

.task-list-table th:nth-child(1),
.task-list-table td:nth-child(1) {
  width: 44px;
}

.task-list-table th:nth-child(2),
.task-list-table td:nth-child(2) {
  width: 250px;
}

.task-list-table th:nth-child(3),
.task-list-table td:nth-child(3) {
  width: 160px;
}

.task-list-table th:nth-child(4),
.task-list-table td:nth-child(4) {
  width: 120px;
}

.task-list-table th:nth-child(5),
.task-list-table td:nth-child(5) {
  width: 120px;
}

.task-list-table th:nth-child(6),
.task-list-table td:nth-child(6) {
  width: 100px;
}

.task-list-table th:nth-child(7),
.task-list-table td:nth-child(7) {
  width: 82px;
}

.task-list-table th:nth-child(8),
.task-list-table td:nth-child(8) {
  width: 104px;
}

.task-list-table th:nth-child(9),
.task-list-table td:nth-child(9) {
  width: 110px;
}

.task-list-table th:nth-child(10),
.task-list-table td:nth-child(10) {
  width: 78px;
}

.task-list-table th:nth-child(11),
.task-list-table td:nth-child(11) {
  width: 112px;
}

.task-list-table th:nth-child(12),
.task-list-table td:nth-child(12) {
  width: 280px;
}

.task-list-table th:nth-child(13),
.task-list-table td:nth-child(13) {
  width: 110px;
}

.task-list-table th:nth-child(14),
.task-list-table td:nth-child(14) {
  width: 112px;
}

.data-table.performance-stats-table {
  min-width: 1500px;
}

.performance-detail-table th,
.performance-detail-table td {
  vertical-align: top;
}

.performance-detail-table th:nth-child(1),
.performance-detail-table td:nth-child(1) {
  width: 120px;
}

.performance-detail-table th:nth-child(2),
.performance-detail-table td:nth-child(2) {
  width: 260px;
}

.performance-detail-table th:nth-child(6),
.performance-detail-table td:nth-child(6),
.performance-detail-table th:nth-child(7),
.performance-detail-table td:nth-child(7) {
  width: 150px;
}

.performance-detail-table th:nth-child(8),
.performance-detail-table td:nth-child(8),
.performance-detail-table th:nth-child(9),
.performance-detail-table td:nth-child(9),
.performance-detail-table th:nth-child(10),
.performance-detail-table td:nth-child(10) {
  width: 96px;
}

.performance-owner-cell {
  background: #f8fafb;
}

.data-table.task-progress-table {
  min-width: 1320px;
}

.data-table.overdue-task-table {
  min-width: 1500px;
}

.overdue-task-table th:nth-child(1),
.overdue-task-table td:nth-child(1) {
  width: 54px;
}

.overdue-task-table th:nth-child(2),
.overdue-task-table td:nth-child(2) {
  width: 280px;
}

.overdue-task-table th:nth-child(8),
.overdue-task-table td:nth-child(8) {
  width: 330px;
}

.data-table.product-table,
.data-table.product-series-table,
.data-table.series-strategy-table,
.data-table.series-strategy-items-table,
.data-table.product-timeline-table {
  min-width: 1180px;
}

.data-table.issue-list-table {
  min-width: 1120px;
}

.issue-list-table th:nth-child(1),
.issue-list-table td:nth-child(1) {
  width: 132px;
}

.issue-list-table th:nth-child(2),
.issue-list-table td:nth-child(2) {
  width: 320px;
}

.issue-list-table th:nth-child(3),
.issue-list-table td:nth-child(3) {
  width: 110px;
}

.issue-list-table th:nth-child(4),
.issue-list-table td:nth-child(4) {
  width: 98px;
}

.issue-list-table th:nth-child(8),
.issue-list-table td:nth-child(8) {
  width: 132px;
}

.data-table th,
.data-table td {
  height: 26px;
  padding: 2px 5px;
  border-right: 1px solid #e1e7eb;
  border-bottom: 1px solid #dbe3e8;
  text-align: left;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 5;
  color: #39505c;
  font-weight: 700;
  background: #edf2f5;
  box-shadow: inset 0 -1px 0 #cfd9df;
}

.data-table tr:hover td {
  background: #f3f9fc;
}

.data-table td > strong,
.data-table td > a,
.data-table td > span,
.data-table td > div,
.data-table td > small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table td > div,
.data-table td > small {
  display: block;
}

.data-table div.compact-cell-text,
.data-table span.compact-cell-text,
.data-table .todo-task-list-text {
  display: none;
}

.data-table .table-remark-preview-cell {
  cursor: help;
  max-height: 34px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.data-table .table-remark-preview-cell > * {
  display: inline;
  white-space: nowrap;
}

.data-table .table-remark-preview-cell br {
  display: none;
}

.table-remark-preview-popup {
  position: fixed;
  z-index: 5000;
  width: min(520px, calc(100vw - 24px));
  max-height: min(360px, calc(100vh - 24px));
  overflow: auto;
  padding: 12px 14px;
  border: 1px solid #b7c8d8;
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 16px 36px rgba(16, 38, 66, 0.22);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  pointer-events: auto;
}

.data-table th:first-child,
.data-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 4;
  background: #fff;
}

.data-table th:first-child {
  z-index: 8;
  background: #edf2f5;
}

.data-table:has(.select-col) th:nth-child(2),
.data-table:has(.select-col) td:nth-child(2) {
  position: sticky;
  left: 44px;
  z-index: 4;
  background: #fff;
  box-shadow: 1px 0 0 #d4dde3;
}

.data-table:has(.select-col) th:nth-child(2) {
  z-index: 8;
  background: #edf2f5;
}

.data-table th:last-child,
.data-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 4;
  background: #fff;
  box-shadow: -1px 0 0 #d4dde3;
}

.data-table th:last-child {
  z-index: 8;
  background: #edf2f5;
}

.data-table tr:hover td:first-child,
.data-table tr:hover td:last-child,
.data-table:has(.select-col) tr:hover td:nth-child(2) {
  background: #f3f9fc;
}

.stage-record-table th:last-child,
.stage-record-table td:last-child {
  min-width: 230px;
}

.stage-record-table td:last-child {
  overflow: visible;
  white-space: normal;
}

.stage-record-table .stage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  max-width: none;
  overflow: visible;
  white-space: normal;
}

.stage-record-table .stage-record-note-summary {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #32424b;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: help;
}

.series-strategy-table th:nth-child(3),
.series-strategy-table td:nth-child(3) {
  max-width: 360px;
}

.series-strategy-items-table th:nth-child(2),
.series-strategy-items-table td:nth-child(2) {
  min-width: 220px;
}

.series-strategy-items-table th:nth-child(4),
.series-strategy-items-table td:nth-child(4),
.series-strategy-items-table th:nth-child(5),
.series-strategy-items-table td:nth-child(5),
.series-strategy-items-table th:nth-child(7),
.series-strategy-items-table td:nth-child(7) {
  max-width: 320px;
}

.chip-list.compact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.multiline-brief {
  display: grid;
  gap: 4px;
  max-width: 100%;
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
}

.table-link {
  color: var(--primary-strong);
  font-weight: 700;
  text-decoration: none;
}

.table-link:hover {
  text-decoration: underline;
}

.task-progress-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.task-progress-summary button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 15px;
  border: 1px solid #d8e2e8;
  border-radius: 10px;
  background: #f8fbfd;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.task-progress-summary button:hover {
  border-color: #aac7da;
  background: #f1f8fc;
  transform: translateY(-1px);
}

.task-progress-summary button.collapsed {
  background: #f4f5f6;
  border-color: #dfe4e7;
}

.task-progress-summary span {
  color: var(--muted);
  font-weight: 700;
}

.task-progress-summary strong {
  color: var(--primary-strong);
  font-size: 21px;
}

.task-progress-groups {
  display: grid;
  gap: 20px;
}

.task-progress-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.task-progress-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
  padding: 13px 15px;
  border: 0;
  border-left: 5px solid #78909c;
  background: #f6f9fa;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.task-progress-group.series .task-progress-group-head { border-left-color: #2475b7; background: #f1f7fc; }
.task-progress-group.board .task-progress-group-head { border-left-color: #2e8b62; background: #f2faf6; }
.task-progress-group.debug .task-progress-group-head { border-left-color: #d17b22; background: #fff8ef; }
.task-progress-group.archive .task-progress-group-head { border-left-color: #8065a8; background: #f8f5fb; }

.task-progress-group-head h4 {
  margin: 0;
  color: #25323a;
  font-size: 16px;
}

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

.task-progress-group-head > span {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  color: #42535d;
  font-size: 12px;
  font-weight: 800;
}

.task-progress-group-head b {
  margin-left: 5px;
  font-size: 16px;
}

.task-progress-group.collapsed .task-progress-group-body {
  display: none;
}

.task-progress-table th:nth-child(8),
.task-progress-table td:nth-child(8) {
  width: 230px;
  max-width: 230px;
}

.task-progress-remark {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.overdue-summary-grid {
  margin-bottom: 0;
}

.overdue-stage-name {
  font-weight: 700;
  color: var(--text);
}

.overdue-stage-name + .overdue-stage-name {
  margin-top: 4px;
}

.overdue-stage-detail-list {
  display: grid;
  gap: 8px;
}

.overdue-stage-detail {
  display: grid;
  gap: 4px;
  align-items: start;
  padding: 8px;
  border: 1px solid #f2c7c7;
  border-radius: 8px;
  background: #fff8f8;
}

.overdue-stage-detail strong {
  color: var(--danger);
}

.overdue-stage-detail small {
  color: var(--muted);
  line-height: 1.45;
}

.level-edit-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.level-edit-table th,
.level-edit-table td {
  height: 28px;
  padding: 2px 5px;
  border-bottom: 1px solid #dbe3e8;
  text-align: left;
  vertical-align: middle;
}

.level-edit-table th {
  color: #39505c;
  font-size: 12px;
  font-weight: 700;
  background: #edf2f5;
}

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

.level-edit-table input:not([type="checkbox"]),
.level-edit-table textarea {
  width: 100%;
  min-height: 24px;
  border: 1px solid #cbd5da;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 12px;
  outline: none;
}

.level-edit-table textarea {
  min-height: 28px;
  resize: vertical;
}

.level-edit-table input[name="levelSortOrder"],
.level-edit-table input[name="referenceDurationDays"] {
  max-width: 96px;
}

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

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

.finish-col {
  color: var(--primary) !important;
}

.finish-date {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #e4f0fb;
  color: var(--primary-strong);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.finish-date.delayed {
  background: #fde7e5;
  color: var(--danger);
}

.finish-date.due-today {
  background: #fff2c8;
  color: #946200;
  border: 1px solid #f1cb67;
}

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

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

.chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 20px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  background: #e9eef1;
  color: #4d5960;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip.NotStarted {
  background: #e8edf0;
  color: #56636a;
}

.chip.InProgress {
  background: #e4f0fb;
  color: #1769aa;
}

.chip.Paused {
  background: #ece8ff;
  color: #5b3db4;
}

.chip.Completed {
  background: #e2f3eb;
  color: #16845f;
}

.chip.Abnormal,
.chip.delayed {
  background: #fde7e5;
  color: #c2413a;
}

.chip.Skipped {
  background: #f3ecd8;
  color: #8b6415;
}

.chip.ok {
  background: #e2f3eb;
  color: #16845f;
}

.chip.warn {
  background: #fff2c8;
  color: #946200;
}

.chip.today {
  background: #fff2c8;
  color: #946200;
}

.chip.tomorrow {
  background: #e8f5ff;
  color: #1769aa;
}

.chip.new {
  background: #e8edff;
  color: #3755c8;
}

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

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

.todo-confirm-reminder {
  position: relative;
  min-width: 360px;
  max-width: 460px;
  margin-left: auto;
  z-index: 8;
}

.todo-confirm-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 10px 14px;
  border: 1px solid #d9e5ee;
  border-radius: 10px;
  background: linear-gradient(135deg, #f7fbff 0%, #ffffff 100%);
  box-shadow: 0 8px 18px rgba(32, 39, 43, 0.06);
  cursor: default;
}

.todo-confirm-reminder.has-items .todo-confirm-trigger {
  border-color: #f0c25d;
  background: linear-gradient(135deg, #fff7db 0%, #fffdf5 58%, #f8fbff 100%);
}

.todo-confirm-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #e7eef5;
  color: #40525f;
  font-weight: 900;
}

.todo-confirm-reminder.has-items .todo-confirm-count {
  background: #d99a1b;
  color: #fff;
}

.todo-confirm-trigger strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.todo-confirm-trigger small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.todo-confirm-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(460px, 78vw);
  max-height: 420px;
  overflow: auto;
  padding: 10px;
  border: 1px solid #d9e5ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(18, 32, 42, 0.16);
}

.todo-confirm-reminder:hover .todo-confirm-dropdown,
.todo-confirm-reminder:focus-within .todo-confirm-dropdown {
  display: block;
}

.todo-confirm-dropdown-title {
  padding: 4px 6px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.todo-confirm-item {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid #e5edf3;
  border-radius: 10px;
  background: #fbfdff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.todo-confirm-item:hover {
  border-color: #8ebde3;
  background: #f2f8ff;
}

.todo-confirm-item strong,
.todo-confirm-item span,
.todo-confirm-item small {
  display: block;
}

.todo-confirm-item strong {
  margin-bottom: 5px;
  color: #0b5fa5;
}

.todo-confirm-overdue {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 7px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fde7e5;
  color: #c2413a;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid #f5b6b0;
}

.todo-confirm-item span {
  color: var(--text);
  line-height: 1.45;
}

.todo-confirm-item small {
  margin-top: 6px;
  color: var(--muted);
}

.todo-confirm-empty,
.todo-confirm-more {
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
}

.todo-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.todo-row.todo-delayed td:first-child {
  border-left: 4px solid #c2413a;
}

.todo-row.todo-today td:first-child {
  border-left: 4px solid #f1b92d;
}

.todo-row.todo-tomorrow td:first-child {
  border-left: 4px solid #4b9ad6;
}

.todo-row.todo-soon td:first-child {
  border-left: 4px solid #d99a1b;
}

.todo-row.todo-new td:first-child {
  box-shadow: inset 4px 0 0 #6375d8;
}

.todo-date {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  background: #edf1f4;
  color: #4d5960;
}

.todo-date.delayed {
  background: #fde7e5;
  color: #c2413a;
}

.todo-date.today {
  background: #fff2c8;
  color: #946200;
  border: 1px solid #f1cb67;
}

.todo-date.tomorrow {
  background: #e8f5ff;
  color: #1769aa;
}

.todo-date.soon {
  background: #fff7df;
  color: #946200;
  border: 1px solid #efd28b;
}

.todo-remark-board {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid #d8e5ee;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f7fbfe 100%);
}

.todo-remark-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #cfe1ee;
  border-left: 5px solid var(--primary);
  border-radius: 10px;
  background: linear-gradient(135deg, #eef7ff 0%, #ffffff 68%);
}

.todo-remark-head h3 {
  margin: 0 0 5px;
  color: #073b66;
  font-size: 18px;
  font-weight: 900;
}

.todo-remark-head p {
  color: #36566e;
  font-weight: 700;
}

.todo-open-hint {
  margin-top: 4px;
  font-size: 12px;
}

.task-name-link {
  cursor: pointer;
}

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

.todo-preview-switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid #d7e4ed;
  border-radius: 10px;
  background: #eef5fa;
  flex-shrink: 0;
}

.todo-preview-switch button {
  border: 0;
  border-radius: 8px;
  padding: 7px 10px;
  background: transparent;
  color: #516672;
  font-weight: 800;
  cursor: pointer;
}

.todo-preview-switch button.active {
  color: var(--primary);
  background: #fff;
  box-shadow: 0 4px 10px rgba(24, 95, 150, 0.12);
}

.todo-remark-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.todo-remark-summary .todo-remark-filter {
  border: 0;
  cursor: pointer;
}

.todo-remark-summary .todo-remark-filter:hover,
.todo-remark-summary .todo-remark-filter.active {
  box-shadow: 0 0 0 2px rgba(24, 95, 150, 0.18);
  transform: translateY(-1px);
}

.todo-remark-search {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin: 0 0 12px;
  max-width: none;
}

.todo-remark-search .field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.todo-remark-search .field:first-child {
  flex: 0 1 520px;
}

.todo-remark-search .field label {
  white-space: nowrap;
}

.todo-remark-search .field input {
  min-width: 280px;
}

.todo-remark-search .product-filter-actions {
  flex: 0 0 auto;
}

.todo-remark-search .product-filter-actions label {
  display: none;
}

.todo-remark-search .product-filter-actions .btn {
  height: 40px;
}

.todo-remark-grid {
  display: block;
}

.todo-remark-grid.manager {
  display: block;
}

.todo-remark-card {
  min-height: 128px;
  padding: 12px;
  border: 1px solid #dce8f0;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 12px;
}

.todo-remark-card:last-child {
  margin-bottom: 0;
}

.todo-remark-personal-panel {
  margin: 14px auto 0;
  padding: 12px;
  border: 1px solid #d8e5ee;
  border-radius: 12px;
  background: #f9fcff;
}

.todo-remark-personal-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 0 2px;
}

.todo-remark-personal-title strong {
  color: #073b66;
  font-size: 16px;
}

.todo-remark-card-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 10px;
}

.todo-rule-alert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #b43a32;
  font-weight: 900;
  background: #fdecea;
  border: 1px solid #f3b8b2;
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
}

.todo-remark-table th,
.todo-remark-table td {
  padding: 9px 10px;
}

.todo-remark-table .seq-col {
  width: 58px;
  min-width: 58px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.todo-remark-table .todo-task-list-col {
  width: 46%;
  min-width: 420px;
}

.todo-task-list-text {
  max-width: 780px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  white-space: normal;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 400;
}

.todo-table-count {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  background: #f8fbfd;
  border-bottom: 1px solid var(--line);
}

.todo-remark-record-text {
  display: -webkit-box;
  max-width: 520px;
  color: var(--text);
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stage-remark-records {
  display: grid;
  gap: 7px;
  min-width: 220px;
  max-width: 560px;
}

.stage-remark-record {
  padding: 8px 9px;
  border: 1px solid #dce8f0;
  border-radius: 8px;
  background: #f8fbfe;
}

.stage-remark-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  color: #5d7180;
  font-size: 12px;
}

.stage-remark-meta strong {
  color: #17374c;
}

.stage-remark-content {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
  color: var(--text);
}

.stage-audit-evidence-records {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  min-width: 220px;
  max-width: 560px;
}

.stage-audit-evidence-title {
  color: #17374c;
  font-size: 12px;
  font-weight: 700;
}

.stage-audit-evidence-record {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border: 1px solid #d8e8f6;
  border-radius: 8px;
  background: #f7fbff;
  color: #425466;
  font-size: 12px;
}

.todo-notify-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.todo-notify-steps div {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid #d8e5ee;
  border-radius: 10px;
  background: #f8fbfe;
  color: #385064;
  font-weight: 800;
}

.todo-notify-steps strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
}

.todo-notice-actions-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.todo-remark-table .chip.new {
  border: 1px solid #bdc9ff;
}

.table-wrap.compact {
  margin: 0;
}

.todo-remark-scroll.is-scrollable {
  max-height: min(620px, 70vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.todo-remark-scroll.is-scrollable .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f8fb;
}

.empty.compact {
  padding: 18px;
}

.toolbar.compact {
  gap: 6px;
}

.todo-confirm-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid #f0cf7b;
  border-radius: 10px;
  background: #fffaf0;
}

.todo-confirm-inline-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.readonly-box {
  min-height: 36px;
  padding: 9px 10px;
  border: 1px solid #d7e4ed;
  border-radius: 8px;
  background: #f5f8fb;
  color: var(--text);
}

.required-mark {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fde2e2;
  color: #c23631;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .todo-remark-head,
  .todo-remark-card-title,
  .todo-confirm-inline {
    display: block;
  }

  .todo-preview-switch,
  .todo-confirm-inline-actions {
    margin-top: 10px;
  }

  .todo-notify-steps {
    grid-template-columns: 1fr;
  }
}

.summary-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 6px;
}

.metric {
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px 8px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 2px;
}

.metric strong {
  display: block;
  font-size: 18px;
  line-height: 1.25;
}

.date-strong {
  color: var(--primary-strong);
}

.date-strong.delayed {
  color: var(--danger);
}

.stage-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 6px 2px 12px;
}

.stage-step {
  min-width: 238px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.stage-step.current {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 105, 170, 0.12);
}

.stage-step.delayed {
  border-color: #efb0ac;
  background: #fff8f7;
}

.stage-step .order {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.stage-step strong {
  display: block;
  min-height: 38px;
  line-height: 1.35;
}

.stage-finish {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #e4f0fb;
  color: var(--primary-strong);
}

.stage-finish.delayed {
  background: #fde7e5;
  color: var(--danger);
}

.stage-finish span {
  display: block;
  font-size: 12px;
  font-weight: 700;
}

.stage-finish strong {
  min-height: 0;
  margin-top: 3px;
  font-size: 18px;
  line-height: 1.15;
}

.stage-finish small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 700;
}

.stage-dependency {
  color: #27323a;
  font-weight: 700;
}

.lead-guide-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 1px solid #d8e5ec;
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 18%, rgba(23, 105, 170, 0.16), transparent 28%),
    linear-gradient(135deg, #f8fbff 0%, #eef6f2 100%);
  box-shadow: 0 14px 34px rgba(32, 55, 68, 0.08);
}

.lead-guide-hero h1 {
  margin: 0;
  color: #143349;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.18;
}

.lead-guide-hero p {
  margin: 8px 0 0;
  max-width: 760px;
  color: #4d626e;
  font-size: 15px;
  line-height: 1.6;
}

.lead-guide-carousel {
  display: grid;
  gap: 14px;
}

.lead-guide-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid #d7e3ea;
  border-radius: 18px;
  background: #10202c;
  box-shadow: 0 18px 44px rgba(24, 39, 50, 0.14);
}

.lead-guide-slide {
  display: none;
}

.lead-guide-slide.active {
  display: block;
}

.lead-guide-image-wrap {
  display: grid;
  place-items: center;
  min-height: 420px;
  padding: 14px;
  background: #e8eef2;
}

.lead-guide-image-wrap img {
  display: block;
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(19, 31, 40, 0.14);
}

.lead-guide-caption {
  display: grid;
  gap: 5px;
  padding: 16px 18px 18px;
  background: #fff;
}

.lead-guide-caption span {
  color: #1769aa;
  font-size: 13px;
  font-weight: 900;
}

.lead-guide-caption strong {
  color: #132f43;
  font-size: 20px;
  line-height: 1.28;
}

.lead-guide-caption p {
  margin: 0;
  color: #536872;
  line-height: 1.55;
}

.lead-guide-arrow {
  position: absolute;
  top: 43%;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(13, 31, 43, 0.78);
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.lead-guide-arrow:hover {
  background: #1769aa;
}

.lead-guide-arrow.prev {
  left: 18px;
}

.lead-guide-arrow.next {
  right: 18px;
}

.lead-guide-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
}

.lead-guide-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lead-guide-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #c8d5dd;
  cursor: pointer;
}

.lead-guide-dot.active {
  width: 26px;
  background: #1769aa;
}

.lead-guide-hint {
  color: #64747c;
  font-size: 13px;
}

.lead-guide-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 22, 30, 0.62);
}

.lead-guide-modal {
  width: min(1180px, 96vw);
  max-height: 94vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  overflow: hidden;
  padding: 18px;
  border-radius: 20px;
  background: #f7fafc;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

.lead-guide-modal > header,
.lead-guide-modal > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.lead-guide-modal h3 {
  margin: 0;
  color: #132f43;
  font-size: 22px;
}

.lead-guide-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #e6eef3;
  color: #33464f;
  font-size: 24px;
  cursor: pointer;
}

.lead-guide-close:hover {
  background: #d8e5ec;
}

.lead-guide-modal .lead-guide-image-wrap {
  min-height: 360px;
  max-height: calc(94vh - 250px);
}

.lead-guide-never {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #52646e;
  font-weight: 800;
}

.lead-guide-never input {
  width: 16px;
  height: 16px;
}

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

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

.time-rule-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border: 1px solid #d8e6f0;
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 8%, rgba(23, 105, 170, 0.12), transparent 30%),
    linear-gradient(135deg, #f7fbff 0%, #eef7fb 100%);
  box-shadow: 0 16px 36px rgba(32, 55, 68, 0.08);
}

.time-rule-hero h1 {
  margin: 0;
  color: #143349;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.16;
}

.time-rule-hero p {
  margin: 10px 0 0;
  max-width: 860px;
  color: #516673;
  font-size: 15px;
  line-height: 1.65;
}

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

.time-rule-principles div {
  min-height: 88px;
  padding: 16px;
  border: 1px solid rgba(23, 105, 170, 0.14);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(32, 55, 68, 0.06);
}

.time-rule-principles strong {
  display: block;
  margin-bottom: 8px;
  color: #0f5f9d;
  font-size: 17px;
}

.time-rule-principles span {
  color: #596d78;
  line-height: 1.5;
}

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

.time-rule-toc {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #dbe8f1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(32, 55, 68, 0.06);
}

.time-rule-toc strong {
  margin-bottom: 4px;
  color: #18394f;
}

.time-rule-toc a {
  padding: 7px 9px;
  border-radius: 9px;
  color: #3d5360;
  text-decoration: none;
  line-height: 1.35;
}

.time-rule-toc a:hover {
  background: #eaf4fb;
  color: var(--primary-strong);
}

.time-rule-sections {
  display: grid;
  gap: 14px;
}

.time-rule-section {
  padding: 18px;
  border: 1px solid #dbe8f1;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(32, 55, 68, 0.05);
  scroll-margin-top: 18px;
}

.time-rule-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: #18394f;
  font-size: 19px;
}

.time-rule-section h3 span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
}

.time-rule-table-wrap {
  overflow-x: auto;
  border: 1px solid #e1eaf0;
  border-radius: 4px;
}

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

.time-rule-table th,
.time-rule-table td {
  height: 26px;
  padding: 2px 5px;
  border-bottom: 1px solid #dbe3e8;
  text-align: left;
  vertical-align: top;
  line-height: 1.25;
  white-space: nowrap;
}

.time-rule-table th {
  background: #edf2f5;
  color: #39505c;
  font-weight: 700;
}

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

.time-rule-table td:first-child {
  color: #102f45;
  font-weight: 700;
}

.time-rule-formula {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #b9d8ed;
  border-radius: 11px;
  background: #eef7fd;
  color: #0f5f9d;
  font-weight: 800;
  line-height: 1.5;
}

.time-rule-note,
.time-rule-example {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff8e8;
  border: 1px solid #f4d996;
  color: #6d5313;
  line-height: 1.65;
}

.time-rule-note.strong {
  background: #fff1f1;
  border-color: #f4bbbb;
  color: #9b2f2f;
  font-weight: 700;
}

.time-rule-grid-mini {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.time-rule-grid-mini span {
  padding: 11px 12px;
  border: 1px solid #e1eaf0;
  border-radius: 12px;
  background: #f7fbfe;
  color: #465d69;
  line-height: 1.5;
}

.time-rule-employee-list {
  margin: 0;
  padding-left: 24px;
  color: #304b5a;
  line-height: 1.85;
  font-size: 15px;
}

.guide-poster {
  width: min(1180px, 100%);
  background:
    radial-gradient(circle at 12% 12%, rgba(23, 105, 170, 0.14), transparent 28%),
    linear-gradient(135deg, #f8fbff 0%, #eef6f2 100%);
  border: 1px solid #d8e5ec;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 18px 42px rgba(32, 55, 68, 0.10);
}

.guide-poster-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.guide-eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e3f0fb;
  color: var(--primary-strong);
  font-weight: 700;
}

.guide-poster h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  color: #16354a;
}

.guide-poster p {
  margin: 10px 0 0;
  max-width: 680px;
  color: #4d626e;
  font-size: 16px;
  line-height: 1.65;
}

.guide-hero-card {
  min-height: 128px;
  padding: 20px;
  border-radius: 16px;
  display: grid;
  align-content: center;
  gap: 8px;
  background: #173b55;
  color: #fff;
}

.guide-hero-card strong {
  font-size: 26px;
  line-height: 1.2;
}

.guide-hero-card span {
  color: #cde0ec;
  line-height: 1.45;
}

.guide-action-grid,
.guide-quick-grid,
.guide-role-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.guide-action-card,
.guide-quick-card,
.guide-role-card,
.guide-screen-card,
.guide-flow-card {
  border: 1px solid rgba(23, 105, 170, 0.13);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(32, 55, 68, 0.06);
}

.guide-action-card,
.guide-quick-card {
  min-height: 144px;
  padding: 16px;
}

.guide-action-card span,
.guide-quick-card span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.guide-action-card strong,
.guide-quick-card strong,
.guide-role-card strong,
.guide-flow-step strong {
  display: block;
  color: #152f42;
  font-size: 16px;
  line-height: 1.35;
}

.guide-action-card p,
.guide-quick-card p {
  margin-top: 8px;
  color: #566975;
  font-size: 13px;
  line-height: 1.55;
}

.guide-action-card p {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 8px;
  background: #e8f2fb;
  color: var(--primary-strong);
  font-weight: 700;
}

.guide-action-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #52646e;
  line-height: 1.65;
}

.guide-flow-card {
  margin: 14px 0;
  padding: 18px;
}

.guide-screen-card {
  margin: 14px 0;
  padding: 18px;
}

.guide-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.guide-section-title span {
  color: var(--primary-strong);
  font-weight: 800;
}

.guide-section-title strong {
  color: #41535d;
}

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

.guide-flow-step {
  position: relative;
  min-height: 92px;
  padding: 14px;
  border-radius: 14px;
  background: #f3f8fb;
  border: 1px solid #dce9f0;
}

.guide-flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -11px;
  width: 10px;
  height: 2px;
  background: #90aebf;
}

.guide-flow-step span {
  display: block;
  margin-top: 7px;
  color: #64747c;
  font-size: 13px;
  line-height: 1.45;
}

.guide-mock-table {
  display: grid;
  gap: 8px;
}

.guide-mock-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 110px 112px;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #dce9f0;
  border-radius: 12px;
  background: #f8fbfd;
}

.guide-mock-head {
  min-height: 36px;
  background: #edf5fa;
  color: #53656f;
  font-weight: 700;
}

.guide-mock-row strong {
  color: #122f43;
}

.guide-mock-row em {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-style: normal;
  font-weight: 800;
}

.guide-mock-row em.danger {
  background: #fde7e5;
  color: var(--danger);
}

.guide-mock-row em.warn {
  background: #fff3cd;
  color: #8a5a00;
}

.guide-mock-row b {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
}

.guide-callout-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.guide-callout-grid div {
  min-height: 76px;
  padding: 12px;
  border-radius: 12px;
  background: #f6faf7;
  border: 1px solid #d9e9dc;
}

.guide-callout-grid strong,
.guide-callout-grid span {
  display: block;
}

.guide-callout-grid span {
  margin-top: 6px;
  color: #5f6f66;
  line-height: 1.5;
}

.guide-role-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-role-card {
  min-height: 132px;
  padding: 16px;
}

.guide-role-card ul,
.guide-detail-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #52646e;
  line-height: 1.7;
}

.guide-role-card li,
.guide-detail-card li {
  margin: 2px 0;
}

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

.guide-detail-card h3 {
  margin: 0;
  color: #162f42;
  font-size: 16px;
}

.guide-detail-card .btn {
  margin-top: 14px;
}

.guide-worker-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 10% 15%, rgba(23, 105, 170, 0.12), transparent 28%),
    linear-gradient(135deg, #f8fbff 0%, #eef6f2 100%);
  border: 1px solid #d8e5ec;
  box-shadow: 0 14px 34px rgba(32, 55, 68, 0.08);
}

.guide-worker-hero h1 {
  margin: 0;
  color: #16354a;
  font-size: clamp(28px, 3.5vw, 42px);
  line-height: 1.15;
}

.guide-worker-hero p {
  margin: 10px 0 0;
  max-width: 760px;
  color: #4d626e;
  font-size: 16px;
  line-height: 1.65;
}

.guide-step-list {
  display: grid;
  gap: 18px;
}

.guide-step-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(32, 55, 68, 0.06);
}

.guide-step-copy {
  display: grid;
  align-content: start;
  gap: 10px;
}

.guide-step-number {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e3f0fb;
  color: var(--primary-strong);
  font-weight: 800;
}

.guide-step-copy h3 {
  margin: 0;
  color: #152f42;
  font-size: 22px;
  line-height: 1.25;
}

.guide-step-copy p {
  margin: 0;
  color: #52646e;
  line-height: 1.7;
}

.guide-screenshot {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid #d5e0e6;
  border-radius: 14px;
  background: #f3f6f8;
  padding: 18px;
}

.guide-todo-shot {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
}

.guide-side-menu {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: #24313a;
  color: #e8f0f4;
}

.guide-side-menu div {
  padding: 9px 10px;
  border-radius: 8px;
}

.guide-side-menu .is-target {
  background: #1769aa;
  color: #fff;
  font-weight: 800;
}

.guide-screen-body {
  min-width: 0;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #dfe6ea;
}

.guide-screen-title {
  margin-bottom: 10px;
  color: #152f42;
  font-size: 18px;
  font-weight: 800;
}

.guide-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 88px 94px;
  gap: 8px;
  align-items: center;
  min-height: 46px;
  padding: 9px 10px;
  border-bottom: 1px solid #e4ebef;
}

.guide-table-head {
  min-height: 34px;
  color: #60727c;
  background: #f3f7fa;
  border-radius: 8px;
  font-weight: 800;
}

.guide-table-row em,
.guide-table-row i {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-style: normal;
  font-weight: 800;
}

.guide-table-row em {
  color: var(--danger);
  background: #fde7e5;
}

.guide-table-row i {
  color: #8a5a00;
  background: #fff3cd;
}

.guide-table-row b,
.guide-button-row button {
  width: fit-content;
  padding: 7px 11px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.guide-button-row button.danger {
  background: var(--danger);
}

.guide-detail-shot,
.guide-confirm-shot,
.guide-submit-shot,
.guide-after-shot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.guide-task-card,
.guide-stage-panel,
.guide-modal-mini {
  padding: 14px;
  border: 1px solid #dce6ec;
  border-radius: 12px;
  background: #fff;
}

.guide-task-card label,
.guide-modal-mini label {
  display: block;
  margin-bottom: 6px;
  color: #66727a;
  font-size: 12px;
  font-weight: 700;
}

.guide-task-card strong {
  display: block;
  color: #152f42;
  font-size: 18px;
}

.guide-stage-panel {
  grid-column: 1 / -1;
}

.guide-stage-panel.wide {
  grid-column: 1 / span 2;
}

.guide-stage-title {
  margin-bottom: 8px;
  color: #152f42;
  font-size: 18px;
  font-weight: 800;
}

.guide-stage-panel p {
  margin: 6px 0;
  color: #52646e;
}

.guide-button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.guide-textarea,
.guide-input {
  padding: 12px;
  border: 1px solid #bfd1dc;
  border-radius: 10px;
  background: #fff;
  color: #52646e;
}

.guide-textarea {
  grid-column: 1 / -1;
  min-height: 82px;
}

.guide-textarea.small {
  min-height: 74px;
}

.guide-modal-mini {
  grid-column: 3;
  grid-row: 1 / span 2;
  display: grid;
  gap: 8px;
  box-shadow: 0 16px 34px rgba(32, 55, 68, 0.16);
}

.guide-note-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.guide-note-panel h3 {
  margin: 0 0 12px;
  color: #152f42;
}

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

.guide-note-grid div {
  min-height: 92px;
  padding: 14px;
  border-radius: 12px;
  background: #f8fafb;
  border: 1px solid #dce6ec;
}

.guide-note-grid strong,
.guide-note-grid p {
  display: block;
  margin: 0;
}

.guide-note-grid p {
  margin-top: 8px;
  color: #52646e;
  line-height: 1.6;
}

.guide-mark {
  position: absolute;
  border: 3px solid #e23b36;
  border-radius: 12px;
  pointer-events: none;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.08);
}

.guide-mark span {
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  width: max-content;
  max-width: 180px;
  padding: 5px 8px;
  border-radius: 8px;
  background: #e23b36;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.35;
}

.guide-mark-menu { left: 28px; top: 92px; width: 126px; height: 38px; }
.guide-mark-delay { right: 128px; top: 114px; width: 88px; height: 42px; }
.guide-mark-view { right: 34px; top: 114px; width: 94px; height: 42px; }
.guide-mark-current { left: 16px; top: 16px; width: 30%; height: 82px; }
.guide-mark-owner { left: 35%; top: 16px; width: 30%; height: 82px; }
.guide-mark-remark { left: 16px; bottom: 24px; width: calc(100% - 32px); height: 118px; }
.guide-mark-pass { left: 34px; top: 122px; width: 106px; height: 44px; }
.guide-mark-return { left: 148px; top: 122px; width: 106px; height: 44px; }
.guide-mark-note { left: 16px; bottom: 22px; width: calc(100% - 32px); height: 88px; }
.guide-mark-submit { left: 34px; top: 122px; width: 104px; height: 44px; }
.guide-mark-date { right: 24px; top: 86px; width: 28%; height: 58px; }
.guide-mark-overdue { right: 24px; top: 188px; width: 28%; height: 96px; }
.guide-mark-pending { left: 35%; top: 16px; width: 30%; height: 82px; }
.guide-mark-resubmit { left: 16px; bottom: 32px; width: calc(100% - 32px); height: 110px; }

.guide-target {
  outline: 3px solid #e23b36;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(226, 59, 54, 0.10);
}

.guide-step-card {
  grid-template-columns: 1fr;
  gap: 14px;
}

.guide-step-copy {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px 14px;
}

.guide-step-copy h3 {
  grid-column: 2;
}

.guide-step-copy p {
  grid-column: 2;
  max-width: 860px;
}

.guide-step-tips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: guide-tip;
}

.guide-step-tips li {
  counter-increment: guide-tip;
  min-height: 58px;
  padding: 12px 12px 12px 42px;
  position: relative;
  border: 1px solid #dce6ec;
  border-radius: 12px;
  background: #f8fafb;
  color: #3f515b;
  line-height: 1.5;
}

.guide-step-tips li::before {
  content: counter(guide-tip);
  position: absolute;
  left: 12px;
  top: 12px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.guide-app-shot {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  min-height: 390px;
  overflow: hidden;
  border: 1px solid #cfdce3;
  border-radius: 16px;
  background: #eef3f6;
}

.guide-app-sidebar {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px 14px;
  background: #24313a;
  color: #e8f0f4;
}

.guide-app-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 800;
}

.guide-app-brand::first-letter {
  color: #1769aa;
}

.guide-app-brand span {
  color: #fff;
}

.guide-app-sidebar > div:not(.guide-app-brand) {
  min-height: 38px;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 700;
}

.guide-app-sidebar > div.active {
  background: #1769aa;
  color: #fff;
}

.guide-app-main {
  min-width: 0;
  padding: 18px;
}

.guide-app-topbar {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 0 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #dce6ec;
}

.guide-app-topbar strong {
  color: #152f42;
  font-size: 20px;
}

.guide-app-topbar span {
  color: #66727a;
}

.guide-demo-panel {
  position: relative;
  min-height: 280px;
  padding: 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #dce6ec;
}

.guide-demo-panel h4 {
  margin: 0;
  color: #152f42;
  font-size: 20px;
}

.guide-demo-panel p {
  margin: 8px 0 0;
  color: #52646e;
  line-height: 1.55;
}

.guide-demo-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.guide-demo-toolbar span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef3f5;
  color: #52646e;
  font-weight: 700;
}

.guide-demo-toolbar .danger {
  background: #fde7e5;
  color: var(--danger);
}

.guide-demo-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.guide-demo-table th:nth-child(2),
.guide-demo-table td:nth-child(2) {
  width: 104px;
}

.guide-demo-table th:nth-child(3),
.guide-demo-table td:nth-child(3) {
  width: 86px;
}

.guide-demo-table th:nth-child(4),
.guide-demo-table td:nth-child(4) {
  width: 104px;
}

.guide-demo-table th,
.guide-demo-table td {
  height: 26px;
  padding: 2px 5px;
  border-bottom: 1px solid #dbe3e8;
  text-align: left;
  white-space: nowrap;
}

.guide-demo-table th {
  color: #39505c;
  background: #edf2f5;
}

.guide-demo-table em,
.guide-demo-table i {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.guide-demo-table em {
  color: var(--danger);
  background: #fde7e5;
}

.guide-demo-table i {
  color: #8a5a00;
  background: #fff3cd;
}

.guide-demo-table b,
.guide-demo-actions button {
  display: inline-block;
  width: fit-content;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.guide-demo-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.guide-demo-actions button.danger {
  background: var(--danger);
}

.guide-demo-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.guide-demo-cards div,
.guide-demo-stage,
.guide-demo-modal,
.guide-demo-textarea,
.guide-demo-input {
  border: 1px solid #dce6ec;
  border-radius: 12px;
  background: #f8fafb;
}

.guide-demo-cards div {
  min-height: 92px;
  padding: 14px;
}

.guide-demo-cards span {
  display: block;
  margin-bottom: 8px;
  color: #66727a;
  font-size: 12px;
  font-weight: 800;
}

.guide-demo-cards strong {
  color: #152f42;
  font-size: 19px;
}

.guide-demo-stage {
  margin-top: 14px;
  padding: 16px;
}

.guide-demo-stage strong {
  color: #152f42;
  font-size: 18px;
}

.guide-demo-textarea,
.guide-demo-input {
  padding: 12px;
}

.guide-demo-textarea {
  min-height: 92px;
  margin-top: 16px;
  color: #52646e;
}

.guide-demo-modal {
  max-width: 420px;
  margin-top: 18px;
  padding: 16px;
  display: grid;
  gap: 8px;
  box-shadow: 0 16px 34px rgba(32, 55, 68, 0.16);
}

.guide-demo-modal label {
  color: #66727a;
  font-size: 12px;
  font-weight: 800;
}

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

.template-sync-intro {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #f8fafb;
}

.template-sync-intro span {
  color: var(--muted);
}

.template-sync-template-field {
  margin-bottom: 14px;
}

.template-sync-list {
  display: grid;
  gap: 12px;
  max-height: min(58vh, 640px);
  overflow: auto;
  padding-right: 4px;
}

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

.template-sync-item.disabled {
  background: #f8fafb;
}

.template-sync-item-head {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.template-sync-item-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.template-sync-fields {
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

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

.template-sync-compare-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.template-sync-compare-card h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

.template-sync-stage-summary {
  display: grid;
  gap: 7px;
  margin: 0;
}

.template-sync-stage-summary div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 8px;
}

.template-sync-stage-summary dt {
  color: var(--muted);
}

.template-sync-stage-summary dd {
  min-width: 0;
  margin: 0;
  word-break: break-word;
}

.empty.compact {
  padding: 12px;
  min-height: 0;
}

.template-sync-remove {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
}

.template-sync-remove strong {
  color: var(--text);
}

.table-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}

.data-table .btn.small {
  box-sizing: border-box;
  min-height: 22px;
  padding: 2px 6px;
}

.product-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 18px;
}

.lifecycle-current-task {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  text-decoration: none;
}

.lifecycle-current-task:hover {
  border-color: var(--primary);
  background: #eef6fc;
}

.lifecycle-current-task span {
  color: var(--muted);
  font-size: 13px;
}

.product-conclusion {
  margin-top: 10px;
  min-height: 86px;
  padding: 12px;
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  background: #eef6fc;
  line-height: 1.7;
  white-space: pre-line;
}

.product-task-note {
  display: grid;
  gap: 10px;
}

.product-task-note div {
  display: grid;
  gap: 4px;
}

.product-task-note span {
  color: var(--muted);
  font-size: 12px;
}

.compact-empty {
  padding: 16px 0;
  text-align: left;
}

.series-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.series-product-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  text-decoration: none;
}

.series-product-card:hover {
  border-color: var(--primary);
  background: #eef6fc;
}

.series-product-card span {
  color: var(--muted);
  font-size: 13px;
}

.series-product-picker {
  display: grid;
  gap: 12px;
}

.product-picker-grid {
  max-height: 50vh;
  overflow: auto;
  padding-right: 4px;
}

.product-picker-table-wrap {
  max-height: 50vh;
  overflow: auto;
}

.product-picker-table {
  min-width: 980px;
}

.product-picker-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.product-picker-table tr.is-linked {
  background: #f8fafb;
}

.product-picker-table .select-col {
  width: 58px;
  text-align: center;
}

.product-picker-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.product-picker-card {
  align-items: flex-start;
}

.product-picker-card.is-linked {
  cursor: default;
  opacity: 0.7;
}

.stats-number {
  display: inline-block;
  min-width: 36px;
  font-size: 20px;
  color: var(--primary-strong);
}

.stage-map-group {
  display: grid;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.stage-map-group:first-child {
  padding-top: 0;
  border-top: 0;
}

.stage-map-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.stage-map-title strong {
  font-size: 17px;
}

.stage-map-title span {
  color: var(--muted);
  font-size: 13px;
}

.stage-map-flow {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 8px;
  overflow-x: visible;
  padding: 4px 0 8px;
}

.stage-map-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.stage-map-node {
  position: relative;
  display: grid;
  align-content: start;
  gap: 5px;
  width: 158px;
  min-height: 108px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  color: var(--text);
  text-align: left;
}

.stage-map-node:disabled {
  cursor: default;
}

.stage-map-node.active {
  border-color: var(--primary);
  background: #eef6fc;
  box-shadow: 0 8px 18px rgba(23, 105, 170, 0.12);
}

.stage-map-node strong {
  line-height: 1.35;
}

.stage-map-node small {
  color: var(--muted);
}

.stage-map-node em {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-style: normal;
  font-weight: 800;
  line-height: 34px;
  text-align: center;
}

.stage-map-order {
  width: fit-content;
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e9eef1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stage-map-arrow {
  color: var(--muted);
  font-size: 22px;
  font-weight: 800;
}

.stage-map-empty {
  padding: 10px 0 0;
}

.stage-map-details {
  display: grid;
  gap: 10px;
}

.stage-map-detail {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.stage-map-detail > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stage-map-task {
  display: inline-grid;
  gap: 2px;
  max-width: 360px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #eef6fc;
  color: var(--primary-strong);
  text-decoration: none;
  font-weight: 800;
}

.stage-map-task span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stage-map-task.delayed {
  background: #fde7e5;
  color: #c2413a;
}

.snapshot-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 16px;
  min-height: 680px;
}

.snapshot-list {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 720px;
  overflow: auto;
}

.snapshot-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.snapshot-item.active {
  border-color: var(--primary);
  background: #eef6fc;
}

.snapshot-item span,
.snapshot-item small {
  color: var(--muted);
}

.snapshot-preview {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  overflow: hidden;
}

.snapshot-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

#snapshotPreviewFrame {
  display: block;
  width: 100%;
  height: 720px;
  border: 0;
  background: #fff;
}

.compact-cell-text {
  max-width: 170px;
  margin-top: 4px;
  font-size: 12px;
}

.stage-delay-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 220px;
}

.active-stage-list,
.active-stage-date-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.active-stage-date-list small {
  color: var(--muted);
}

.task-remark-cell {
  max-width: 220px;
  color: var(--muted);
  font-size: 13px;
}

.task-list-table .task-remark-cell {
  max-width: none;
  vertical-align: top;
}

.task-remark-text {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 1.45;
}

.task-concerned-cell {
  text-align: center;
  word-break: break-word;
}

.task-actions-cell {
  vertical-align: top;
}

.task-actions-cell .table-actions {
  min-width: 168px;
  max-width: 220px;
}

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

.stats-task-list {
  display: grid;
  gap: 8px;
  min-width: 260px;
}

.stats-task-link {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  color: var(--text);
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.stats-task-link:hover {
  border-color: var(--primary);
  background: #eef6fc;
}

.stats-task-link span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-task-link strong {
  color: var(--primary-strong);
  white-space: nowrap;
}

.stats-task-link strong.delayed {
  color: var(--danger);
}

.performance-task-list {
  display: grid;
  gap: 8px;
  min-width: 420px;
  max-height: 360px;
  overflow: auto;
}

.performance-task-item {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.performance-task-item:hover {
  border-color: var(--primary);
  background: #eef6fc;
}

.performance-task-item strong,
.performance-task-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-task-item small {
  margin-top: 3px;
  color: var(--muted);
}

.performance-task-meta {
  display: grid;
  gap: 4px;
  justify-items: end;
  font-size: 12px;
}

.performance-task-meta b {
  color: var(--primary-strong);
}

.performance-task-meta b.delayed {
  color: var(--danger);
}

.performance-task-meta em {
  padding: 2px 7px;
  border-radius: 999px;
  background: #edf3f7;
  color: var(--muted);
  font-style: normal;
}

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

.task-stage-complexity-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.05fr) 116px 86px 86px minmax(130px, 0.55fr) minmax(300px, 1.45fr) 180px;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.task-stage-complexity-row strong {
  display: block;
  line-height: 1.35;
}

.similar-task-copy-panel {
  margin-bottom: 14px;
  border-color: #b9d8f4;
  background: linear-gradient(180deg, #f6fbff 0%, #ffffff 100%);
}

.similar-task-copy-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.similar-task-copy-header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--primary-strong);
}

.similar-task-copy-header p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.similar-task-copy-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(360px, 1.4fr) auto;
  gap: 14px;
  align-items: end;
}

.similar-task-copy-action {
  display: flex;
  align-items: end;
}

.similar-task-copy-action .btn {
  min-height: 40px;
  white-space: nowrap;
}

.similar-task-copy-hint {
  margin-top: 10px;
}

.duration-hint {
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
  line-height: 1.5;
}

.owner-transfer-evaluation {
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fff7ed;
  padding: 12px;
}

.owner-transfer-evaluation-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
  color: #9a3412;
}

.owner-transfer-evaluation-box strong {
  font-weight: 700;
  color: #c2410c;
}

.owner-transfer-evaluation textarea {
  min-height: 76px;
}

.batch-owner-transfer-evaluation {
  margin: 10px 0;
}

.stage-template-note {
  margin-top: 8px;
  padding: 8px 10px;
  border-left: 3px solid var(--primary);
  border-radius: 0 6px 6px 0;
  background: #eef6fc;
  color: #30424d;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-line;
}

.stage-template-note.requirement-note {
  border-left-color: #f59e0b;
  background: #fff8e6;
}

.stage-requirement {
  margin-top: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #fff8e6;
  color: #553b06;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-line;
}

.stage-requirement.compact {
  display: block;
  margin-top: 6px;
  padding: 0;
  background: transparent;
  color: var(--muted);
}

.stage-requirement-source {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e7f0ff;
  color: var(--primary);
  font-size: 11px;
  white-space: nowrap;
}

.stage-requirement-editor textarea {
  min-height: 64px;
}

.stage-requirement-editor {
  padding: 8px;
  border: 1px solid #f2d58b;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  background: #fffaf0;
}

.stage-requirement-editor label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #8a5a00;
  font-weight: 700;
}

.stage-requirement-editor label span {
  padding: 2px 7px;
  border-radius: 999px;
  background: #fff0c2;
  color: #9a6700;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.stage-requirement-editor textarea {
  border-color: #e8c56f;
  background: #fff;
  font-weight: 600;
}

.stage-requirement-editor .field-hint {
  color: #8a5a00;
}

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

.log-item {
  border-left: 3px solid var(--primary);
  background: #f8fafb;
  padding: 10px 12px;
  border-radius: 0 8px 8px 0;
}

.log-item time {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

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

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

.template-row h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.template-map-preview {
  margin-top: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.template-map-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.template-map-head span {
  color: var(--muted);
  font-size: 13px;
}

.template-map-canvas {
  overflow: auto;
  padding: 16px;
  background: #fafafa;
}

.template-map-canvas svg {
  display: block;
  min-width: 100%;
  height: auto;
}

.template-map-edge {
  fill: none;
  stroke: #222;
  stroke-width: 1.4;
  marker-end: url("#template-map-arrow");
}

#template-map-arrow path {
  fill: #222;
}

.template-map-node rect {
  fill: #fff;
  stroke: #222;
  stroke-width: 1.2;
}

.template-map-node text {
  fill: #111;
  font-size: 12px;
  text-anchor: middle;
  dominant-baseline: middle;
}

.stage-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.template-add-stage-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.template-add-stage-control label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.template-add-stage-control select {
  min-width: 220px;
  max-width: 340px;
}

.stage-editor-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfd;
}

.stage-row-order {
  display: grid;
  gap: 8px;
  grid-row: 1 / span 6;
  align-self: stretch;
  align-content: start;
}

.stage-order-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e7f2ff;
  color: #075b9f;
  font-weight: 700;
}

.stage-row-order .btn {
  width: 100%;
  min-height: 32px;
}

.stage-row-order .btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.stage-row-main,
.stage-row-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  grid-column: 2 / -1;
}

.template-duration-summary {
  grid-column: 2 / -1;
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid #d7e5ed;
  border-radius: 8px;
  background: #f6fafc;
}

.template-duration-line {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.template-duration-line > span {
  color: #3d4d56;
  font-weight: 700;
}

.template-duration-line > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.template-duration-line em {
  color: var(--muted);
  font-style: normal;
}

.template-duration-actions {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.template-duration-source {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.template-duration-source.is-position {
  background: #e8f6ef;
  color: #146b4f;
}

.template-duration-source.is-custom {
  background: #fff5df;
  color: #8a5a12;
}

.template-duration-editor {
  grid-column: 2 / -1;
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #d7e5ed;
  border-radius: 8px;
  background: #fbfdff;
}

.template-duration-editor-title {
  color: #3d4d56;
  font-size: 12px;
  font-weight: 700;
}

.template-duration-edit-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.template-duration-edit-item {
  display: inline-grid;
  grid-template-columns: auto 68px auto;
  gap: 6px;
  align-items: center;
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid #d7e5ed;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.template-duration-edit-item input,
.template-duration-edit-item select {
  height: 28px;
  padding: 4px 6px;
  font-size: 12px;
}

.template-duration-edit-item em {
  color: var(--muted);
  font-style: normal;
  font-weight: 500;
}

.template-duration-edit-item.is-wide {
  grid-template-columns: auto 96px;
}

.stage-row-dependency {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 120px 76px;
  gap: 12px;
  grid-column: 2 / -1;
}

.stage-row-description {
  grid-column: 2 / -1;
}

.stage-editor-row input,
.stage-editor-row select,
.stage-editor-row textarea {
  min-width: 0;
  width: 100%;
}

.stage-editor-row select[multiple] {
  min-height: 96px;
}

.stage-editor-row textarea {
  min-height: 64px;
  resize: vertical;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 29, 34, 0.46);
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal {
  width: min(820px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: #fff;
  border-radius: 6px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.modal.issue-form-modal {
  width: min(900px, 100%);
}

.modal header {
  padding: 16px 18px 0;
}

.modal h3 {
  margin: 0;
  font-size: 17px;
}

.modal form {
  display: grid;
  gap: 12px;
  padding: 16px 18px 18px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.toast {
  position: fixed;
  right: 20px;
  top: 18px;
  z-index: 70;
  display: grid;
  gap: 8px;
}

.toast-item {
  padding: 11px 14px;
  border-radius: 8px;
  background: #20272b;
  color: #fff;
  box-shadow: var(--shadow);
}

.toast-item.error {
  background: var(--danger);
}

.toast-item.ok {
  background: var(--ok);
}

.level-description-popup {
  position: fixed;
  z-index: 90;
  width: min(520px, calc(100vw - 16px));
  max-height: min(420px, calc(100vh - 16px));
  overflow: auto;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(15, 29, 38, 0.22);
}

.level-description-popup-title {
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 700;
}

.level-description-popup table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.level-description-popup th,
.level-description-popup td {
  height: 26px;
  padding: 2px 5px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.level-description-popup th {
  color: var(--muted);
  font-size: 12px;
  background: #f8fafb;
}

.level-description-popup tr:last-child td {
  border-bottom: 0;
}

.level-description-popup tr.is-selected td {
  background: #eef7fd;
}

.level-current {
  display: inline-flex;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--primary);
  background: #dff0fb;
  font-size: 12px;
  font-weight: 600;
}

.print-sheet {
  display: none;
}

@media print {
  @page {
    size: A4 landscape;
    margin: 12mm;
  }

  html,
  body {
    width: 297mm;
    min-height: 210mm;
    background: #fff !important;
  }

  body * {
    visibility: hidden !important;
  }

  .print-sheet,
  .print-sheet * {
    visibility: visible !important;
  }

  .print-sheet {
    display: block !important;
    position: absolute;
    inset: 0 auto auto 0;
    width: 277mm;
    color: #111;
    background: #fff;
    font-size: 9.2pt;
    line-height: 1.25;
  }

  .print-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48mm;
    gap: 10mm;
    align-items: start;
    padding-bottom: 5mm;
    border-bottom: 2px solid #111;
  }

  .print-header h1 {
    margin: 0 0 2mm;
    font-size: 18pt;
    line-height: 1.25;
  }

  .print-header p,
  .print-meta span {
    margin: 0;
    color: #444;
  }

  .print-meta {
    display: grid;
    gap: 2mm;
    text-align: right;
  }

  .print-meta strong {
    font-size: 13pt;
  }

  .print-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 5mm 0;
    border: 1px solid #555;
    border-bottom: 0;
  }

  .print-summary div {
    display: grid;
    grid-template-columns: 26mm minmax(0, 1fr);
    border-bottom: 1px solid #555;
  }

  .print-summary div:nth-child(odd) {
    border-right: 1px solid #555;
  }

  .print-summary span,
  .print-summary strong {
    padding: 2.4mm 3mm;
  }

  .print-summary span {
    background: #f0f0f0;
    color: #333;
    font-weight: 700;
  }

  .print-summary strong {
    font-weight: 700;
  }

  .print-sheet h2 {
    margin: 5mm 0 2.5mm;
    font-size: 13pt;
  }

  .print-page {
    break-after: page;
    page-break-after: always;
  }

  .print-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .print-stage-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    page-break-inside: auto;
  }

  .print-stage-table th,
  .print-stage-table td {
    padding: 1.4mm 1.3mm;
    border: 1px solid #555;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
  }

  .print-stage-table th {
    background: #eee;
    font-weight: 700;
  }

  .print-stage-table th:nth-child(1),
  .print-stage-table td:nth-child(1) {
    width: 7mm;
    text-align: center;
  }

  .print-stage-table th:nth-child(2),
  .print-stage-table td:nth-child(2) {
    width: 34mm;
  }

  .print-stage-table th:nth-child(3),
  .print-stage-table td:nth-child(3) {
    width: 20mm;
  }

  .print-stage-table th:nth-child(4),
  .print-stage-table td:nth-child(4) {
    width: 18mm;
  }

  .print-stage-table th:nth-child(5),
  .print-stage-table td:nth-child(5),
  .print-stage-table th:nth-child(6),
  .print-stage-table td:nth-child(6) {
    width: 17mm;
    white-space: nowrap;
  }

  .print-stage-table th:nth-child(7),
  .print-stage-table td:nth-child(7),
  .print-stage-table th:nth-child(8),
  .print-stage-table td:nth-child(8) {
    width: 22mm;
    white-space: nowrap;
  }

  .print-stage-table th:nth-child(9),
  .print-stage-table td:nth-child(9) {
    width: 16mm;
  }

  .print-stage-table th:nth-child(10),
  .print-stage-table td:nth-child(10) {
    width: 28mm;
    text-align: center;
    font-weight: 700;
  }

  .print-stage-table th:nth-child(11),
  .print-stage-table td:nth-child(11) {
    width: 14mm;
  }

  .print-stage-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .print-stage-table small {
    display: block;
    margin-top: 1mm;
    color: #555;
  }

  .print-note {
    padding: 3mm;
    border: 1px solid #555;
    white-space: pre-wrap;
  }

  .print-stats-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
  }

  .print-stats-table th,
  .print-stats-table td {
    padding: 2.1mm 2mm;
    border: 1px solid #555;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
  }

  .print-stats-table th {
    background: #eee;
    font-weight: 700;
  }

  .print-stats-table th:nth-child(1),
  .print-stats-table td:nth-child(1) {
    width: 32mm;
  }

  .print-stats-table th:nth-child(2),
  .print-stats-table td:nth-child(2),
  .print-stats-table th:nth-child(3),
  .print-stats-table td:nth-child(3),
  .print-stats-table th:nth-child(4),
  .print-stats-table td:nth-child(4),
  .print-stats-table th:nth-child(5),
  .print-stats-table td:nth-child(5),
  .print-stats-table th:nth-child(6),
  .print-stats-table td:nth-child(6) {
    width: 18mm;
  }

  .print-stats-table th:nth-child(7),
  .print-stats-table td:nth-child(7) {
    width: 40mm;
  }

  .print-stats-table th:nth-child(8),
  .print-stats-table td:nth-child(8) {
    width: 38mm;
  }

  .print-task-progress-group {
    margin-top: 4mm;
  }

  .print-task-progress-group h2 {
    display: flex;
    justify-content: space-between;
    margin: 0 0 1.2mm;
    padding: 1.4mm 2mm;
    border-left: 4px solid #333;
    background: #f1f3f5;
  }

  .print-task-progress-group h2 small {
    color: #555;
    font-size: 9pt;
  }

  .print-task-progress-group p {
    margin: 0 0 1.5mm;
    color: #555;
    font-size: 8.5pt;
  }

  .performance-print-table th:nth-child(1),
  .performance-print-table td:nth-child(1) {
    width: 22mm;
  }

  .performance-print-table th:nth-child(2),
  .performance-print-table td:nth-child(2) {
    width: 42mm;
  }

  .performance-print-table th:nth-child(3),
  .performance-print-table td:nth-child(3) {
    width: 26mm;
  }

  .performance-print-table th:nth-child(4),
  .performance-print-table td:nth-child(4) { width: 24mm; }

  .performance-print-table th:nth-child(5),
  .performance-print-table td:nth-child(5) { width: 22mm; }

  .performance-print-table th:nth-child(6),
  .performance-print-table td:nth-child(6),
  .performance-print-table th:nth-child(7),
  .performance-print-table td:nth-child(7) { width: 28mm; }

  .performance-print-table th:nth-child(8),
  .performance-print-table td:nth-child(8),
  .performance-print-table th:nth-child(9),
  .performance-print-table td:nth-child(9),
  .performance-print-table th:nth-child(10),
  .performance-print-table td:nth-child(10) { width: 18mm; }

  .print-stats-table small {
    color: #555;
  }

  .toast,
  .modal-backdrop {
    display: none !important;
  }
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    overflow-y: visible;
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .filters,
  .form-grid,
  .form-grid.three,
  .detail-grid,
  .summary-grid,
  .two-column-grid,
  .product-overview-grid {
    grid-template-columns: 1fr;
  }

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

  .stage-row-order {
    grid-template-columns: auto repeat(3, minmax(72px, 96px));
    align-items: center;
  }

  .stage-row-description {
    grid-column: auto;
  }

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

  .task-stage-complexity-row {
    grid-template-columns: 1fr;
  }

  .similar-task-copy-grid {
    grid-template-columns: 1fr;
  }

  .similar-task-copy-header {
    flex-direction: column;
  }

  .guide-poster-hero,
  .time-rule-hero,
  .time-rule-principles,
  .time-rule-layout,
  .time-rule-grid-mini,
  .guide-action-grid,
  .guide-quick-grid,
  .guide-flow,
  .guide-callout-grid,
  .guide-role-grid {
    grid-template-columns: 1fr;
  }

  .time-rule-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .time-rule-toc {
    position: static;
  }

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

  .guide-worker-hero,
  .guide-step-card,
  .guide-todo-shot,
  .guide-detail-shot,
  .guide-confirm-shot,
  .guide-submit-shot,
  .guide-after-shot,
  .guide-note-grid {
    grid-template-columns: 1fr;
  }

  .guide-worker-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .guide-stage-panel.wide,
  .guide-modal-mini {
    grid-column: 1;
    grid-row: auto;
  }

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

  .guide-mark {
    display: none;
  }

  .guide-flow-step:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 640px) {
  .ai-usage-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-panel,
  .content,
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

  .toolbar {
    width: 100%;
  }

  .toolbar .btn {
    flex: 1;
  }
}
