.w4-table-card {
  min-height: 0;
}

.w4-table-card tbody tr[data-action="w4-plan-detail"] {
  cursor: pointer;
}

.w4-table-card tbody tr[data-action="w4-plan-detail"]:hover {
  background: var(--hover);
}

.w4-plan-modal {
  width: min(720px, 100%);
}

.w4-plan-modal .modal-body {
  min-height: 0;
}

.w4-plan-modal .status-note {
  align-items: flex-start;
}

.w4-asset-list {
  display: flex;
  flex-direction: column;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}

.w4-asset-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
}

.w4-asset-item:last-child {
  border-bottom: 0;
}

.w4-asset-item:hover {
  background: var(--hover);
}

.w4-asset-item input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--primary);
}

.w4-asset-item:has(input:checked) {
  background: var(--brand-weak);
}

.w4-asset-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.w4-asset-code {
  flex: 0 0 auto;
  font-family: Consolas, Monaco, monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.w4-asset-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--text-primary);
}

.w4-asset-more {
  width: 100%;
  margin-top: 8px;
}

.w4-asset-loading {
  min-height: 120px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-tertiary);
  font-size: 13px;
  border-color: transparent;
}

.w4-asset-loading svg {
  width: 16px;
  height: 16px;
  animation: spin .8s linear infinite;
}

.w4-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 120px;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}

.w4-upload-zone:hover {
  border-color: var(--primary);
  background: var(--brand-weak);
}

.w4-upload-zone svg,
.w4-uploading svg {
  width: 22px;
  height: 22px;
  color: var(--primary);
}

.w4-uploading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 120px;
  color: var(--text-tertiary);
}

.w4-uploading svg {
  animation: spin .8s linear infinite;
}

.excel-result {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--border);
}

.excel-result > div {
  padding: 12px 8px;
  text-align: center;
  background: #fff;
}

.excel-result b {
  display: block;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.excel-result span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--text-tertiary);
}

.w4-excel-fail-count.is-err b {
  color: var(--danger);
}

.excel-fail-list {
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid #fecaca;
  border-radius: 4px;
  background: #fff7f7;
}

.excel-fail-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid #fee2e2;
  font-size: 12px;
  color: var(--text-secondary);
}

.excel-fail-row:last-child {
  border-bottom: 0;
}

.excel-fail-code {
  flex: 0 0 auto;
  min-width: 110px;
  font-family: Consolas, Monaco, monospace;
  font-weight: 600;
  color: var(--danger);
  font-variant-numeric: tabular-nums;
}

.w4-plan-card {
  transition: border-color .16s ease, box-shadow .16s ease;
}

.w4-plan-card[data-action]:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(51, 112, 255, .08);
}

.w4-plan-title {
  min-width: 0;
  color: var(--text-primary);
}

.w4-plan-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.w4-plan-card .progress-wrap {
  margin: 2px 0;
}

.w4-empty-card {
  align-items: center;
  padding: 34px 20px;
  text-align: center;
}

.w4-empty-card .state-icon {
  width: 44px;
  height: 44px;
  color: var(--text-tertiary);
  opacity: .7;
}

.w4-empty-card .state-icon svg {
  width: 44px;
  height: 44px;
}

.w4-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.w4-empty-hint {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

@media (max-width: 520px) {
  .w4-plan-modal {
    width: 100%;
  }

  .w4-asset-name {
    white-space: normal;
    line-height: 1.4;
  }

  .excel-result b {
    font-size: 16px;
  }
}
