html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
}

.wireframe {
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wf-body {
  flex: 1;
  min-height: 0;
  height: calc(100vh - 32px);
}

.wf-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

.detail-shell {
  padding: 20px 24px 28px;
  overflow-y: auto;
}

.detail-back {
  font-size: 13px;
  margin-bottom: 14px;
}

.detail-back a {
  color: #6b7280;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.detail-back a:hover {
  color: #111827;
}

.detail-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

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

.detail-identity {
  display: flex;
  gap: 14px;
  min-width: 0;
}

.detail-avatar {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid #d1d5db;
  background: linear-gradient(180deg, #ffffff 0%, #f3f4f6 100%);
  color: #4b5563;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.detail-copy {
  min-width: 0;
}

.detail-copy h1 {
  font-size: 20px;
  line-height: 1.2;
  color: #111827;
  margin: 0;
}

.detail-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.detail-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 12px;
  color: #6b7280;
}

.detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

.detail-stat {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  background: #ffffff;
}

.detail-stat .num {
  font-size: 24px;
  line-height: 1;
  color: #111827;
  font-weight: 700;
}

.detail-stat .label {
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
}

.detail-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

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

.detail-overview-side {
  min-width: 0;
}

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

.detail-overview-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  padding: 16px;
}

.detail-overview-card h3 {
  margin: 0 0 10px;
  font-size: 13px;
  color: #6b7280;
  font-weight: 600;
}

.detail-overview-card .big {
  font-size: 30px;
  line-height: 1;
  color: #111827;
  font-weight: 700;
}

.detail-overview-card .unit {
  font-size: 16px;
  font-weight: 600;
  color: #374151;
  margin-left: 4px;
}

.detail-overview-card .sub {
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.7;
}

.detail-overview-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.detail-overview-meta span {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 11px;
  color: #4b5563;
}

.detail-overview-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.detail-overview-foot .hint {
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.6;
}

.detail-overview-inline-link {
  font-size: 12px;
  color: #4b5563;
  text-decoration: none;
  white-space: nowrap;
}

.detail-overview-inline-link:hover {
  color: #111827;
}

.detail-trend-mini {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 44px;
  margin-top: 12px;
}

.detail-trend-mini span {
  display: block;
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: #d1d5db;
}

.detail-trend-mini span:nth-child(2),
.detail-trend-mini span:nth-child(5) {
  background: #9ca3af;
}

.detail-trend-mini span:last-child {
  background: #6b7280;
}

.detail-success-ring {
  display: flex;
  align-items: center;
  gap: 14px;
}

.detail-success-ring-chart {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: conic-gradient(#111827 0deg 355deg, #e5e7eb 355deg 360deg);
  position: relative;
  flex-shrink: 0;
}

.detail-success-ring-chart::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #f3f4f6;
}

.detail-success-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.detail-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 16px;
}

.detail-tab {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px 10px 0 0;
  font-size: 13px;
  color: #6b7280;
  text-decoration: none;
  border: 1px solid transparent;
  border-bottom: none;
}

.detail-tab.act {
  background: #ffffff;
  color: #111827;
  border-color: #e5e7eb;
  font-weight: 600;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 16px;
  margin-bottom: 16px;
}

.detail-panel {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  padding: 16px;
}

.detail-panel h2 {
  font-size: 15px;
  color: #111827;
  margin: 0 0 12px;
}

.detail-kv {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.detail-kv-item .k {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 4px;
}

.detail-kv-item .v {
  font-size: 13px;
  color: #374151;
  line-height: 1.7;
}

.detail-panel-subtitle {
  margin: 2px 0 12px;
  padding-top: 14px;
  border-top: 1px solid #f3f4f6;
  font-size: 13px;
  color: #6b7280;
  font-weight: 600;
}

.detail-tree-box {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.detail-tree-bar {
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #fafafa;
  font-size: 12px;
  color: #6b7280;
}

.detail-tree-bar .hint {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #4b5563;
  border-radius: 999px;
}

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

.detail-tree-action {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #4b5563;
  border-radius: 999px;
  text-decoration: none;
}

.detail-tree-list {
  display: flex;
  flex-direction: column;
}

.detail-tree-node,
.detail-tree-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-left: 3px solid transparent;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
  background: #ffffff;
}

.detail-tree-node:last-child {
  border-bottom: none;
}

.detail-tree-summary {
  list-style: none;
  cursor: pointer;
}

.detail-tree-summary::-webkit-details-marker {
  display: none;
}

.detail-tree-node.l1 {
  font-weight: 600;
  border-left-color: #111827;
  background: #f9fafb;
}

.detail-tree-summary.l2 {
  padding-left: 30px;
  position: relative;
}

.detail-tree-summary.l2::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #e5e7eb;
}

.detail-tree-summary.l2::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 10px;
  height: 1px;
  background: #e5e7eb;
}

.detail-tree-node.l3 {
  padding-left: 68px;
  background: #fcfcfc;
  position: relative;
}

.detail-tree-node.l3 .detail-tree-av {
  display: none;
}

.detail-tree-node.l3::before {
  content: "";
  position: absolute;
  left: 34px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #efefef;
}

.detail-tree-node.l3::after {
  content: "";
  position: absolute;
  left: 34px;
  top: 50%;
  width: 12px;
  height: 1px;
  background: #efefef;
}

.detail-tree-exp {
  width: 14px;
  text-align: center;
  color: #9ca3af;
  font-size: 10px;
  flex-shrink: 0;
}

.detail-tree-av {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #4b5563;
  background: linear-gradient(180deg, #ffffff 0%, #f3f4f6 100%);
  flex-shrink: 0;
}

.detail-tree-node.l1 .detail-tree-av {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border-color: #cbd5e1;
  background: linear-gradient(180deg, #f9fafb 0%, #e5e7eb 100%);
  font-size: 10px;
  font-weight: 700;
}

.detail-tree-summary.l2 .detail-tree-av {
  border-radius: 999px;
  border-style: dashed;
  background: #fafafa;
  font-size: 10px;
  font-weight: 700;
}

.detail-tree-nm {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: #111827;
}

.detail-tree-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-tree-role {
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-tree-info {
  font-size: 11px;
  color: #9ca3af;
  white-space: nowrap;
}

.detail-tree-inline-tags {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}

.detail-tree-inline-tags .detail-chip {
  padding: 3px 8px;
  font-size: 11px;
}

.detail-tree-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 12px 12px 47px;
  border-bottom: 1px solid #f3f4f6;
  background: #ffffff;
}

.detail-tree-tags.sub {
  padding-left: 68px;
}

.detail-tree-path {
  padding: 6px 12px 0 68px;
  font-size: 11px;
  color: #9ca3af;
  background: #fcfcfc;
}

.detail-tree-node.l3 .detail-tree-info {
  display: none;
}

.detail-tree-group {
  border-bottom: 1px solid #f3f4f6;
}

.detail-tree-group:last-child {
  border-bottom: none;
}

.detail-tree-group[open] .detail-tree-summary {
  background: #fafafa;
}

.detail-tree-group[open] .detail-tree-exp {
  color: #4b5563;
}

.detail-tree-group-body {
  background: #fcfcfc;
}

.detail-ability-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-ability-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.detail-ability-row .label {
  width: 72px;
  flex-shrink: 0;
  font-size: 12px;
  color: #9ca3af;
  padding-top: 4px;
}

.detail-chip-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 12px;
  color: #4b5563;
}

a.detail-chip {
  text-decoration: none;
}

.detail-chip.link {
  background: #ffffff;
  color: #374151;
}

.detail-chip.link:hover {
  border-color: #9ca3af;
}

.detail-more {
  margin-top: 8px;
}

.detail-more summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  font-size: 12px;
  color: #6b7280;
  background: #ffffff;
}

.detail-more summary::-webkit-details-marker {
  display: none;
}

.detail-more-body {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.asset-shell {
  padding: 20px 24px 28px;
  overflow-y: auto;
}

.asset-breadcrumb {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 16px;
}

.asset-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

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

.asset-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.asset-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4b5563;
  background: linear-gradient(180deg, #ffffff 0%, #f3f4f6 100%);
  font-size: 18px;
}

.asset-title h1 {
  margin: 0;
  font-size: 18px;
  color: #111827;
}

.asset-meta {
  margin-top: 6px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.asset-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
}

.asset-panel {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  padding: 16px;
}

.asset-panel h2 {
  margin: 0 0 12px;
  font-size: 15px;
  color: #111827;
}

.asset-panel p,
.asset-panel li,
.asset-panel div {
  font-size: 13px;
  color: #374151;
  line-height: 1.8;
}

.asset-panel ul {
  margin: 0;
  padding-left: 18px;
}

.asset-side-kv {
  display: grid;
  gap: 10px;
}

.asset-side-kv .k {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 2px;
}

.asset-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 92vw;
  height: 100vh;
  background: #ffffff;
  border-left: 1px solid #e5e7eb;
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.08);
  padding: 18px 18px 24px;
  overflow-y: auto;
  z-index: 2000;
  display: none;
}

.asset-drawer:target {
  display: block;
}

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

.asset-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  color: #6b7280;
  text-decoration: none;
  flex-shrink: 0;
}

.asset-drawer-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.asset-drawer-title h2 {
  margin: 0;
  font-size: 18px;
  color: #111827;
}

.asset-drawer-meta {
  margin-top: 6px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.asset-drawer-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.asset-drawer-section {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  padding: 14px;
}

.asset-drawer-section h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #111827;
}

.asset-drawer-section p,
.asset-drawer-section li,
.asset-drawer-section div {
  font-size: 13px;
  color: #374151;
  line-height: 1.8;
}

.asset-drawer-section ul {
  margin: 0;
  padding-left: 18px;
}

@media (max-width: 1100px) {
  .asset-grid {
    grid-template-columns: 1fr;
  }
}

.detail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-list-item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  padding: 12px 14px;
}

.detail-list-item .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-list-item .title {
  font-size: 13px;
  color: #111827;
  font-weight: 600;
}

.detail-task-link {
  font-size: 13px;
  color: #111827;
  font-weight: 600;
  text-decoration: none;
}

.detail-task-link:hover {
  color: #374151;
}

.detail-list-item .meta {
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.7;
}

.detail-inline-link {
  font-size: 12px;
  color: #4b5563;
  text-decoration: none;
}

.detail-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.detail-filter-board {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
}

.detail-filter-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-filter-label {
  min-width: 64px;
  padding-top: 8px;
  font-size: 12px;
  color: #6b7280;
}

.detail-filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-filter {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  font-size: 12px;
  color: #6b7280;
  text-decoration: none;
  background: #ffffff;
}

.detail-filter.act {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
}

.detail-record-note {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 12px;
}

.detail-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 12px;
  color: #4b5563;
  background: #ffffff;
}

.detail-date-sep {
  font-size: 12px;
  color: #9ca3af;
  padding-top: 8px;
}

.detail-record-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(300px, 1.4fr);
  gap: 12px;
  margin-bottom: 16px;
}

.detail-status-summary {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  padding: 16px;
  margin-bottom: 16px;
}

.detail-status-chart {
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-status-donut {
  width: 156px;
  height: 156px;
  border-radius: 50%;
  background:
    conic-gradient(
      #111827 0deg 60deg,
      #6b7280 60deg 120deg,
      #9ca3af 120deg 180deg,
      #d1d5db 180deg 240deg,
      #e5e7eb 240deg 360deg
    );
  position: relative;
}

.detail-status-donut::after {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #f3f4f6;
}

.detail-status-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
  text-align: center;
}

.detail-status-center .num {
  font-size: 28px;
  line-height: 1;
  color: #111827;
  font-weight: 700;
}

.detail-status-center .label {
  margin-top: 6px;
  font-size: 11px;
  color: #6b7280;
}

.detail-status-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-status-meta h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: #111827;
}

.detail-status-meta p {
  margin: 0 0 12px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.7;
}

.detail-status-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.detail-status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #374151;
}

.detail-status-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.swatch-complete { background: #111827; }
.swatch-running { background: #6b7280; }
.swatch-pending { background: #9ca3af; }
.swatch-failed { background: #d1d5db; border: 1px solid #9ca3af; }
.swatch-queued { background: #e5e7eb; border: 1px solid #d1d5db; }

.detail-table-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.detail-table th {
  text-align: left;
  padding: 12px 14px;
  background: #f9fafb;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
}

.detail-table td {
  padding: 14px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: top;
  font-size: 13px;
  color: #374151;
  line-height: 1.7;
}

.detail-table tr:last-child td {
  border-bottom: none;
}

.detail-table .task {
  display: inline-flex;
  align-items: center;
  color: #111827;
  font-weight: 600;
  text-decoration: none;
}

.detail-table a.task:hover {
  color: #374151;
}

.detail-table .muted {
  color: #6b7280;
  font-size: 12px;
}

.detail-operator {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 12px;
  color: #4b5563;
  text-decoration: none;
  background: #ffffff;
}

.detail-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  font-size: 12px;
  color: #6b7280;
}

.detail-pager .pages {
  display: flex;
  gap: 6px;
}

.detail-page-btn {
  display: inline-flex;
  min-width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #4b5563;
  text-decoration: none;
  background: #ffffff;
}

.detail-page-btn.act {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}

.task-drawer {
  position: fixed;
  top: 132px;
  right: 24px;
  width: 420px;
  max-width: calc(100vw - 48px);
  height: calc(100vh - 156px);
  z-index: 30;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  padding: 16px;
  overflow-y: auto;
  display: none;
}

.task-drawer:target {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.task-drawer-title {
  min-width: 0;
}

.task-drawer-title h2 {
  margin: 0;
  font-size: 16px;
  color: #111827;
}

.task-drawer-meta {
  display: grid;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.7;
}

.task-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  color: #6b7280;
  text-decoration: none;
  flex-shrink: 0;
}

.task-drawer-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-drawer-section {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  padding: 14px;
}

.task-drawer-section h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #111827;
}

.task-drawer-section p,
.task-drawer-section div {
  font-size: 13px;
  color: #374151;
  line-height: 1.8;
}

.task-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #f3f4f6;
  overflow: hidden;
}

.task-progress-fill {
  height: 100%;
  background: #6b7280;
}

.task-log {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-log-item {
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafafa;
  font-size: 12px;
  color: #374151;
  line-height: 1.7;
}

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

.cost-drawer {
  position: fixed;
  top: 132px;
  right: 24px;
  width: 420px;
  max-width: calc(100vw - 48px);
  height: calc(100vh - 156px);
  z-index: 32;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  padding: 16px;
  overflow-y: auto;
  display: none;
}

.cost-drawer:target {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cost-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cost-drawer-title h2 {
  margin: 0;
  font-size: 16px;
  color: #111827;
}

.cost-drawer-meta {
  margin-top: 6px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cost-drawer-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cost-drawer-section {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  padding: 14px;
}

.cost-drawer-section h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #111827;
}

.cost-drawer-section p,
.cost-drawer-section div {
  font-size: 13px;
  color: #374151;
  line-height: 1.8;
}

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

.cost-kv .k {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 2px;
}

.cost-breakdown {
  display: grid;
  gap: 8px;
}

.cost-breakdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafafa;
  font-size: 12px;
  color: #374151;
}

.cost-trend {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 92px;
}

.cost-trend-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.cost-trend-bar {
  width: 100%;
  border-radius: 6px 6px 0 0;
  background: #d1d5db;
}

.cost-trend-item:nth-child(2n) .cost-trend-bar {
  background: #9ca3af;
}

.cost-trend-item:last-child .cost-trend-bar {
  background: #6b7280;
}

.cost-trend-item span {
  font-size: 11px;
  color: #9ca3af;
}

.confirm-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.18);
  z-index: 40;
}

.confirm-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 420px;
  max-width: calc(100vw - 32px);
  transform: translate(-50%, -50%);
  z-index: 41;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
  padding: 18px;
}

.confirm-modal h3 {
  margin: 0;
  font-size: 16px;
  color: #111827;
}

.confirm-modal p {
  margin: 10px 0 0;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.8;
}

.confirm-modal-meta {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fafafa;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.8;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.task-confirm {
  position: fixed;
  inset: 0;
  z-index: 42;
  display: none;
}

.task-confirm:target {
  display: block;
}

.detail-empty,
.detail-error-box,
.detail-loading-box {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  padding: 44px 24px;
  text-align: center;
}

.detail-empty .icon,
.detail-error-box .icon,
.detail-loading-box .icon {
  font-size: 34px;
  color: #9ca3af;
  margin-bottom: 12px;
}

.detail-empty .title,
.detail-error-box .title,
.detail-loading-box .title {
  font-size: 15px;
  color: #111827;
  font-weight: 600;
}

.detail-empty .desc,
.detail-error-box .desc,
.detail-loading-box .desc {
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.8;
}

.detail-error-actions,
.detail-empty-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.detail-loading-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-skeleton {
  background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 50%, #f3f4f6 100%);
  border-radius: 10px;
}

.sk-line {
  height: 14px;
}

.sk-line.lg {
  height: 18px;
}

.sk-card {
  height: 92px;
}

@media (max-width: 1100px) {
  .detail-layout,
  .detail-grid-4,
  .detail-kv,
  .detail-status-summary,
  .detail-record-top,
  .detail-overview-grid,
  .detail-overview-main,
  .detail-performance-grid {
    grid-template-columns: 1fr;
  }

  .detail-header {
    flex-direction: column;
  }

  .detail-actions {
    justify-content: flex-start;
  }

  .detail-status-chart {
    justify-content: flex-start;
  }

  .task-drawer {
    top: 120px;
    right: 16px;
    left: 16px;
    width: auto;
    max-width: none;
    height: calc(100vh - 144px);
  }

  .cost-drawer {
    top: 120px;
    right: 16px;
    left: 16px;
    width: auto;
    max-width: none;
    height: calc(100vh - 144px);
  }

  .cost-kv {
    grid-template-columns: 1fr;
  }
}
