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

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

.metric-card,
.table-panel {
  background: #ffffff;
  border: 1px solid #e4ebf3;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(31, 45, 61, 0.06);
  transition:
    border-color var(--motion-normal) var(--ease-standard),
    box-shadow var(--motion-normal) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.metric-card {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.metric-card:hover,
.table-panel:hover {
  border-color: #d6e0ec;
  box-shadow: 0 22px 54px rgba(31, 45, 61, 0.09);
}

.metric-card:hover {
  transform: translateY(-1px);
}

.metric-card span {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.metric-card strong {
  color: #121b2a;
  font-size: 28px;
  line-height: 1;
}

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

.table-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 380px) max-content;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid #e8eef5;
}

.table-toolbar .semi-button {
  min-width: 92px;
  transition:
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

.table-toolbar .semi-button:not(:disabled):hover {
  box-shadow: 0 10px 22px rgba(217, 45, 58, 0.16);
  transform: translateY(-1px);
}

.table-toolbar .semi-input-wrapper__with-prefix {
  padding-inline: 12px;
}

.table-toolbar .semi-input-wrapper__with-prefix .semi-input {
  padding-left: 10px;
  padding-right: 0;
}

.table-toolbar .semi-input-prefix {
  flex: 0 0 auto;
  width: 20px;
  justify-content: center;
}

.table-toolbar .semi-input-prefix svg {
  display: block;
}

.resource-form {
  display: grid;
  gap: 18px;
  padding-bottom: 8px;
}

.resource-form label {
  display: grid;
  gap: 8px;
  color: inherit;
  font-size: 13px;
  font-weight: 650;
}

.resource-form label span {
  color: inherit;
}

.resource-form .semi-input-wrapper__with-prefix,
.resource-form .semi-select {
  padding-inline: 12px;
}

.resource-form .semi-input-wrapper__with-prefix .semi-input {
  padding-left: 10px;
  padding-right: 0;
}

.resource-form .semi-input-prefix,
.resource-form .semi-select-prefix {
  flex: 0 0 auto;
  width: 20px;
  justify-content: center;
}

.resource-form .semi-input-prefix svg,
.resource-form .semi-select-prefix svg {
  display: block;
}

.resource-form .semi-select-with-prefix .semi-select-selection {
  margin-left: 10px;
}

.resource-table-spin {
  min-height: 220px;
  transition: opacity var(--motion-normal) var(--ease-standard);
}

.resource-table {
  min-width: 860px;
}

.resource-table-row {
  display: grid;
  align-items: center;
  gap: 16px;
  min-height: 70px;
  padding: 0 18px;
  color: #26344d;
  border-bottom: 1px solid #edf2f7;
  transition:
    background var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.resource-table-row > [role="cell"],
.resource-table-row > [role="columnheader"] {
  min-width: 0;
}

.resource-table-head {
  min-height: 42px;
  color: #68778f;
  background: #f9fbfd;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.resource-table-row:not(.resource-table-head):hover {
  background: #fbfdff;
  border-color: #dfe8f3;
  box-shadow: inset 3px 0 0 rgba(217, 45, 58, 0.42);
}

.user-identity,
.image-identity,
.project-identity,
.container-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.user-identity > div:last-child,
.image-identity > div:last-child,
.project-identity > div:last-child,
.container-identity > div:last-child {
  min-width: 0;
}

.work-projects-table {
  min-width: 0;
}

.sandbox-containers-table {
  min-width: 0;
}

.sandbox-containers-table .resource-table-row {
  gap: 8px;
  min-height: 64px;
  padding-inline: 12px;
}

.sandbox-containers-table .row-actions {
  gap: 2px;
}

.sandbox-containers-table .row-actions .semi-button {
  width: 25px;
  padding-inline: 0;
}

.sandbox-containers-table .resource-cell-updated {
  white-space: nowrap;
}

.sandbox-containers-table .resource-avatar {
  width: 34px;
  height: 34px;
}

.work-projects-table .resource-table-row {
  gap: 8px;
  padding-inline: 14px;
}

.work-projects-table .row-actions {
  gap: 2px;
  justify-content: flex-end;
}

.work-projects-table .row-actions .semi-button {
  width: 24px;
  padding-inline: 0;
}

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

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

.system-config-spin {
  min-height: 320px;
}

.system-config-layout {
  display: grid;
  gap: 18px;
}

.config-panel {
  background: #ffffff;
  border: 1px solid #e4ebf3;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(31, 45, 61, 0.06);
  overflow: hidden;
}

.config-panel-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 18px;
  border-bottom: 1px solid #e8eef5;
  background: #f9fbfd;
}

.config-panel-header > div:first-child {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: #26344d;
}

.config-panel-header h2 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
  padding: 18px;
}

.config-grid.compact {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: #26344d;
  font-size: 13px;
  font-weight: 650;
}

.field > span {
  color: #52627a;
}

.field.full {
  grid-column: 1 / -1;
}

.field .semi-input-wrapper,
.field .semi-input-number,
.field .semi-input-number .semi-input-wrapper,
.field .semi-textarea-wrapper {
  width: 100%;
}

.switch-field {
  align-content: start;
}

.switch-field .semi-switch {
  margin-top: 5px;
}

.agent-config-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.agent-config-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e4ebf3;
  border-radius: 8px;
  background: #ffffff;
}

.agent-config-card-header {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.agent-config-card-header strong {
  min-width: 0;
  overflow: hidden;
  color: #162033;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-config-card-header span {
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-form-grid {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(180px, 1fr) minmax(160px, 0.9fr) minmax(180px, 1fr) 132px 136px;
  gap: 10px;
}

.agent-form-grid .field.full {
  grid-column: 1 / -1;
}

.agent-config-card .field {
  gap: 5px;
  font-size: 12px;
}

.agent-config-card .field .semi-input,
.agent-config-card .field .semi-input-number .semi-input {
  font-size: 12px;
}

.agent-config-card .field .semi-input-wrapper,
.agent-config-card .field .semi-input-number {
  min-height: 30px;
}

.agent-config-card .field .semi-textarea-wrapper textarea {
  font-size: 12px;
}

.project-sandbox-option,
.project-user-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 2px 8px;
  align-items: center;
  min-width: 0;
}

.project-sandbox-option span,
.project-sandbox-option small,
.project-user-option span,
.project-user-option small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-sandbox-option span,
.project-user-option span {
  font-weight: 650;
}

.project-sandbox-option small,
.project-user-option small {
  color: #66758b;
  font-size: 11px;
}

.project-sandbox-option .semi-tag,
.project-user-option .semi-tag {
  grid-row: 1 / span 2;
  grid-column: 2;
}

.project-assets-editor {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.project-assets-editor > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-assets-editor > header > span {
  color: #26344d;
  font-size: 13px;
  font-weight: 700;
}

.project-assets-rows {
  display: grid;
  gap: 10px;
  max-height: min(520px, 52vh);
  min-width: 0;
  overflow: auto;
  padding-right: 4px;
  scrollbar-color: #b8c6d6 transparent;
  scrollbar-width: thin;
}

.project-asset-row {
  display: grid;
  grid-template-columns: minmax(132px, 0.4fr) minmax(220px, 1fr) minmax(140px, 0.45fr) 32px;
  align-items: end;
  gap: 8px;
  min-width: min(640px, 100%);
  padding: 10px;
  background: #fbfdff;
  border: 1px solid #edf2f7;
  border-radius: 8px;
}

.project-asset-row label {
  min-width: 0;
}

.project-asset-row label > span {
  color: #68778f;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.project-assets-rows::-webkit-scrollbar,
.work-project-asset-list::-webkit-scrollbar,
.work-project-task-list::-webkit-scrollbar,
.work-project-summary-list::-webkit-scrollbar,
.project-info-scroll-list::-webkit-scrollbar {
  width: 8px;
}

.project-assets-rows::-webkit-scrollbar-track,
.work-project-asset-list::-webkit-scrollbar-track,
.work-project-task-list::-webkit-scrollbar-track,
.work-project-summary-list::-webkit-scrollbar-track,
.project-info-scroll-list::-webkit-scrollbar-track {
  background: transparent;
}

.project-assets-rows::-webkit-scrollbar-thumb,
.work-project-asset-list::-webkit-scrollbar-thumb,
.work-project-task-list::-webkit-scrollbar-thumb,
.work-project-summary-list::-webkit-scrollbar-thumb,
.project-info-scroll-list::-webkit-scrollbar-thumb {
  background: #b8c6d6;
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}

.project-assets-rows::-webkit-scrollbar-thumb:hover,
.work-project-asset-list::-webkit-scrollbar-thumb:hover,
.work-project-task-list::-webkit-scrollbar-thumb:hover,
.work-project-summary-list::-webkit-scrollbar-thumb:hover,
.project-info-scroll-list::-webkit-scrollbar-thumb:hover {
  background: #8ea1b8;
  background-clip: content-box;
}

.work-project-expanded {
  display: grid;
  grid-template-rows: max-content minmax(0, 1fr);
  gap: 12px;
  height: clamp(300px, 42vh, 460px);
  min-height: 0;
  overflow: hidden;
  padding: 14px 18px 16px;
  border-bottom: 1px solid #edf2f7;
  background: #fbfdff;
}

.work-project-meta {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(120px, 0.6fr) minmax(180px, 1fr);
  gap: 12px;
}

.work-project-meta > div,
.work-project-panel {
  min-width: 0;
  background: #ffffff;
  border: 1px solid #e4ebf3;
  border-radius: 8px;
}

.work-project-meta > div {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.work-project-meta span,
.work-project-panel > header {
  color: #68778f;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.work-project-meta strong {
  min-width: 0;
  overflow: hidden;
  color: #162033;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-project-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) minmax(0, 1.15fr);
  min-height: 0;
  gap: 12px;
}

.work-project-panel {
  display: grid;
  grid-template-rows: max-content minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  overflow: hidden;
  padding: 14px;
}

.work-project-panel > header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.work-project-panel-empty {
  color: #66758b;
  font-size: 13px;
}

.work-project-asset-list {
  display: grid;
  align-content: start;
  min-width: 0;
  min-height: 0;
  gap: 6px;
  overflow-y: auto;
  padding-right: 4px;
  color: #26344d;
  font-size: 13px;
  line-height: 1.65;
  scrollbar-color: #b8c6d6 transparent;
  scrollbar-width: thin;
}

.work-project-asset-list > div {
  min-width: 0;
  min-height: 30px;
  overflow: hidden;
  padding: 5px 0 7px;
  border-bottom: 1px solid #edf2f7;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-project-task-list {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  min-height: 0;
  gap: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-color: #b8c6d6 transparent;
  scrollbar-width: thin;
}

.work-project-task-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) max-content 82px;
  align-items: start;
  gap: 8px;
  min-height: 36px;
  overflow: visible;
  padding: 7px 0 8px;
  border-bottom: 1px solid #edf2f7;
  color: #26344d;
  font-size: 13px;
}

.work-project-task-row-no-icon {
  grid-template-columns: minmax(0, 1fr) max-content 82px;
}

.work-project-task-title {
  display: block;
  min-width: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.work-project-task-row .semi-tag,
.work-project-task-row .semi-progress {
  margin-top: 1px;
}

.work-project-task-row .semi-progress {
  min-width: 0;
}

.work-project-summary-list {
  display: grid;
  align-content: start;
  min-height: 0;
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-color: #b8c6d6 transparent;
  scrollbar-width: thin;
}

.work-project-summary-row {
  display: grid;
  gap: 8px;
  padding: 10px 0 12px;
  border-bottom: 1px solid #edf2f7;
}

.work-project-summary-row > header {
  display: grid;
  grid-template-columns: 18px minmax(0, max-content) minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.work-project-summary-row > header strong {
  color: #162033;
}

.work-project-summary-row > header span {
  min-width: 0;
  overflow: hidden;
  color: #7a8aa0;
  font-size: 12px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.work-project-summary-progress > span {
  min-width: 0;
  overflow: hidden;
  color: #162033;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-project-summary-block {
  display: grid;
  gap: 4px;
}

.work-project-summary-block span {
  color: #68778f;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.work-project-summary-block p,
.work-project-summary-block ul {
  margin: 0;
  color: #26344d;
  font-size: 13px;
  line-height: 1.55;
}

.work-project-summary-block ul {
  padding-left: 18px;
}

.project-info-title {
  display: grid;
  min-width: 0;
  min-height: 0;
  gap: 4px;
}

.project-info-title strong {
  min-width: 0;
  overflow: hidden;
  color: #162033;
  font-size: 16px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-info-description {
  box-sizing: border-box;
  grid-column: 1 / -1;
  width: calc(100% - 15px);
  max-height: calc(1.5em * 10);
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  color: #66758b;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  scrollbar-color: #b8c6d6 transparent;
  scrollbar-width: thin;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.project-info-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.68fr);
  gap: 14px 16px;
  height: min(780px, calc(100vh - 150px));
  min-height: 0;
  overflow: hidden;
  padding-bottom: 18px;
  color: #26344d;
}

.project-info-main {
  display: grid;
  grid-template-rows: max-content max-content max-content minmax(120px, 0.58fr) minmax(180px, 1fr);
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

.project-info-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.project-info-meta > div,
.project-info-progress,
.project-info-panel {
  min-width: 0;
  background: #ffffff;
  border: 1px solid #e4ebf3;
  border-radius: 8px;
}

.project-info-meta > div,
.project-info-progress {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.project-info-meta span,
.project-info-progress > span,
.project-info-panel > header {
  color: #68778f;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.project-info-meta strong {
  min-width: 0;
  overflow: hidden;
  color: #162033;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-info-panel {
  display: grid;
  grid-template-rows: max-content minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
  overflow: hidden;
  padding: 12px;
}

.project-info-panel > header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-info-empty {
  color: #66758b;
  font-size: 13px;
}

.project-info-scroll-list {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  height: 100%;
  gap: 8px;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-color: #b8c6d6 transparent;
  scrollbar-width: thin;
}

.project-info-summary-panel {
  min-height: 0;
}

.project-info-summary-scroll {
  max-height: none;
}

.project-info-task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content minmax(72px, 86px);
  align-items: start;
  gap: 8px;
  box-sizing: border-box;
  min-width: 0;
  min-height: 30px;
  overflow: visible;
  padding: 5px 0 7px;
  border-bottom: 1px solid #edf2f7;
}

.project-info-task-row .work-project-task-title {
  display: block;
  min-width: 0;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.project-info-task-row .semi-progress {
  min-width: 0;
  padding-top: 3px;
}

.project-info-summary {
  display: grid;
  gap: 8px;
  padding: 10px 0 12px;
  border-bottom: 1px solid #edf2f7;
}

.project-info-summary > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.project-info-summary > header strong {
  min-width: 0;
  overflow: hidden;
  color: #162033;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-info-summary > header span {
  min-width: 0;
  overflow: hidden;
  color: #7a8aa0;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-info-summary-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  align-items: center;
  gap: 10px;
}

.project-info-summary-task > span {
  min-width: 0;
  color: #162033;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.project-info-summary-block {
  display: grid;
  gap: 4px;
}

.project-info-summary-block span {
  color: #68778f;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.project-info-summary-block p,
.project-info-summary-block ul {
  margin: 0;
  color: #26344d;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.project-info-summary-block ul {
  padding-left: 18px;
}

.project-record-content {
  grid-template-columns: minmax(300px, 0.36fr) minmax(0, 1fr);
}

.project-record-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 10px 12px 12px;
  background: #ffffff;
  border: 1px solid #e4ebf3;
  border-radius: 8px;
}

.project-record-tabs,
.project-record-tabs .semi-tabs-content,
.project-record-tabs .semi-tabs-content .semi-tabs-pane-motion-overlay,
.project-record-tabs .semi-tabs-pane {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
}

.project-record-tabs {
  display: flex;
  flex-direction: column;
}

.project-record-tabs .semi-tabs-bar {
  flex: 0 0 auto;
}

.project-record-tabs .semi-tabs-content {
  overflow: hidden;
}

.project-record-list {
  display: grid;
  align-content: start;
  gap: 10px;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-color: #b8c6d6 transparent;
  scrollbar-width: thin;
}

.project-record-row {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  background: #fbfdff;
  border: 1px solid #edf2f7;
  border-radius: 8px;
}

.project-record-row header {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.project-record-row header > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 4px;
}

.project-record-row strong,
.project-record-row p,
.project-record-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.project-record-row p {
  margin: 0;
  color: #526278;
  font-size: 13px;
  line-height: 1.55;
}

.project-record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: #66758b;
  font-size: 12px;
}

.project-record-meta span {
  display: inline-flex;
  gap: 5px;
}

.project-record-meta strong {
  color: #26344d;
}

.project-record-extension {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding-top: 4px;
  border-top: 1px dashed #d8e2ee;
  color: #66758b;
  font-size: 12px;
}

.project-record-extension span {
  display: inline-flex;
  gap: 5px;
}

.project-record-extension strong {
  color: #26344d;
}

.project-attack-path ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.project-attack-path li {
  color: #526278;
  font-size: 13px;
  line-height: 1.45;
}

.project-attack-path li strong,
.project-attack-path li span {
  display: block;
}

.project-graph {
  position: relative;
  height: 100%;
  min-height: 320px;
  border: 1px solid #e4ebf3;
  border-radius: 8px;
  background:
    radial-gradient(circle, #e8eef6 1px, transparent 1px) 0 0 / 22px 22px,
    #fbfdff;
  overflow: hidden;
}

.project-graph-canvas {
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}

.project-graph-canvas:active {
  cursor: grabbing;
}

.project-graph-edge {
  pointer-events: none;
}

.project-graph-edge-hit {
  stroke: transparent;
  stroke-width: 12;
  cursor: pointer;
}

.project-graph-node circle {
  stroke: #ffffff;
  cursor: grab;
  transition: filter 0.12s ease;
}

.project-graph-node circle:hover {
  filter: brightness(1.05) drop-shadow(0 1px 3px rgba(20, 40, 80, 0.35));
}

.project-graph-node text {
  fill: #41506a;
  font-size: 11px;
  font-weight: 600;
  text-anchor: middle;
  pointer-events: none;
  paint-order: stroke;
  stroke: #fbfdff;
  stroke-width: 3px;
}

.project-graph-legend {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #e4ebf3;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(2px);
  font-size: 12px;
}

.project-graph-legend-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.project-graph-legend-title {
  color: #8593a8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.project-graph-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #41506a;
}

.project-graph-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.project-graph-legend-line {
  width: 16px;
  height: 3px;
  border-radius: 2px;
}

.project-graph-controls {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-graph-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #e4ebf3;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: #41506a;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.project-graph-controls button:hover {
  background: #eef3fa;
  color: #1f2a3d;
}

.project-graph-tooltip {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  width: min(360px, calc(100% - 20px));
  max-height: min(320px, calc(100% - 20px));
  overflow: auto;
  padding: 8px 10px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(20, 40, 80, 0.16);
  pointer-events: none;
  scrollbar-color: #b8c6d6 transparent;
  scrollbar-width: thin;
}

.project-graph-tooltip::-webkit-scrollbar {
  width: 6px;
}

.project-graph-tooltip::-webkit-scrollbar-track {
  background: transparent;
}

.project-graph-tooltip::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #b8c6d6;
}

.project-graph-tooltip strong {
  display: block;
  margin-bottom: 4px;
  color: #1f2a3d;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.project-graph-tooltip dl {
  display: grid;
  grid-template-columns: minmax(42px, max-content) minmax(0, 1fr);
  gap: 4px 10px;
  margin: 0;
}

.project-graph-tooltip dt {
  color: #8593a8;
  font-size: 11px;
  line-height: 1.45;
}

.project-graph-tooltip dd {
  min-width: 0;
  margin: 0;
  color: #41506a;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.resource-cell-created,
.resource-cell-updated {
  white-space: nowrap;
}

.user-identity strong,
.user-identity span,
.image-identity strong,
.image-identity span,
.project-identity strong,
.project-identity span,
.container-identity strong,
.container-identity span,
.resource-description {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-identity strong,
.image-identity strong,
.project-identity strong,
.container-identity strong {
  color: #162033;
}

.user-identity span,
.image-identity span,
.project-identity span,
.container-identity span,
.resource-description {
  color: #66758b;
  font-size: 13px;
}

.image-identity span,
.container-identity span,
.owner-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.owner-cell {
  min-width: 0;
  overflow: hidden;
  color: #66758b;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.novnc-toggle-row {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: inherit;
  font-size: 13px;
  font-weight: 650;
}

.novnc-controls {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.novnc-port-field {
  display: grid;
  grid-template-columns: max-content minmax(150px, 180px);
  min-width: 0;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.novnc-port-field .semi-select {
  width: 100%;
}

@media (max-width: 560px) {
  .novnc-toggle-row,
  .novnc-controls {
    align-items: stretch;
  }

  .novnc-toggle-row {
    flex-direction: column;
  }

  .novnc-controls {
    justify-content: space-between;
  }

  .novnc-port-field {
    grid-template-columns: max-content minmax(0, 1fr);
  }
}

.port-mapping-fieldset {
  display: grid;
  gap: 10px;
}

.port-mapping-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: inherit;
  font-size: 13px;
  font-weight: 650;
}

.port-mapping-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.port-mapping-empty {
  min-height: 38px;
  display: grid;
  align-items: center;
  color: #66758b;
  font-size: 13px;
}

.port-mapping-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) max-content minmax(110px, 1fr) 96px 32px;
  align-items: center;
  gap: 8px;
}

.port-mapping-row .semi-input-number,
.port-mapping-row .semi-select {
  width: 100%;
}

.port-arrow {
  color: #66758b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.port-mapping-list {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 4px;
}

.resource-table .semi-tag {
  width: fit-content;
  text-transform: capitalize;
}

.resource-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #ffffff;
  background: #172033;
  border-radius: 8px;
  font-weight: 800;
  transition: box-shadow var(--motion-fast) var(--ease-standard);
}

.resource-table-row:hover .resource-avatar {
  box-shadow: 0 8px 18px rgba(23, 32, 51, 0.16);
}

.empty-state {
  min-height: 260px;
  display: grid;
  place-content: center;
}

.pager-row {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  color: #66758b;
  border-top: 1px solid #edf2f7;
  transition: background var(--motion-fast) var(--ease-standard);
}

.pager-row:hover {
  background: #fbfdff;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
  padding-bottom: 4px;
}

.work-project-workspace {
  display: grid;
  gap: 18px;
}

.workspace-back-row,
.workspace-header,
.workspace-title,
.workspace-title-main {
  display: flex;
  min-width: 0;
  gap: 14px;
}

.workspace-back-row {
  align-items: center;
}

.workspace-header {
  align-items: stretch;
}

.workspace-title {
  flex: 1 1 auto;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid #e4ebf3;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(31, 45, 61, 0.06);
}

.workspace-title-main {
  flex: 1 1 auto;
  flex-direction: column;
  gap: 6px;
}

.workspace-title h2 {
  margin: 0;
  color: #121b2a;
  font-size: 20px;
  line-height: 1.2;
}

.workspace-title p {
  max-width: 920px;
  margin: 0;
  color: #526278;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.workspace-title span {
  color: #66758b;
  font-size: 13px;
}

.workspace-title-tags {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-top: 2px;
}

.workspace-tab-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.workspace-tabs {
  padding: 16px 18px 18px;
  background: #ffffff;
  border: 1px solid #e4ebf3;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(31, 45, 61, 0.06);
  min-width: 0;
}

.workspace-tabs .project-record-list,
.workspace-tabs .project-graph {
  height: min(620px, calc(100vh - 360px));
  min-height: 360px;
}

@media (max-width: 900px) {
  .metric-strip {
    grid-template-columns: 1fr;
  }

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

  .project-info-content {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .project-record-content {
    grid-template-columns: 1fr;
  }

  .project-record-panel {
    min-height: 520px;
  }

  .workspace-title {
    flex-direction: column;
  }

  .workspace-title-tags {
    align-self: flex-start;
  }

  .config-grid,
  .config-grid.compact,
  .agent-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-info-summary-scroll {
    max-height: min(260px, 32vh);
  }

  .work-project-expanded {
    height: auto;
    max-height: min(760px, calc(100vh - 220px));
    overflow-y: auto;
  }

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

  .work-project-asset-list,
  .work-project-task-list,
  .work-project-summary-list {
    max-height: 220px;
  }
}

@media (max-width: 1280px) and (min-width: 901px) {
  .agent-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .table-toolbar {
    grid-template-columns: 1fr;
  }

  .project-form-grid,
  .config-grid,
  .config-grid.compact,
  .agent-form-grid,
  .workspace-header,
  .workspace-title,
  .work-project-meta,
  .work-project-detail-grid,
  .project-info-meta {
    grid-template-columns: 1fr;
  }
}
