示例工程 62-workspace-shell-sandbox

62-workspace-shell-sandbox/app/src/styles/app.css

css · 5.5 KB

.app {
  min-height: 100vh;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 60px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

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

.logo {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #0f172a;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.brand h1 {
  margin: 0;
  font-size: 15px;
}

.header-side {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pill {
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
}

.ok-pill {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.bad-pill {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.banner {
  margin: 12px 20px 0;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-size: 11px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 12px;
  padding: 12px 20px 20px;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.card h2 {
  margin: 0;
  font-size: 12.5px;
}

.small {
  font-size: 10.5px;
}

.root-box {
  margin-bottom: 7px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel);
  font-size: 9.6px;
}

.links {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  font-size: 8.8px;
}

.links li {
  padding: 2px 0;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.chip {
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 8.4px;
}

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

.scenario {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
}

.scenario:hover {
  border-color: var(--primary);
  background: #eff6ff;
}

.scenario-top {
  display: flex;
  align-items: center;
  gap: 5px;
}

.scenario b {
  font-size: 9.8px;
}

.scenario code {
  color: var(--muted);
  font-size: 8.4px;
  overflow-wrap: anywhere;
}

.result {
  margin-top: 8px;
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
}

.result-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.result-input {
  margin: 5px 0 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

.result-detail {
  margin: 0;
  color: var(--muted);
  font-size: 8.8px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.audit {
  width: 100%;
  border-collapse: collapse;
  font-size: 9px;
}

.audit th,
.audit td {
  padding: 4px 5px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.audit th {
  color: var(--muted);
  font-size: 8.4px;
  font-weight: 600;
  white-space: nowrap;
}

.audit code {
  font-size: 8.2px;
}

.btn {
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 10px;
}

.btn:disabled {
  opacity: 0.45;
}

.reset {
  margin-top: 7px;
}

.checks {
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 86px;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  font-size: 9.3px;
}

.check-row:last-child {
  border-bottom: none;
}

.check-row code {
  color: var(--muted);
  font-size: 8px;
  text-align: right;
  overflow-wrap: anywhere;
}

.tag {
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
}

.tag.path {
  background: #dbeafe;
  color: #1e40af;
}

.tag.shell {
  background: #fef3c7;
  color: #92400e;
}

.tag.done {
  background: #dcfce7;
  color: #166534;
}

.tag.error {
  background: #fee2e2;
  color: #991b1b;
}

.tag.cancel {
  background: #ffedd5;
  color: #9a3412;
}

.tag.tool {
  background: #ede9fe;
  color: #5b21b6;
}

body[data-shot="workspace"] .shell-card,
body[data-shot="workspace"] .checks-card {
  display: none;
}

body[data-shot="workspace"] .audit-row[data-kind="shell"] {
  display: none;
}

body[data-shot="workspace"] .workspace-card {
  border-color: #bfdbfe;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

body[data-shot="shell"] .workspace-card,
body[data-shot="shell"] .checks-card {
  display: none;
}

body[data-shot="shell"] .audit-row[data-kind="path"] {
  display: none;
}

body[data-shot="shell"] .shell-card {
  border-color: #fcd34d;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

body[data-shot="audit"] .workspace-card,
body[data-shot="audit"] .shell-card {
  display: none;
}

body[data-shot="audit"] .layout {
  grid-template-columns: 1fr;
}

body[data-shot="audit"] .audit-card {
  border-color: #86efac;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.08);
}

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

  .scenarios {
    grid-template-columns: 1fr;
  }
}