:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --panel: #fbfcfe;
  --text: #202833;
  --muted: #627083;
  --line: #d9e0e8;
  --blue: #2457a6;
  --teal: #087f7b;
  --red: #b42318;
  --amber: #a15c07;
  --green: #137333;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 18px;
  line-height: 1.15;
}

h2,
h3 {
  font-size: 16px;
}

.small,
.record-head span,
.task-title span {
  color: var(--muted);
  font-size: 11px;
}

.top-actions,
.button-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.health {
  color: var(--green);
  font-size: 11px;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 246, 248, 0.96)),
    repeating-linear-gradient(90deg, transparent 0 45px, rgba(36, 87, 166, 0.07) 45px 46px),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(8, 127, 123, 0.06) 31px 32px);
}

.login-card {
  width: min(360px, 100%);
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 42px rgba(16, 24, 40, 0.14);
}

.login-brand {
  display: grid;
  gap: 4px;
  padding-bottom: 6px;
}

.login-brand strong {
  font-size: 20px;
}

.login-brand span,
.login-message {
  color: var(--muted);
  font-size: 12px;
}

.login-card label,
.account-create-row label,
.plan-select-control {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
}

.login-card input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--text);
}

.app-shell {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 10px 16px;
  align-items: start;
}

body[data-active-workspace="schedule"] .app-shell {
  grid-template-columns: 68px minmax(0, 1fr);
  padding: 8px 10px 16px;
}

.account-plan-bar {
  position: relative;
  top: 8px;
  z-index: 40;
  display: grid;
  min-width: 0;
  margin-bottom: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  box-shadow: none;
}

.plan-bar-main {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  min-width: 0;
}

.plan-utility-bar {
  color: #64748b;
}

.plan-tool-label {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 6px;
  background: #eef2f7;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.plan-tool-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.plan-user-block {
  display: grid;
  gap: 2px;
  min-width: 138px;
  padding-right: 8px;
  border-right: 1px solid var(--line);
}

.plan-user-block strong {
  font-size: 13px;
}

.plan-user-block span {
  color: var(--muted);
  font-size: 11px;
}

.plan-select-control {
  display: grid;
  grid-template-columns: 48px minmax(220px, 1fr);
  align-items: center;
  flex: 1 1 auto;
  min-width: 280px;
}

.plan-select-control select,
.account-create-row input,
.account-create-row select {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
  color: var(--text);
}

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

.account-management-section {
  padding: 0;
  overflow-x: auto;
}

.account-create-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr)) 88px;
  gap: 8px;
  align-items: end;
}

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

.account-create-card,
.account-list-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.account-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.account-section-title strong {
  font-size: 14px;
}

.account-section-title span {
  color: var(--muted);
  font-size: 11px;
}

.account-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.account-table-head,
.account-table-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(130px, 1fr) 128px 96px minmax(150px, 1fr) 72px 56px;
  gap: 8px;
  align-items: center;
  min-width: 980px;
  padding: 8px 10px;
}

.account-table-head {
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.account-table-row {
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.account-table-row.disabled {
  background: #f8fafc;
  color: var(--muted);
}

.account-identity {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-identity strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-identity span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-row-field,
.account-table-row input,
.account-table-row select {
  min-width: 0;
}

.account-table-row input,
.account-table-row select {
  width: 100%;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  background: #ffffff;
}

.account-status-pill {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.account-status-pill.on {
  background: #e8f7ee;
  color: var(--green);
}

.account-status-pill.off {
  background: #f3f4f6;
  color: var(--muted);
}

.account-empty {
  padding: 16px;
  color: var(--muted);
  font-size: 12px;
}

.sidebar {
  position: sticky;
  top: 8px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  min-height: calc(100vh - 70px);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: var(--shadow);
}

.sidebar-head {
  display: grid;
  gap: 4px;
  padding: 8px 8px 12px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

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

.sidebar.collapsed {
  width: 68px;
  padding: 10px 8px;
}

.sidebar.collapsed .sidebar-head {
  min-height: 52px;
  padding: 6px 0 10px;
  place-items: center;
}

.sidebar.collapsed .workspace-tab span {
  display: none;
}

.sidebar.collapsed .sidebar-user-chip span {
  display: none;
}

.sidebar.collapsed .sidebar-head strong {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--blue);
  color: #ffffff;
  font-size: 13px;
}

.sidebar.collapsed .sidebar-head span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.sidebar.collapsed .workspace-tab {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 58px;
  padding: 8px 6px;
  text-align: center;
}

.workspace-tab b {
  display: none;
  font-size: 14px;
  line-height: 1;
}

.sidebar.collapsed .workspace-tab b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #f1f5f9;
  color: var(--muted);
}

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

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

.metric {
  min-height: 76px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
}

.workspace,
.workspace-shell {
  min-width: 0;
}

.workspace {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.workspace-nav,
.tabs {
  display: grid;
  gap: 4px;
  overflow-x: auto;
}

.sidebar-account-actions {
  display: grid;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.sidebar-user-chip {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 44px;
  color: var(--muted);
  font-size: 11px;
}

.sidebar-user-chip strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #c7d2e1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 14px;
}

.account-nav-button {
  width: 100%;
}

.workspace-tab,
.tab {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 8px 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  font-weight: 800;
}

.workspace-tab.active,
.tab.active {
  background: #eef4ff;
  color: var(--blue);
  font-weight: 700;
}

.sidebar.collapsed .workspace-tab.active b {
  background: #e5eefc;
  color: var(--blue);
}

.workspace-panel,
.panel {
  display: none;
  padding: 0;
}

.workspace-panel.active {
  display: grid;
  gap: 6px;
}

.panel.active {
  display: block;
}

.schedule-command-center {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  min-height: calc(100vh - 96px);
}

.schedule-command-center.drawer-open {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.schedule-command-bar {
  position: relative;
  z-index: 25;
  display: grid;
  gap: 6px;
  min-width: 0;
  margin-bottom: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.command-title-row,
.command-work-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.command-title-block {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.command-title-block h1 {
  flex: 0 0 auto;
  font-size: 17px;
  line-height: 1.1;
}

.command-title-block span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-plan-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.command-plan-status .health {
  overflow: hidden;
  max-width: min(760px, 52vw);
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-utility-details {
  position: relative;
  flex: 0 0 auto;
}

.schedule-utility-details summary {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d7e0ec;
  border-radius: 7px;
  padding: 4px 10px;
  background: #fbfcfe;
  color: #64748b;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}

.schedule-utility-details summary::-webkit-details-marker {
  display: none;
}

.schedule-utility-details[open] {
  flex: 1 1 100%;
  display: grid;
  gap: 4px;
  padding: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fbfcfe;
}

.schedule-utility-details[open] summary {
  width: max-content;
}

.schedule-workflow {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 4px;
  min-width: 0;
}

.workflow-step {
  min-width: 0;
  min-height: 34px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  grid-template-rows: 15px 13px;
  align-items: center;
  gap: 1px 5px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.workflow-step span {
  grid-row: 1 / 3;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.workflow-step strong,
.workflow-step small {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-step strong {
  font-size: 11px;
  line-height: 1.1;
}

.workflow-step small {
  color: var(--muted);
  font-size: 10px;
}

.workflow-step.done {
  border-color: #b8dec5;
  background: #f0f8f3;
}

.workflow-step.done span {
  background: #2f8f4e;
  color: #ffffff;
}

.workflow-step.active {
  border-color: #9bbcf8;
  background: #eef4ff;
  box-shadow: inset 3px 0 0 var(--blue);
}

.workflow-step.active span {
  background: var(--blue);
  color: #ffffff;
}

.workflow-step.idle {
  color: #64748b;
}

.schedule-operating-model {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 4px;
  min-width: 0;
}

.schedule-operating-model span {
  min-width: 0;
  min-height: 26px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  border: 1px solid #d7e0ec;
  border-radius: 7px;
  background: #fbfcfe;
  color: var(--muted);
  font-size: 10px;
}

.schedule-operating-model strong {
  color: var(--text);
  white-space: nowrap;
}

.schedule-action-hub {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 0;
  padding: 3px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fbfcfe;
}

.schedule-action-hub button {
  min-height: 24px;
  padding: 3px 7px;
  font-size: 11px;
  white-space: nowrap;
}

.delivery-constraint-panel {
  display: grid;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.delivery-primary-panel {
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid #a9c7f7;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  box-shadow: inset 3px 0 0 var(--blue);
}

.delivery-primary-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.step-badge {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--blue);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.delivery-primary-head div,
.preview-title div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.delivery-primary-head strong,
.preview-title strong {
  font-size: 15px;
  line-height: 1.1;
}

.delivery-section-kicker {
  color: #1f5da8;
  font-size: 11px;
  font-weight: 900;
}

.delivery-primary-head small,
.preview-title small {
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-controls {
  display: grid;
  grid-template-columns: minmax(280px, 1.7fr) minmax(150px, 0.8fr) repeat(2, minmax(118px, 0.7fr)) minmax(156px, auto);
  gap: 6px;
  align-items: end;
}

.delivery-controls strong {
  align-self: center;
  white-space: nowrap;
  font-size: 14px;
}

.delivery-controls label {
  gap: 3px;
  font-size: 11px;
}

.delivery-controls input,
.delivery-controls select {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

.delivery-project-scope {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.delivery-project-scope > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.delivery-project-picker {
  display: flex;
  gap: 5px;
  align-items: stretch;
  max-height: 78px;
  overflow: auto;
  padding: 2px;
}

.delivery-project-option {
  display: grid;
  gap: 3px;
  flex: 0 0 178px;
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid #d7e0ec;
  border-radius: 7px;
  background: #ffffff;
}

.delivery-project-option.active {
  border-color: rgba(36, 87, 166, 0.42);
  background: #f4f8ff;
  box-shadow: inset 3px 0 0 var(--blue);
}

.delivery-project-option.all {
  flex-basis: 140px;
}

.delivery-project-option label,
.delivery-project-priority {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.delivery-project-option input[type="checkbox"] {
  width: 14px;
  min-height: 14px;
  margin: 0;
}

.delivery-project-name,
.delivery-project-option label span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-project-option em,
.delivery-project-priority span {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.delivery-project-priority {
  justify-content: space-between;
}

.delivery-project-priority select {
  width: 56px;
  min-height: 24px;
  padding: 2px 5px;
  font-size: 11px;
}

.delivery-controls .primary,
.hero-action {
  min-height: 36px;
  padding: 7px 14px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 900;
}

.delivery-action-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 24px;
  padding-top: 2px;
  border-top: 1px dashed #bfd4f4;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.delivery-action-hint span {
  color: #1f5da8;
}

.delivery-action-hint em {
  color: #166534;
  font-style: normal;
}

.delivery-mode-note {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 26px;
  padding: 4px 6px;
  border: 1px solid #d7e0ec;
  border-radius: 7px;
  background: #f8fafc;
  color: #5f6f86;
  font-size: 11px;
  font-weight: 700;
}

.delivery-mode-note strong {
  color: #1f5da8;
  font-size: 12px;
}

.delivery-mode-note span {
  color: #475569;
}

.delivery-mode-note em {
  margin-left: auto;
  color: #166534;
  font-style: normal;
}

.delivery-resource-guide {
  display: grid;
  grid-template-columns: minmax(138px, 0.8fr) minmax(250px, 1.45fr) minmax(210px, 1fr) auto;
  gap: 6px;
  align-items: center;
  padding: 6px 7px;
  border: 1px solid #d7e0ec;
  border-radius: 7px;
  background: #f8fafc;
}

.delivery-resource-guide.active {
  border-color: #9fb7dd;
  background: #f6f9ff;
  box-shadow: inset 3px 0 0 #2457a6;
}

.delivery-resource-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

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

.delivery-resource-title span,
.delivery-resource-flow span {
  color: var(--muted);
  font-size: 11px;
}

.delivery-resource-chips,
.delivery-resource-flow,
.delivery-resource-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 0;
}

.delivery-resource-chips span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.delivery-resource-chips strong {
  color: var(--text);
}

.delivery-resource-flow span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.delivery-resource-flow b {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #e6eefb;
  color: #2457a6;
  font-size: 10px;
}

.delivery-resource-actions {
  justify-content: flex-end;
}

.delivery-constraint-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  min-height: 26px;
  color: var(--muted);
  font-size: 11px;
}

.delivery-constraint-list.empty {
  padding: 2px 0;
}

.delivery-scope-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid #d7e0ec;
  border-radius: 7px;
  background: #f8fafc;
}

.delivery-scope-summary strong {
  color: #1f5da8;
  white-space: nowrap;
}

.delivery-result {
  min-height: 18px;
}

.smart-reorder-preview {
  display: grid;
  gap: 7px;
  border: 1px solid #b7c7e4;
  border-radius: 8px;
  padding: 8px;
  background: #f7faff;
}

.preview-confirm-panel {
  min-height: 116px;
  border-color: #9bbcf8;
  background: #f8fbff;
}

.preview-confirm-panel.ready {
  border-color: #8bb6ff;
  box-shadow: inset 3px 0 0 var(--blue);
}

.preview-confirm-panel.pending {
  border-style: dashed;
  background: #fbfcfe;
}

.preview-confirm-panel.no-change {
  border-color: #b8dec5;
  background: #f7fcf8;
}

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

.preview-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.preview-head strong {
  color: var(--text);
}

.preview-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 5px;
}

.preview-metrics span {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 6px;
  background: #ffffff;
  color: var(--muted);
  font-size: 11px;
}

.preview-metrics strong {
  color: var(--text);
}

.preview-detail {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.apply-preview-button {
  min-width: 150px;
  min-height: 36px;
  font-weight: 900;
}

.delivery-result-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 5px;
  align-items: center;
}

.delivery-result-grid span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
}

.delivery-result-grid strong {
  color: var(--text);
}

.delivery-result-grid small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.delivery-result-grid .delivery-result-note {
  color: #475569;
}

.delivery-result-grid .delivery-result-action {
  color: #1f5da8;
  font-weight: 800;
}

.delivery-next-actions {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  margin-top: 2px;
  padding: 8px;
  border: 1px solid #9fb7dd;
  border-radius: 8px;
  background: #f6f9ff;
}

.delivery-next-head,
.delivery-action-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.delivery-next-head div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.delivery-next-head strong {
  color: var(--text);
  font-size: 13px;
}

.delivery-next-head small {
  color: #334155;
  font-size: 11px;
  font-weight: 700;
}

.delivery-next-head span {
  color: #1f5da8;
  font-size: 12px;
  font-weight: 800;
}

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

.delivery-gap-list span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 4px 7px;
  border: 1px solid #f4b8b1;
  border-radius: 999px;
  background: #fff1f0;
  color: #9f1d1d;
  font-size: 11px;
  font-weight: 700;
}

.delivery-gap-list.ok span {
  border-color: #b8dec5;
  background: #e7f4ec;
  color: #166534;
}

.delivery-gap-list em {
  color: #7f1d1d;
  font-style: normal;
}

.delivery-action-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 7px;
}

.delivery-action-steps article {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.delivery-action-steps article.important {
  border-color: #2f63b3;
  box-shadow: inset 3px 0 0 #2f63b3;
}

.delivery-action-steps b {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #2457a6;
  color: #ffffff;
  font-size: 12px;
}

.delivery-action-steps strong,
.delivery-action-steps span {
  display: block;
  min-width: 0;
}

.delivery-action-steps strong {
  color: var(--text);
  font-size: 12px;
}

.delivery-action-steps span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.delivery-action-buttons {
  justify-content: flex-end;
}

.delivery-result-grid.risk span {
  border-color: #f4b8b1;
  background: #fff1f0;
}

.delivery-result-grid.ok span {
  border-color: #b8dec5;
  background: #e7f4ec;
}

.column-settings-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 10px;
  z-index: 30;
  width: min(420px, calc(100vw - 32px));
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 26px rgba(16, 24, 40, 0.16);
}

.column-settings-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.command-metrics,
.command-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.command-actions {
  overflow-x: auto;
  justify-content: flex-end;
}

.command-metrics span,
.command-metrics .metric-chip {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.command-metrics .metric-chip {
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.command-metrics .metric-chip:hover,
.command-metrics .metric-chip.active {
  box-shadow: 0 0 0 2px rgba(36, 87, 166, 0.12);
}

.command-metrics .lock-metric {
  border-color: #f1c27d;
  background: #fff8e8;
  color: #8a5a00;
}

.command-metrics .health-ok {
  border-color: #b8dec5;
  background: #e7f4ec;
  color: #277e3f;
}

.command-metrics .health-risk {
  border-color: #f1c27d;
  background: #fff7e6;
  color: #9a5b00;
}

.command-metrics .health-conflict {
  border-color: #f4b8b1;
  background: #fff1f0;
  color: #b42318;
}

.command-metrics strong {
  color: var(--text);
  font-size: 14px;
}

.schedule-action-drawer {
  min-width: 0;
  max-height: calc(100vh - 82px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px;
}

.schedule-action-drawer {
  display: none;
  position: fixed;
  top: 66px;
  right: 12px;
  z-index: 72;
  width: min(420px, calc(100vw - 96px));
  transform: none;
  transition: transform 0.18s ease;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.18);
}

.schedule-action-drawer.open {
  display: block;
}

.schedule-gantt-canvas {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
}

.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.drawer-trigger {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 8px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.drawer-trigger strong {
  margin-left: 4px;
  color: var(--blue);
}

.drawer-trigger.active {
  border-color: #9bbcf8;
  background: #eef4ff;
  color: var(--blue);
}

.drawer-backdrop {
  display: none;
}

.drawer-backdrop.open {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 88;
  background: rgba(15, 23, 42, 0.14);
}

.schedule-side-drawer {
  position: fixed;
  top: 72px;
  left: 76px;
  z-index: 90;
  width: min(360px, calc(100vw - 96px));
  max-height: calc(100vh - 92px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.18);
  transform: translateX(calc(-100% - 120px));
  transition: transform 0.18s ease;
}

.schedule-side-drawer.open {
  transform: translateX(0);
}

.drawer-head {
  position: sticky;
  top: -12px;
  z-index: 2;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  margin: -12px -12px 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.drawer-head div {
  display: grid;
  gap: 3px;
}

.drawer-head span,
.drawer-check {
  color: var(--muted);
  font-size: 12px;
}

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

.import-drawer {
  left: auto;
  right: 12px;
  width: min(500px, calc(100vw - 96px));
  background: #ffffff;
  transform: translateX(calc(100% + 120px));
}

.import-drawer-form {
  display: grid;
  gap: 10px;
}

.import-panel {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  background: #f8fbff;
}

.import-panel.compact {
  background: #fbfcfe;
}

.excel-import-panel {
  gap: 10px;
  border-color: #d4deeb;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.import-panel-head {
  display: grid;
  gap: 2px;
}

.import-panel-head strong {
  color: var(--text);
  font-size: 14px;
}

.import-panel-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.import-guide-steps,
.import-required-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.import-guide-steps span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 3px 7px;
  border: 1px solid #d7e0ec;
  border-radius: 999px;
  background: #ffffff;
  color: #344054;
  font-size: 11px;
  font-weight: 800;
}

.import-guide-steps b {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #2457a6;
  color: #ffffff;
  font-size: 10px;
}

.import-required-strip {
  padding: 6px 7px;
  border: 1px solid #f3c4bd;
  border-radius: 7px;
  background: #fff7f6;
}

.import-required-strip strong,
.import-required-strip span {
  font-size: 11px;
  font-weight: 800;
}

.import-required-strip strong {
  color: #9f1d1d;
}

.import-required-strip span {
  padding: 2px 6px;
  border-radius: 999px;
  background: #ffffff;
  color: #344054;
}

.bulk-import-textarea {
  min-height: 138px;
  resize: vertical;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px;
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #fff;
  color: var(--text);
}

.bulk-import-textarea:focus,
.import-file-input:focus {
  border-color: #7aa7f7;
  outline: 3px solid rgba(37, 99, 235, 0.12);
}

.import-overwrite-line {
  padding: 7px 8px;
  border-radius: 7px;
  background: #fff;
  border: 1px dashed #cbd5e1;
}

.import-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.import-action-row.three button {
  flex: 1 1 110px;
}

.import-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.excel-file-picker {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  background: #ffffff;
}

.excel-file-picker.has-file {
  border-color: #9cc9b2;
  background: #f2fbf5;
}

.file-picker-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid #9bbcf8;
  border-radius: 7px;
  background: #eef4ff;
  color: var(--blue);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.file-picker-button:hover {
  background: #e3edff;
}

.import-file-input:focus + .excel-file-picker .file-picker-button {
  outline: 3px solid rgba(37, 99, 235, 0.14);
  outline-offset: 2px;
}

.selected-file-state {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.selected-file-state strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-file-state span {
  color: var(--muted);
  font-size: 11px;
}

.excel-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 8px;
}

.excel-actions button {
  width: 100%;
}

.import-preview-list {
  display: grid;
  gap: 6px;
}

.drawer-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.link-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.project-multi-filter {
  min-width: 0;
}

.project-multi-list {
  display: grid;
  gap: 4px;
  max-height: 168px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.project-multi-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
}

.project-multi-option:hover {
  background: #f2f6fb;
}

.project-multi-option input {
  width: 15px;
  height: 15px;
}

.project-multi-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule-drawer {
  width: min(420px, calc(100vw - 96px));
}

.rule-form select,
.rule-form input[type="number"] {
  width: 100%;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 8px;
  background: #ffffff;
  color: var(--text);
}

.rule-template-note {
  border: 1px solid #cfe0f9;
  border-radius: 7px;
  padding: 8px;
  background: #f4f8ff;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.rule-static-note {
  border: 1px solid #d7e5d8;
  border-radius: 7px;
  padding: 8px;
  background: #f4fbf5;
  color: #2f6f3c;
  font-size: 12px;
  line-height: 1.45;
}

.rule-section {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: var(--surface);
}

.rule-section h3 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
}

.rule-section label {
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
}

.context-project-groups {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

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

.context-priority-group h3 {
  color: var(--muted);
  font-size: 12px;
}

.context-project {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 8px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.context-project.active {
  border-color: var(--blue);
  background: #eef4ff;
}

.context-project span,
.context-project small {
  display: grid;
  gap: 2px;
}

.context-project small {
  color: var(--muted);
  font-size: 12px;
}

.issue-queue {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.issue-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.issue-group-title strong {
  min-width: 22px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--blue);
}

.issue-card {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 9px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.issue-card.active {
  border-color: var(--blue);
  background: #eef4ff;
}

.issue-card strong,
.issue-card small,
.issue-card em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.issue-card small,
.issue-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.issue-badge {
  width: fit-content;
  border-radius: 999px;
  padding: 2px 6px;
  background: #edf2f7;
  color: var(--muted);
  font-size: 11px;
}

.issue-conflict {
  background: #fff1f0;
  color: var(--red);
}

.issue-deadline {
  background: #fff7e6;
  color: var(--amber);
}

.issue-gap {
  background: #eaf7f6;
  color: var(--teal);
}

.compact-button {
  min-height: 28px;
  padding: 4px 8px;
}

.drawer-schedule-editor {
  grid-template-columns: 1fr;
  padding: 0;
  border: 0;
  background: transparent;
}

.drawer-schedule-editor label {
  gap: 3px;
  font-size: 11px;
}

.drawer-schedule-editor input,
.drawer-schedule-editor select {
  min-width: 0;
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

.management-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.management-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.management-head > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.kanban-section {
  display: grid;
  gap: 8px;
  min-height: 0;
  margin-bottom: 0;
}

.kanban-section-head {
  padding: 0 2px;
}

.kanban-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.kanban-filter-group {
  display: grid;
  grid-template-columns: minmax(108px, 0.65fr) minmax(150px, 0.85fr) minmax(150px, 0.85fr) minmax(220px, 1.9fr);
  align-items: end;
  gap: 8px;
  min-width: 0;
}

.kanban-filter-group label {
  display: grid;
  gap: 3px;
  min-width: 134px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.kanban-filter-group select,
.kanban-filter-group input {
  min-height: 32px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.kanban-filter-group select {
  min-width: 0;
}

.kanban-filter-group .kanban-search-filter {
  min-width: 0;
}

.kanban-filter-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.kanban-filter-summary {
  min-width: 94px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.task-kanban-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 8px;
  overflow-x: hidden;
  min-height: min(640px, calc(100vh - 260px));
  padding-bottom: 2px;
}

.task-kanban-column {
  min-height: min(620px, calc(100vh - 276px));
  max-height: calc(100vh - 254px);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 6px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
  padding: 8px;
  overflow: hidden;
}

.task-kanban-column.drag-over {
  border-color: var(--blue);
  background: #eef4ff;
}

.kanban-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 2px 6px;
  border-bottom: 1px solid rgba(98, 112, 131, 0.16);
}

.kanban-column-head strong {
  font-size: 14px;
  letter-spacing: 0;
}

.kanban-column-head span {
  min-width: 26px;
  min-height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.kanban-card-list {
  display: grid;
  align-content: start;
  gap: 7px;
  overflow-y: auto;
  padding-right: 2px;
}

.task-kanban-card {
  position: relative;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px 8px 12px;
  background: #ffffff;
  box-shadow: 0 1px 1px rgba(16, 24, 40, 0.05);
  cursor: grab;
}

.task-kanban-card::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: #93a4b7;
}

.task-kanban-card.priority-P0::before {
  background: var(--red);
}

.task-kanban-card.priority-P1::before {
  background: var(--blue);
}

.task-kanban-card.priority-P2::before {
  background: var(--teal);
}

.task-kanban-card.priority-P3::before {
  background: var(--amber);
}

.task-kanban-card.dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.kanban-card-title,
.kanban-card-meta,
.kanban-card-footer {
  display: grid;
  gap: 3px;
}

.kanban-card-title strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.32;
}

.kanban-card-title span,
.kanban-card-meta {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.kanban-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.kanban-empty {
  min-height: 60px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: center;
}

.task-kanban-column.tone-idle {
  background: #f8fafc;
  border-top: 3px solid #93a4b7;
}

.task-kanban-column.tone-active {
  background: #f1f6ff;
  border-top: 3px solid #2f62b3;
}

.task-kanban-column.tone-paused {
  background: #fbf6ee;
  border-top: 3px solid #b66a00;
}

.task-kanban-column.tone-risk {
  background: #fff1f0;
}

.task-kanban-column.tone-done {
  background: #edf8f1;
  border-top: 3px solid #277e3f;
}

.people-resource-grid {
  display: grid;
  grid-template-columns: minmax(450px, 510px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.management-section {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

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

.primary,
.secondary {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 9px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
}

.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.form-grid.compact {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.person-calendar-panel {
  min-width: 0;
  overflow: auto;
}

.people-resource-grid > .management-section:first-child {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 112px);
  overflow: hidden auto;
}

.form-grid.person-create-grid {
  grid-template-columns: minmax(76px, 1fr) 68px 72px minmax(62px, 0.85fr) 42px;
  gap: 5px;
  margin-bottom: 8px;
  padding: 8px;
  overflow-x: visible;
}

.form-grid.person-create-grid label {
  gap: 3px;
  font-size: 11px;
}

.form-grid.person-create-grid input,
.form-grid.person-create-grid select {
  min-height: 28px;
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 700;
}

.form-grid.person-create-grid .primary {
  min-height: 28px;
  padding: 4px 6px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.calendar-control-panel {
  display: grid;
  gap: 7px;
  margin-bottom: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(205, 214, 225, 0.88);
  border-radius: 8px;
  background: #fbfcfe;
}

.calendar-control-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.calendar-title-block {
  display: flex;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}

.calendar-title-block h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.calendar-title-block span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 38px minmax(112px, 0.45fr) 38px 82px 64px;
  gap: 5px;
  align-items: end;
  min-width: 0;
}

.calendar-toolbar label {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.calendar-toolbar select,
.calendar-toolbar input {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.calendar-toolbar .compact-button {
  min-height: 28px;
  padding: 4px 7px;
  white-space: nowrap;
}

.danger-lite {
  border-color: rgba(180, 35, 24, 0.28);
  background: #fff7f6;
  color: var(--red);
}

.calendar-legend {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.calendar-legend span {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.legend-workday {
  background: #eef4ff;
}

.legend-weekend {
  background: #f6f1e8;
}

.legend-legal {
  background: #fff1f0;
}

.legend-availability {
  background: #f7eefe;
}

.legend-overtime {
  background: #e7f4ec;
}

.resource-month-calendar {
  display: grid;
  gap: 5px;
  min-width: 620px;
  margin-bottom: 8px;
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(82px, 1fr));
  gap: 4px;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.calendar-day {
  min-height: 92px;
  display: grid;
  grid-template-rows: minmax(52px, 1fr) auto;
  align-content: start;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 7px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.calendar-day-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.calendar-day-title {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}

.calendar-day-title strong {
  font-size: 14px;
  line-height: 1;
}

.calendar-day-title span,
.calendar-day-meta small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.18;
}

.calendar-day-title span {
  color: var(--text);
}

.calendar-day-meta {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.calendar-day-meta small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.calendar-day-meta .calendar-day-availability {
  color: #8f4fb3;
}

.calendar-day.is-unavailable .calendar-day-availability {
  color: #a03d92;
  font-weight: 900;
}

.calendar-day-meta .calendar-day-overtime {
  color: var(--green);
}

.calendar-day-meta .calendar-day-holiday {
  color: var(--red);
  font-weight: 800;
}

.calendar-day.empty {
  border-color: transparent;
  background: transparent;
  cursor: default;
}

.calendar-day-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
}

.calendar-day-actions button {
  min-width: 0;
  min-height: 20px;
  border: 1px solid rgba(98, 112, 131, 0.22);
  border-radius: 5px;
  padding: 0;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.calendar-day-actions button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.calendar-day-actions button.active {
  border-color: rgba(36, 87, 166, 0.36);
  background: #ffffff;
  color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(36, 87, 166, 0.16);
}

.calendar-day-actions button.active.warning {
  border-color: rgba(184, 121, 216, 0.46);
  background: #fbf4ff;
  color: #8f4fb3;
}

.calendar-day-actions button.active.success {
  border-color: rgba(39, 126, 63, 0.46);
  background: #eef9f1;
  color: var(--green);
}

.calendar-day.day-workday {
  background: #eef4ff;
  border-color: #bcd0f6;
}

.calendar-day.day-weekend {
  background: #f6f1e8;
  border-color: #e7d4ad;
}

.calendar-day.day-legal-holiday {
  background: #fff1f0;
  border-color: #f4b8b1;
}

.calendar-day.has-availability {
  box-shadow: inset 0 -4px 0 #b879d8;
}

.calendar-day.has-availability.is-unavailable {
  border-style: dashed;
  background-image: linear-gradient(135deg, rgba(184, 121, 216, 0.12), rgba(255, 255, 255, 0));
}

.calendar-day.has-overtime {
  box-shadow: inset 0 -4px 0 var(--green);
}

.calendar-day.has-availability.has-overtime {
  box-shadow: inset 0 -4px 0 var(--green), inset 0 -8px 0 #b879d8;
}

.calendar-day.selected {
  outline: 2px solid rgba(36, 87, 166, 0.28);
  border-color: var(--blue);
}

.resource-day-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-width: 0;
  margin-bottom: 0;
  padding: 7px;
  border: 1px solid rgba(205, 214, 225, 0.88);
  border-radius: 7px;
  background: #ffffff;
  overflow: hidden;
}

.resource-day-editor-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(168px, 220px);
  align-items: end;
  gap: 8px;
  min-width: 0;
}

.resource-day-editor-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.resource-day-editor-title strong {
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}

.resource-day-editor-title span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
}

.resource-day-panel-grid {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(260px, 1.45fr) minmax(160px, 0.8fr);
  gap: 5px;
  align-items: end;
  min-width: 0;
}

.resource-date-field,
.resource-day-action-card {
  min-width: 0;
  border: 1px solid #d8e0ea;
  border-radius: 6px;
  background: #fbfcfe;
}

.resource-date-field {
  display: grid;
  gap: 3px;
  padding: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.resource-date-field-inline {
  padding: 0;
  border: 0;
  background: transparent;
}

.resource-day-action-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  align-items: end;
  padding: 6px;
}

.overtime-action-card {
  background: #f4fbf6;
  border-color: #c6e4ce;
}

.resource-day-action-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.resource-day-action-controls {
  display: flex;
  flex-wrap: nowrap;
  gap: 3px;
  align-items: end;
  min-width: 0;
}

.resource-day-panel-grid label,
.resource-day-action-controls label {
  display: grid;
  gap: 2px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  min-width: 0;
}

.resource-day-action-controls label {
  flex: 1 1 58px;
}

.availability-action-controls .availability-reason-field {
  flex: 1.3 1 86px;
}

.resource-day-panel-grid input,
.resource-day-panel-grid select {
  width: 100%;
  min-width: 0;
  min-height: 26px;
  border: 1px solid #d8e0ea;
  border-radius: 6px;
  padding: 3px 7px;
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.resource-day-panel-grid button {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 4px 7px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

.calendar-summary {
  margin-top: 8px;
}

.calendar-summary h3 {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.person-resource-head,
.person-resource-row {
  display: grid;
  grid-template-columns: 74px minmax(76px, 1fr) 62px 58px minmax(58px, 0.78fr) 58px 34px;
  gap: 4px;
  align-items: center;
  min-width: 0;
}

.person-resource-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 6px 6px 0 0;
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.person-resource-row {
  min-height: 32px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  padding: 3px 5px;
  background: var(--surface);
}

.person-resource-row + .person-resource-row {
  margin-top: 0;
}

.person-resource-row input,
.person-resource-row select,
.person-delete-button {
  min-width: 0;
  height: 24px;
  min-height: 0;
  padding: 2px 4px;
  border-color: transparent;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.person-id-chip {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-delete-button,
.lookup-manage-button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--red);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.person-delete-button {
  padding: 0;
}

.lookup-manage-button {
  width: 24px;
  height: 24px;
  min-height: 0;
  padding: 0;
  color: var(--muted);
}

.lookup-manage-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.assignee-cell,
.module-cell {
  overflow: visible;
}

.inline-lookup-editor {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  overflow: visible;
}

.lookup-cell-editor.inline-lookup-editor {
  grid-template-columns: minmax(0, 1fr);
}

.lookup-select-button {
  width: 100%;
  height: 26px;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 2px 3px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  text-align: left;
}

.lookup-select-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lookup-select-button b {
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.lookup-select-button.empty {
  color: var(--muted);
}

.lookup-select-button:hover,
.inline-lookup-editor.open .lookup-select-button {
  border-color: rgba(36, 87, 166, 0.3);
  background: #ffffff;
}

.lookup-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 1200;
  width: max(230px, 100%);
  display: none;
  gap: 5px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.18);
}

.inline-lookup-editor.open .lookup-menu {
  display: grid;
}

.lookup-menu-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line);
}

.lookup-clear-button {
  min-height: 28px;
  border: 1px solid #f1b8b5;
  border-radius: 6px;
  background: #fff1f0;
  color: var(--red);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.lookup-menu-list {
  display: grid;
  gap: 3px;
  max-height: 250px;
  overflow: auto;
}

.lookup-option-row {
  min-height: 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 6px;
  padding: 4px 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

.lookup-option-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lookup-option-row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.lookup-option-row:hover,
.lookup-option-row.active {
  background: #eef4ff;
  color: var(--blue);
}

.lookup-option-row.editable {
  grid-template-columns: 30px minmax(0, 1fr);
  padding: 3px;
  cursor: default;
}

.lookup-option-row.editable.with-meta {
  grid-template-columns: 30px minmax(72px, 1fr) minmax(82px, auto);
}

.lookup-option-row.editable.with-role {
  grid-template-columns: 30px minmax(76px, 1fr) minmax(78px, auto) minmax(42px, auto);
}

.lookup-option-row.editable button {
  height: 26px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}

.lookup-option-row.editable.active button {
  color: var(--blue);
}

.lookup-option-row.editable input {
  width: 100%;
  min-width: 0;
  height: 26px;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 2px 5px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.lookup-option-row.editable input:focus {
  border-color: rgba(36, 87, 166, 0.36);
  background: #ffffff;
  outline: none;
}

.lookup-option-meta {
  min-width: 0;
  justify-self: end;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 5px;
  padding: 3px 5px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.lookup-option-role {
  justify-self: end;
  border-radius: 999px;
  padding: 3px 6px;
  background: #e8f3ff;
  color: #2457a6;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.lookup-option-role.role-backend {
  background: #eef2ff;
  color: #4338ca;
}

.lookup-option-role.role-frontend {
  background: #ecfdf5;
  color: #047857;
}

.lookup-option-role.role-testing {
  background: #fff7ed;
  color: #c2410c;
}

.role-mismatch-dialog-host {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
}

.role-mismatch-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.32);
}

.role-mismatch-dialog {
  position: relative;
  width: min(430px, calc(100vw - 32px));
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.24);
}

.role-mismatch-head,
.role-mismatch-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.role-mismatch-head strong {
  font-size: 15px;
}

.role-mismatch-body {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.7;
}

.role-mismatch-body p {
  margin: 0;
}

.role-mismatch-task {
  border-radius: 6px;
  padding: 7px 9px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
}

.lookup-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(15, 23, 42, 0.2);
}

.lookup-dialog {
  position: fixed;
  top: 96px;
  left: 50%;
  z-index: 111;
  width: min(520px, calc(100vw - 32px));
  display: grid;
  gap: 10px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.2);
}

.lookup-dialog-head,
.lookup-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lookup-dialog-head div,
.lookup-dialog-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.lookup-dialog-head strong {
  font-size: 16px;
}

.lookup-dialog-head span,
.lookup-dialog-body p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.lookup-dialog-body label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.lookup-dialog-body input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.lookup-dialog-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.person-resource-row:hover {
  background: #fbfcfe;
}

.person-resource-row input:focus,
.person-resource-row select:focus {
  border-color: rgba(36, 87, 166, 0.42);
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(36, 87, 166, 0.12);
}

.schedule-editor {
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(150px, 1fr));
  margin-bottom: 0;
}

.gantt-workbench {
  display: grid;
  gap: 10px;
}

.gantt-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 10px;
}

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

.gantt-main-pane {
  min-width: 0;
}

.schedule-inspector {
  position: sticky;
  top: 76px;
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 108px);
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.gantt-inspector {
  max-height: calc(100vh - 112px);
}

.gantt-action-card {
  align-content: start;
}

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

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

.schedule-project-list,
.schedule-task-list {
  display: grid;
  gap: 8px;
}

.gantt-project-strip {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.schedule-project-card,
.inspector-card {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

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

.compact-drawer-task {
  gap: 6px;
  padding: 7px;
}

.drawer-task-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.drawer-task-main div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.drawer-task-main strong {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.drawer-task-main em {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-lock-note {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.drawer-lock-note.is-locked {
  border-color: #f1c27d;
  background: #fff8e8;
  color: #8a5a00;
  font-weight: 700;
}

.gantt-project-chip {
  min-height: 64px;
}

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

.schedule-project-head span:not(.badge) {
  color: var(--muted);
  font-size: 12px;
}

.schedule-queue-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.schedule-queue-item.active {
  border-color: var(--blue);
  background: #eef4ff;
}

.schedule-queue-item strong,
.schedule-queue-item small {
  display: block;
}

.schedule-queue-item small,
.schedule-queue-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.danger-text {
  color: var(--red) !important;
}

.detail-list {
  display: grid;
  gap: 7px;
  margin: 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 8px;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  color: var(--text);
}

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

.drawer-summary span {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
}

.drawer-summary strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-simple-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.drawer-simple-actions button {
  min-width: 0;
  width: 100%;
}

.drawer-main-action {
  border-color: #bcd0f6;
  background: #f7faff;
}

.drawer-flow-section,
.drawer-save-panel,
.drawer-manual-editor {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.compact-drawer-section {
  gap: 6px;
  padding: 7px;
}

.drawer-save-panel {
  position: sticky;
  bottom: 0;
  border-color: #b7c7e4;
  background: #f7faff;
  box-shadow: 0 -10px 18px rgba(248, 250, 252, 0.86);
}

.compact-save-panel {
  gap: 6px;
  padding: 7px;
}

.drawer-step-title {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px;
  min-height: 24px;
}

.drawer-section-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 22px;
}

.drawer-section-title strong {
  font-size: 13px;
}

.drawer-section-title em {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-step-title span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.drawer-step-title strong {
  min-width: 0;
  font-size: 13px;
}

.drawer-step-title em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.compact-title {
  grid-template-columns: 1fr auto;
}

.drawer-problem-list,
.drawer-option-list {
  display: grid;
  gap: 6px;
}

.drawer-problem,
.drawer-option-card {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 4px 7px;
  align-items: center;
  min-height: 44px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.drawer-problem.active,
.drawer-option-card.active {
  border-color: #8eb4f8;
  background: #eef4ff;
}

.drawer-problem span,
.drawer-option-card .drawer-radio {
  padding: 3px 5px;
  border-radius: 5px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.drawer-option-card.active .drawer-radio {
  background: var(--blue);
  color: #ffffff;
}

.drawer-problem strong,
.drawer-option-card strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-problem em,
.drawer-option-card em {
  grid-column: 2 / 4;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-option-card small {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.drawer-option-card.recommendation-recommended {
  border-color: #9ac9a9;
  background: #f2fbf5;
}

.drawer-option-card.danger {
  border-color: #efb0aa;
  background: #fff8f7;
}

.drawer-option-card.risk {
  background: #fffdf7;
}

.drawer-simple-task {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  background: #ffffff;
}

.drawer-simple-task strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-simple-task em {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-lock-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  background: #f8fafc;
}

.drawer-lock-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.drawer-lock-button {
  display: grid;
  gap: 2px;
  min-height: 54px;
  padding: 8px;
  border: 1px solid #d4dfec;
  border-radius: 7px;
  background: #ffffff;
  color: #172033;
  text-align: left;
  cursor: pointer;
}

.drawer-lock-button strong {
  font-size: 12px;
  line-height: 1.2;
}

.drawer-lock-button span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.drawer-lock-button.active {
  border-color: #d99a22;
  background: #fff5dc;
  box-shadow: inset 3px 0 0 #d99a22;
}

.drawer-simple-problem {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  background: #ffffff;
}

.drawer-simple-problem.risk {
  border-color: #f2b8a2;
  background: #fff7ed;
}

.drawer-simple-problem.ok {
  border-color: #a8d8b9;
  background: #f2fbf5;
}

.drawer-simple-problem strong,
.drawer-simple-problem span {
  display: block;
}

.drawer-simple-problem span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.drawer-simple-problem em {
  min-width: 44px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ffffff;
  color: #b42318;
  font-style: normal;
  font-weight: 700;
  text-align: center;
}

.drawer-simple-section {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  background: #f8fbff;
}

.drawer-simple-option-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.drawer-resolved-state {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #b9dfc5;
  border-radius: 8px;
  background: #f1fbf4;
  color: #135b2d;
}

.drawer-resolved-state strong {
  font-size: 13px;
  line-height: 1.25;
}

.drawer-resolved-state span {
  color: #2c6f42;
  font-size: 12px;
  line-height: 1.35;
}

.drawer-simple-option-list .drawer-option-card {
  min-height: 68px;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  padding: 9px;
  border-color: #cbd5e1;
}

.drawer-simple-option-list .drawer-option-card strong {
  font-size: 13px;
}

.drawer-simple-option-list .drawer-option-card em {
  grid-column: 2 / 4;
  white-space: normal;
}

.drawer-simple-option-list .drawer-radio {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #ffffff;
  text-align: center;
}

.drawer-secondary-action,
.drawer-generated-options {
  grid-column: 1 / -1;
}

.drawer-secondary-action {
  min-height: 34px;
  border: 1px dashed #a9bdd8;
  border-radius: 8px;
  background: #ffffff;
  color: var(--blue);
  font-weight: 700;
}

.drawer-generated-options {
  display: grid;
  gap: 6px;
}

.drawer-generated-options summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.drawer-simple-save {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #b7c7e4;
  border-radius: 8px;
  background: #f7faff;
  box-shadow: 0 -10px 18px rgba(248, 250, 252, 0.88);
}

.drawer-more-settings {
  display: grid;
  gap: 7px;
  font-size: 12px;
}

.drawer-more-settings summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}

.drawer-more-settings[open] {
  padding-top: 2px;
}

.action-empty {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px;
}

.drawer-reason {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
}

.drawer-reason input {
  width: 100%;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
}

.drawer-reorder-check {
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-save-button {
  width: 100%;
}

.drawer-empty,
.drawer-helper {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.drawer-empty {
  padding: 8px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: #fbfcfe;
}

.mini-risk {
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid #efb0aa;
  border-radius: 8px;
  background: #fff8f7;
}

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

.mini-option {
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.mini-option.recommendation-recommended {
  border-color: #98c5a8;
  background: #f0faf4;
}

.option-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.mini-option button {
  width: 100%;
}

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

.inline-schedule-editor {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.inline-schedule-editor span {
  min-height: 28px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfe;
  color: var(--muted);
  font-size: 12px;
}

.vertical-actions {
  align-items: stretch;
  flex-direction: column;
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

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

input,
select,
textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  background: #ffffff;
  color: var(--text);
}

input[type="checkbox"] {
  width: auto;
  min-height: auto;
}

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

.stack,
.data-grid,
.timeline,
.checklist,
.option-grid,
.export-grid {
  display: grid;
  gap: 9px;
}

.timeline {
  overflow-x: auto;
  padding-bottom: 4px;
}

.gantt-shell {
  max-height: calc(100vh - 190px);
  min-height: 560px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.schedule-board-shell {
  min-width: min-content;
  overflow: visible;
  background: var(--surface);
}

.schedule-board-grid {
  display: grid;
  min-width: calc(var(--frozen-width) + var(--date-width));
  --date-cell-width: 48px;
  --date-width: max(680px, calc(var(--date-count) * 48px));
  --schedule-row-height: 44px;
  --schedule-header-height: 32px;
  --schedule-task-bar-height: 18px;
}

.schedule-board-header,
.schedule-board-row {
  display: grid;
  grid-template-columns: var(--frozen-columns) var(--date-width);
  min-width: calc(var(--frozen-width) + var(--date-width));
}

.schedule-board-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: var(--schedule-header-height);
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.schedule-board-body {
  display: grid;
}

.schedule-board-row {
  position: relative;
  z-index: 0;
  min-height: var(--schedule-row-height);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.schedule-empty-row {
  min-height: 220px;
}

.schedule-board-empty {
  grid-column: 1 / -1;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 16px 18px;
  color: var(--muted);
  background: #ffffff;
}

.schedule-board-empty strong {
  color: var(--text);
  font-size: 13px;
}

.schedule-board-empty span {
  font-size: 12px;
}

.schedule-board-row.lookup-open {
  z-index: 30;
}

.schedule-board-row.lookup-open .frozen-cell {
  z-index: 40;
}

.schedule-board-row.task-group-start {
  border-top: 2px solid #c8d7ea;
}

.schedule-board-row.task-group-child {
  background: #fbfcfe;
}

.schedule-board-row.task-group-child .work-no-cell {
  border-left: 3px solid #d9e6f7;
}

.schedule-board-row.task-group-end {
  border-bottom-color: #c8d7ea;
}

.schedule-board-row.selected,
.schedule-board-row.previewing {
  background: #f7fbff;
  box-shadow: inset 3px 0 0 var(--blue);
}

.schedule-board-row.manual-adjusted {
  background: #fffdf5;
  box-shadow: inset 3px 0 0 #d99a22;
}

.schedule-board-row.smart-preview-row {
  background: #f4fbf7;
  box-shadow: inset 3px 0 0 #2f9461;
}

.schedule-board-row.has-conflict {
  box-shadow: inset 3px 0 0 var(--red);
}

.schedule-board-row.has-conflict .status-cell .schedule-cell-select {
  box-shadow: inset 3px 0 0 #b42318;
}

.schedule-board-row.has-deadline-risk:not(.has-conflict) {
  box-shadow: inset 3px 0 0 var(--amber);
}

.schedule-board-row.has-deadline-risk:not(.has-conflict) .status-cell .schedule-cell-select {
  box-shadow: inset 3px 0 0 #b66a00;
}

.schedule-board-row.has-duplicate-data {
  border-bottom-color: #efb0aa;
  background: #fff8f7;
  box-shadow: inset 3px 0 0 var(--red);
}

.schedule-board-row.row-checked {
  outline: 2px solid rgba(36, 87, 166, 0.22);
  outline-offset: -2px;
}

.schedule-board-row.locked-row {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(217, 154, 34, 0.08) 0,
      rgba(217, 154, 34, 0.08) 6px,
      transparent 6px,
      transparent 12px
    ),
    #fffaf0;
}

.schedule-board-row.locked-row.selected,
.schedule-board-row.locked-row.previewing {
  box-shadow: inset 3px 0 0 #d99a22;
}

.schedule-board-cell {
  min-width: 0;
  min-height: var(--schedule-row-height);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-right: 1px solid var(--line);
  background: inherit;
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
}

.schedule-board-header .schedule-board-cell {
  position: sticky;
  min-height: var(--schedule-header-height);
  background: #f8fafc;
}

.frozen-cell {
  position: sticky;
  z-index: 6;
}

.schedule-board-header .frozen-cell {
  z-index: 12;
}

.priority-cell {
  justify-content: center;
}

.row-select-cell {
  justify-content: center;
}

.lock-cell {
  overflow: visible;
}

.row-select-actions {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
}

.schedule-row-checkbox {
  width: 15px;
  height: 15px;
  margin: 0;
  cursor: pointer;
}

.row-delete-button,
.danger-button {
  border: 1px solid #efb0aa;
  border-radius: 6px;
  background: #fff8f7;
  color: var(--red);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}

.row-delete-button {
  width: 24px;
  height: 22px;
  padding: 0;
}

.danger-button {
  min-height: 30px;
  padding: 5px 9px;
  white-space: nowrap;
}

.task-cell,
.task-name-cell,
.work-no-cell,
.schedule-range-cell,
.man-days-cell {
  display: grid;
  align-content: center;
  gap: 2px;
}

.task-cell span,
.schedule-board-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-board-cell.assignee-cell,
.schedule-board-cell.module-cell {
  overflow: visible;
}

.task-cell span {
  color: var(--muted);
  font-size: 11px;
}

.column-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.column-hide-button {
  width: 20px;
  height: 20px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  line-height: 20px;
  cursor: pointer;
}

.column-hide-button:hover {
  background: #edf1f5;
  color: var(--text);
}

.column-resize-handle {
  position: absolute;
  top: 0;
  right: -4px;
  z-index: 20;
  width: 8px;
  height: 100%;
  cursor: col-resize;
}

.column-resize-handle::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 3px;
  width: 2px;
  border-radius: 999px;
  background: #c8d1dc;
}

.schedule-cell-input,
.schedule-cell-select,
.schedule-filter-control {
  width: 100%;
  min-width: 0;
  height: 24px;
  min-height: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.schedule-cell-input,
.schedule-filter-control {
  padding: 2px 5px;
}

.schedule-cell-select {
  padding: 2px 18px 2px 5px;
}

.schedule-filter-control {
  height: 24px;
  background: #ffffff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.schedule-cell-input:focus,
.schedule-cell-select:focus,
.schedule-filter-control:focus {
  outline: none;
  border-color: rgba(36, 87, 166, 0.42);
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(36, 87, 166, 0.14);
}

.schedule-cell-select.tone-ok {
  background: #e7f4ec;
  color: var(--green);
}

.schedule-cell-select.tone-danger {
  background: #fff1f0;
  color: var(--red);
}

.schedule-cell-select.tone-not_started {
  border-color: #cfd7e3;
  background: #f4f7fb;
  color: #475569;
}

.schedule-cell-select.tone-active {
  border-color: #a8c3f4;
  background: #eef4ff;
  color: #2457a6;
}

.schedule-cell-select.tone-paused {
  border-color: #f0c878;
  background: #fff7e6;
  color: #9a5b00;
}

.schedule-cell-select.tone-risk {
  border-color: #f1a19a;
  background: #fff1f0;
  color: #b42318;
}

.schedule-cell-select.tone-done {
  border-color: #a8d8b4;
  background: #e7f4ec;
  color: #277e3f;
}

.schedule-cell-select.tone-duplicate {
  border-color: #d7b7f0;
  background: #fbf4ff;
  color: #7a3da1;
}

.status-cell-stack {
  display: grid;
  gap: 3px;
  width: 100%;
  min-width: 0;
}

.data-error-badge,
.status-risk-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  max-width: 100%;
  padding: 0 6px;
  border: 1px solid #efb0aa;
  border-radius: 999px;
  background: #fff1f0;
  color: var(--red);
  font-size: 10px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-risk-badge {
  justify-content: flex-start;
  border-color: #f4b8b1;
  color: #a31616;
}

.task-editor,
.task-name-editor,
.work-no-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px 5px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.work-no-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.inline-lock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  max-width: 46px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid #e8b95f;
  border-radius: 999px;
  background: #fff3d8;
  color: #8a5a00;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.inline-lock-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-right: 2px;
  border-radius: 50%;
  background: currentColor;
}

.schedule-lock-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  width: 100%;
  min-width: 0;
}

.lock-state-select {
  width: 100%;
  min-width: 0;
  height: 24px;
  padding: 0 20px 0 7px;
  border: 1px solid #d4dfec;
  border-radius: 6px;
  background: #ffffff;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
}

.schedule-lock-control.active .lock-state-select {
  border-color: #d99a22;
  background: #fff5dc;
  color: #7a4c00;
}

.schedule-lock-control span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-cell-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.lookup-cell-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  gap: 4px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.drawer-field-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: end;
}

.drawer-field-with-action label {
  min-width: 0;
}

.role-cell-editor.duplicate-role .schedule-cell-select {
  border-color: #efb0aa;
  background: #fff8f7;
  color: var(--red);
}

.task-group-primary .task-title-input {
  font-weight: 800;
}

.task-group-secondary .task-title-input {
  color: var(--muted);
  font-weight: 700;
}

.task-group-marker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.work-no-chip {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1px 5px;
  border-radius: 5px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.task-group-size,
.task-group-child-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.task-group-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  min-width: 0;
}

.task-group-action-button {
  height: 19px;
  min-height: 0;
  min-width: 24px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.task-group-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.task-group-action-button.danger {
  color: var(--red);
}

.task-title-input {
  min-width: 0;
  font-weight: 800;
}

.work-no-input,
.man-days-input {
  text-align: center;
}

.schedule-range-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 3px;
  align-items: center;
  width: 100%;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
}

.schedule-range-editor .date-cell-input {
  padding: 1px 2px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.schedule-filter-text {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-date-range {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 11px;
}

.schedule-filter-row {
  position: sticky;
  top: var(--schedule-header-height);
  z-index: 9;
  min-height: var(--schedule-header-height);
  background: #f8fafc;
}

.schedule-filter-row .schedule-board-cell,
.schedule-filter-row .schedule-date-grid {
  min-height: var(--schedule-header-height);
  background: #f8fafc;
}

.schedule-filter-track {
  display: flex;
  align-items: center;
  height: var(--schedule-header-height);
  padding: 0 10px;
  color: var(--muted);
  font-size: 11px;
}

.schedule-quick-add-row {
  min-height: 38px;
  color: var(--muted);
  background: #fbfcfe;
}

.schedule-quick-add-row .schedule-board-cell {
  min-height: 38px;
  gap: 8px;
}

.schedule-quick-add-row .schedule-date-grid,
.schedule-quick-add-row .schedule-date-track {
  min-height: 38px;
  height: 38px;
}

.schedule-date-header {
  display: grid;
  grid-template-columns: repeat(var(--date-count), var(--date-cell-width));
  width: var(--date-width);
  min-height: var(--schedule-header-height);
  border-right: 1px solid var(--line);
}

.schedule-date-header span {
  display: grid;
  place-items: center;
  border-right: 1px solid #edf1f5;
  font-size: 11px;
}

.schedule-date-header span.weekend {
  background: #f6f1e8;
  color: var(--amber);
}

.schedule-date-grid {
  width: var(--date-width);
  min-width: 0;
  min-height: var(--schedule-row-height);
}

.schedule-date-track {
  position: relative;
  width: var(--date-width);
  height: var(--schedule-row-height);
  background:
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(var(--date-cell-width) - 1px),
      rgba(217, 224, 232, 0.85) calc(var(--date-cell-width) - 1px),
      rgba(217, 224, 232, 0.85) var(--date-cell-width)
    ),
    #fbfcfe;
}

.schedule-filter-row .schedule-date-track {
  min-height: var(--schedule-header-height);
  height: var(--schedule-header-height);
}

.schedule-task-bar {
  top: calc((var(--schedule-row-height) - var(--schedule-task-bar-height)) / 2);
  height: var(--schedule-task-bar-height);
  border-radius: 6px;
}

.resize-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 3;
  width: 9px;
  border-radius: inherit;
  cursor: ew-resize;
}

.resize-handle::after {
  content: "";
  position: absolute;
  top: 5px;
  bottom: 5px;
  width: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
}

.start-handle {
  left: 0;
}

.start-handle::after {
  left: 4px;
}

.end-handle {
  right: 0;
}

.end-handle::after {
  right: 4px;
}

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

.overview-card {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 220px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.portfolio-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.portfolio-row strong {
  display: block;
  font-size: 14px;
}

.portfolio-row span:not(.badge) {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.check,
.record,
.data-row,
.preview-row,
.option-row,
.export-sheet,
.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px;
}

.check {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.check strong {
  color: var(--amber);
}

.check.done strong {
  color: var(--green);
}

.record-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.record-head strong,
.task-title strong {
  display: block;
  font-size: 14px;
}

.nested {
  display: grid;
  gap: 8px;
  padding-left: 10px;
  border-left: 3px solid #eef2f7;
}

.task-block,
.subtask-line {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.subtask-line {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(190px, 1fr) auto minmax(260px, auto);
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.task-row {
  display: grid;
  grid-template-columns: minmax(190px, 270px) 1fr minmax(130px, auto) auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.timeline-board,
.gantt-board {
  min-width: 1400px;
  overflow: visible;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
}

.timeline-header,
.timeline .task-row {
  display: grid;
  grid-template-columns: 320px minmax(850px, 1fr) 230px;
}

.timeline-header,
.gantt-header {
  position: sticky;
  top: 0;
  z-index: 6;
  min-height: 38px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.timeline-left-head,
.timeline-right-head {
  padding: 0 12px;
}

.gantt-left {
  position: sticky;
  left: 0;
  z-index: 1;
  background: inherit;
}

.gantt-left-head {
  z-index: 8;
  background: #f8fafc;
  border-right: 1px solid var(--line);
}

.gantt-status-head,
.gantt-row-meta,
.gantt-project-risk {
  position: sticky;
  right: 0;
  z-index: 3;
  background: inherit;
}

.gantt-status-head {
  z-index: 8;
  background: #f8fafc;
  border-left: 1px solid var(--line);
}

.timeline-scale {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(58px, 1fr);
  height: 100%;
  align-items: center;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.timeline-scale span {
  height: 100%;
  padding-top: 11px;
  text-align: center;
  border-left: 1px solid #edf1f5;
}

.timeline-scale span.weekend {
  background: #f6f1e8;
  color: var(--amber);
}

.timeline-rows {
  display: grid;
}

.gantt-groups {
  gap: 0;
}

.gantt-project-group {
  display: grid;
  border-bottom: 1px solid var(--line);
}

.gantt-project-group:last-child {
  border-bottom: 0;
}

.gantt-project-header {
  display: grid;
  grid-template-columns: 320px minmax(850px, 1fr) 230px;
  min-height: 42px;
  align-items: center;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.gantt-project-header .gantt-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  border-right: 1px solid var(--line);
}

.gantt-project-header .gantt-left strong,
.gantt-project-header .gantt-left span:not(.badge) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-project-header .gantt-left span:not(.badge) {
  color: var(--muted);
  font-size: 12px;
}

.gantt-project-range {
  position: relative;
  height: 100%;
  min-height: 42px;
  background: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent calc(100% / 12 - 1px),
    #edf1f5 calc(100% / 12 - 1px),
    #edf1f5 calc(100% / 12)
  );
}

.gantt-project-range span {
  position: absolute;
  top: 15px;
  height: 12px;
  border-radius: 4px;
  background: #a8c7fa;
}

.gantt-project-risk {
  display: flex;
  justify-content: flex-end;
  padding: 0 10px;
  min-height: 42px;
  align-items: center;
  border-left: 1px solid var(--line);
}

.timeline .task-row,
.timeline .gantt-row {
  grid-template-columns: 320px minmax(850px, 1fr) 230px;
  min-height: 58px;
  margin: 0;
  border-width: 0 0 1px;
  border-radius: 0;
  box-shadow: none;
}

.timeline .task-row:last-child {
  border-bottom: 0;
}

.timeline .task-row.selected {
  background: #f7fbff;
  box-shadow: inset 3px 0 0 var(--blue);
}

.timeline .task-row.selected .gantt-left {
  background: #f7fbff;
}

.task-kicker {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
}

.timeline .task-title {
  min-height: 58px;
  padding: 8px 12px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.timeline .task-title strong,
.timeline .task-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  position: relative;
  height: 28px;
  background: #edf1f5;
  border-radius: 6px;
  overflow: visible;
}

.task-row .gantt-track {
  height: 58px;
  border-radius: 0;
  background:
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(100% / 12 - 1px),
      rgba(217, 224, 232, 0.85) calc(100% / 12 - 1px),
      rgba(217, 224, 232, 0.85) calc(100% / 12)
    ),
    #fbfcfe;
}

.bar {
  position: absolute;
  top: 4px;
  bottom: 4px;
  min-width: 26px;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.16);
}

.gantt-bar {
  top: 14px;
  bottom: auto;
  display: flex;
  align-items: center;
  height: 30px;
  min-width: 38px;
  border-radius: 6px;
}

.bar span {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.bar-label {
  position: static !important;
  display: block;
  min-width: 0;
  padding: 0 8px;
  overflow: hidden;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 30px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-task-bar.gantt-bar {
  top: calc((var(--schedule-row-height) - var(--schedule-task-bar-height)) / 2);
  height: var(--schedule-task-bar-height);
  min-width: 32px;
}

.schedule-task-bar .bar-label {
  padding: 0 6px;
  font-size: 11px;
  line-height: var(--schedule-task-bar-height);
}

.gantt-lock-chip {
  position: absolute !important;
  inset: auto 3px 3px auto !important;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 14px;
  border: 1px solid rgba(138, 90, 0, 0.35);
  border-radius: 999px;
  background: #fff3d8;
  color: #8a5a00;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.14);
}

.gantt-conflict-marker {
  position: absolute;
  top: 8px;
  z-index: 2;
  width: 12px;
  height: 42px;
  margin-left: -6px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 1px 4px rgba(180, 35, 24, 0.32);
}

.schedule-date-track .gantt-conflict-marker {
  top: 12px;
  width: 10px;
  height: 34px;
  margin-left: -5px;
}

.draggable-bar {
  cursor: grab;
  touch-action: none;
}

.draggable-bar:focus {
  outline: 2px solid rgba(36, 87, 166, 0.35);
  outline-offset: 3px;
}

.draggable-bar.dragging {
  cursor: grabbing;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(16, 24, 40, 0.2);
}

.locked-bar {
  cursor: not-allowed;
  border: 1px solid rgba(138, 90, 0, 0.28);
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.26) 0,
      rgba(255, 255, 255, 0.26) 5px,
      transparent 5px,
      transparent 10px
    ),
    #8c6a22 !important;
  opacity: 0.9;
}

.timeline-meta {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.gantt-row-meta {
  align-content: center;
  align-items: center;
  padding: 8px 10px;
  background: var(--surface);
  border-left: 1px solid var(--line);
}

.priority-P0 .bar,
.priority-P0 {
  border-color: #efb0aa;
}

.priority-P0 .bar {
  background: var(--red);
}

.priority-P1 .bar {
  background: var(--blue);
}

.schedule-task-bar.status-bar-not_started {
  background: #7b8794;
}

.schedule-task-bar.status-bar-active {
  background: #2457a6;
}

.schedule-task-bar.status-bar-paused {
  background: #b66a00;
}

.schedule-task-bar.status-bar-risk {
  background: #b42318;
}

.schedule-task-bar.status-bar-done {
  background: #277e3f;
}

.schedule-task-bar.status-bar-duplicate {
  background: #7a3da1;
}

.schedule-task-bar.status-bar-preview {
  background: #2f9461;
  outline: 2px dashed rgba(255, 255, 255, 0.72);
  outline-offset: -4px;
}

.gantt-preview-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #16633f;
  font-size: 10px;
  font-weight: 900;
}

.locked {
  background: #fffaf0;
}

.has-conflict,
.severity-high,
.severity-critical {
  border-color: #efb0aa;
}

.severity-medium {
  border-color: #f1c27d;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 23px;
  border-radius: 999px;
  padding: 3px 8px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.badge.ok {
  background: #e7f4ec;
  color: var(--green);
}

.badge.danger {
  background: #fff1f0;
  color: var(--red);
}

.schedule-status {
  min-height: 28px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.data-row,
.preview-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
}

.resource-gap-row {
  grid-template-columns: minmax(150px, 1.2fr) repeat(3, minmax(120px, 1fr));
}

.baseline-diff-row {
  grid-template-columns: minmax(220px, 1.4fr) minmax(70px, auto) minmax(130px, 1fr) minmax(130px, 1fr);
}

.resource-contributors {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.contributor-line {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(180px, 1.4fr) minmax(150px, 1fr) minmax(80px, auto);
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.compact-row {
  margin-bottom: 8px;
}

.conflict-section {
  display: grid;
  gap: 8px;
}

.option-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.4fr) repeat(6, minmax(90px, 1fr)) auto;
  gap: 9px;
  align-items: center;
}

.options-panel {
  margin-top: 12px;
}

.options-panel h3 {
  margin-bottom: 8px;
}

.error {
  border-color: #efb0aa;
}

.warning {
  border-color: #f1c27d;
}

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

pre {
  overflow: auto;
  max-height: 220px;
  margin: 8px 0 0;
  padding: 10px;
  background: #f1f4f8;
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
}

@media (max-width: 1100px) {
  .app-shell,
  .gantt-layout,
  .gantt-toolbar,
  .delivery-controls,
  .delivery-resource-guide,
  .schedule-command-center {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .schedule-inspector,
  .schedule-action-drawer {
    position: static;
    min-height: 0;
    max-height: none;
  }

  .schedule-command-center.drawer-open {
    grid-template-columns: 1fr;
  }

	  .delivery-action-steps {
	    grid-template-columns: 1fr;
	  }

  .schedule-workflow {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .schedule-operating-model {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .delivery-resource-actions {
    justify-content: flex-start;
  }

  .workspace-nav,
  .tabs {
    display: flex;
    overflow-x: auto;
  }

  .workspace-tab,
  .tab {
    flex: 0 0 auto;
    text-align: center;
  }

	  .resource-day-panel-grid {
	    grid-template-columns: 1fr;
	  }

	  .calendar-control-top,
	  .calendar-toolbar,
	  .resource-day-editor {
	    grid-template-columns: 1fr;
	  }

	  .resource-day-editor-head {
	    grid-template-columns: 1fr;
	  }

  .resource-day-editor-title {
    display: grid;
    gap: 2px;
  }

  .resource-day-editor-title span {
    text-align: left;
  }

	  .calendar-action-controls,
	  .availability-action-controls,
	  .overtime-action-controls {
	    flex-wrap: wrap;
	  }

  .management-head {
    align-items: stretch;
    flex-direction: column;
  }

  .management-head > span {
    flex: 0 1 auto;
  }

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

  .kanban-filter-group {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .kanban-filter-actions {
    justify-content: flex-start;
  }

  .task-kanban-board {
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    overflow-x: auto;
  }

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

  .form-grid,
  .form-grid.compact,
  .delivery-result-grid,
  .option-row,
  .subtask-line,
  .data-row,
  .preview-row,
  .contributor-line {
    grid-template-columns: 1fr;
  }

  .timeline .task-row,
  .timeline-header {
    grid-template-columns: 270px minmax(480px, 1fr) 160px;
  }

  .gantt-project-header {
    grid-template-columns: 270px minmax(480px, 1fr) 160px;
  }
}

@media (max-width: 680px) {
  .section-head,
  .check {
    align-items: stretch;
    flex-direction: column;
  }

  .command-title-row,
  .command-work-row,
  .command-title-block,
  .command-plan-status {
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-command-bar,
  .command-title-row,
  .command-work-row,
  .command-metrics,
  .command-actions {
    width: 100%;
    max-width: 100%;
  }

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

	  .command-plan-status .health {
	    max-width: 100%;
	    text-align: left;
	  }

  .schedule-workflow {
    grid-template-columns: 1fr;
  }

  .schedule-operating-model {
    grid-template-columns: 1fr;
  }

  .schedule-action-hub button {
    flex: 1 1 128px;
  }

  .kanban-toolbar,
  .kanban-filter-group,
  .kanban-filter-actions {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .kanban-filter-group label,
  .kanban-filter-group select {
    min-width: 0;
    width: 100%;
  }

  .kanban-filter-summary {
    text-align: left;
  }

  .app-shell {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  body[data-active-workspace="schedule"] .app-shell {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .plan-bar-main {
    flex-wrap: wrap;
  }

  .plan-select-control {
    flex-basis: 100%;
    grid-template-columns: 42px minmax(0, 1fr);
    min-width: 0;
  }

  .account-plan-bar .compact-button {
    flex: 1 1 116px;
  }

  .sidebar {
    gap: 8px;
    padding: 8px;
  }

  .sidebar-head {
    display: none;
  }

  .gantt-project-strip {
    display: none;
  }

  .form-grid.compact.schedule-editor {
    grid-template-columns: minmax(170px, 1.2fr) repeat(3, minmax(92px, 1fr));
  }

  .summary-grid,
  .checklist,
  .export-grid {
    grid-template-columns: 1fr;
  }

  .workspace-nav,
  .tabs {
    display: flex;
    gap: 6px;
    padding-bottom: 2px;
  }

  .workspace-tab,
  .tab {
    flex: 0 0 auto;
    min-width: 78px;
    text-align: center;
  }

  .panel {
    padding: 10px;
  }
}
