示例工程 60-tool-registry-approval

60-tool-registry-approval/app/src/styles/app.css

css · 5.2 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.94fr) minmax(0, 1.06fr);
  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;
}

.registry,
.audit {
  width: 100%;
  border-collapse: collapse;
  font-size: 9.2px;
}

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

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

.registry code,
.audit code {
  font-size: 8.6px;
}

.registry td:last-child {
  line-height: 1.45;
}

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

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

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

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

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

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

.btn:disabled {
  opacity: 0.45;
}

.reset {
  margin-top: 8px;
}

.pending-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.pending-head b {
  font-size: 11px;
}

.pending-head code {
  color: var(--muted);
  font-size: 9px;
}

.args {
  margin: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 9.4px;
  line-height: 1.55;
}

.pending-note {
  margin: 6px 0;
  line-height: 1.5;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

body[data-shot="approval"] .scenarios-card,
body[data-shot="approval"] .audit-card,
body[data-shot="approval"] .checks-card {
  display: none;
}

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

body[data-shot="audit"] .registry-card,
body[data-shot="audit"] .scenarios-card,
body[data-shot="audit"] .approval-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;
  }
}