*{box-sizing:border-box}
body{margin:0;font-family:Arial,Tahoma,sans-serif;background:#f4f7fb;color:#142033}
.shell{max-width:1250px;margin:auto;padding:32px}
.header{display:flex;justify-content:space-between;align-items:center;margin-bottom:28px}
.header h1{margin:0;font-size:32px}
.header p{margin:8px 0 0;color:#667085}
.live{background:#e9f9ef;color:#16794a;padding:9px 14px;border-radius:999px;font-weight:700}
.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:24px}
.card,.panel{background:#fff;border:1px solid #e4e9f1;border-radius:18px;box-shadow:0 8px 30px rgba(25,43,75,.05)}
.card{padding:20px}
.card span{color:#667085}
.card strong{display:block;font-size:30px;margin-top:12px}
.panel{padding:20px;margin-bottom:20px}
.panel h2{margin-top:0;font-size:19px}
table{width:100%;border-collapse:collapse}
th,td{text-align:right;padding:14px 10px;border-bottom:1px solid #edf0f4;font-size:14px}
th{color:#667085}
.badge{display:inline-block;padding:6px 10px;border-radius:999px;background:#edf2ff;color:#274690;font-size:12px;font-weight:700}
.delivered{background:#e8f8ee;color:#18794e}
.pending{background:#fff4db;color:#9a6700}
.empty{padding:25px;text-align:center;color:#667085}
.error{padding:15px;border-radius:12px;background:#fff0f0;color:#a33}
@media(max-width:800px){
  .cards{grid-template-columns:repeat(2,1fr)}
  .shell{padding:18px}
  .panel{overflow:auto}
}

:root{
  --navy:#0D1B2A;
  --blue:#2563EB;
  --pale-blue:#E6F0FF;
  --off-white:#F7FAFC;
  --slate:#6B7280;
}

body{
  background:linear-gradient(180deg,#F7FAFC 0%,#EEF4FB 100%);
  color:var(--navy);
}

.brand-logo{
  width:230px;
  max-width:100%;
  display:block;
}

.brand p{
  margin:10px 0 0;
  color:var(--slate);
}

.live{
  background:#EAF7EF;
  color:#18794E;
  border:1px solid #CDEBD9;
}

.card,.panel{
  border-color:#DCE5F0;
}

.card strong{
  color:var(--navy);
}

.badge{
  background:var(--pale-blue);
  color:var(--blue);
}

.delivered{
  background:#E8F8EE;
  color:#18794E;
}

.run-link{
  color:var(--blue,#2563EB);
  font-weight:700;
  text-decoration:none;
}
.run-link:hover{
  text-decoration:underline;
}
.details-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:24px;
}
.back-link{
  color:#2563EB;
  text-decoration:none;
  font-weight:700;
}
.run-summary{
  display:flex;
  justify-content:space-between;
  gap:24px;
  align-items:center;
}
.run-summary h1{
  margin:6px 0;
}
.run-meta{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:10px;
}
.eyebrow{
  color:#6B7280;
  font-size:12px;
  font-weight:700;
}
.workflow{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
}
.workflow-step{
  display:flex;
  gap:10px;
  align-items:center;
  padding:14px;
  border:1px solid #E4E9F1;
  border-radius:14px;
  background:#fff;
}
.workflow-step.done{
  border-color:#B9E5CB;
  background:#F2FBF6;
}
.workflow-step.current{
  border-color:#2563EB;
  background:#EEF4FF;
}
.step-number{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#E6F0FF;
  color:#2563EB;
  font-weight:700;
}
.workflow-step small{
  display:block;
  margin-top:4px;
  color:#8A5B00;
}
.request-box{
  line-height:1.9;
  background:#F8FAFC;
  padding:18px;
  border-radius:14px;
}
.agent-card{
  border:1px solid #E4E9F1;
  border-radius:16px;
  padding:18px;
  margin-bottom:16px;
}
.agent-card-header{
  display:flex;
  justify-content:space-between;
  gap:20px;
  margin-bottom:14px;
}
.agent-card-header h3{
  margin:5px 0 0;
}
.output-id{
  color:#6B7280;
  font-weight:700;
}
.json-grid{
  display:grid;
  gap:10px;
}
.json-row{
  background:#F8FAFC;
  border-radius:12px;
  padding:12px;
}
.json-row>strong{
  display:block;
  margin-bottom:8px;
  color:#334155;
}
.agent-output{
  overflow-wrap:anywhere;
  line-height:1.8;
}
.agent-output ul{
  margin:8px 0;
}
.history-item{
  border-bottom:1px solid #EDF0F4;
  padding:12px 0;
}
.history-item summary{
  cursor:pointer;
  font-weight:700;
}
.muted{
  color:#94A3B8;
}
@media(max-width:800px){
  .workflow{grid-template-columns:1fr}
  .run-summary{align-items:flex-start;flex-direction:column}
  .run-meta{align-items:flex-start}
}

/* ---- Semantic decision system ---- */
.header-right{display:flex;align-items:center;gap:12px}
.btn{border:none;border-radius:10px;padding:10px 16px;font-weight:700;font-size:14px;cursor:pointer;font-family:inherit}
.btn.secondary{background:#EEF2F7;color:#334155}
.btn.small{padding:7px 12px;font-size:13px}

.decision-cards{grid-template-columns:repeat(6,1fr)}
@media(max-width:1100px){.decision-cards{grid-template-columns:repeat(3,1fr)}}
@media(max-width:600px){.decision-cards{grid-template-columns:repeat(2,1fr)}}

.card.tone-green strong{color:#176B43}
.card.tone-amber strong{color:#9A6700}
.card.tone-red strong{color:#B42318}
.card.tone-blue strong{color:#1D4ED8}
.card.tone-gray strong{color:#6B7280}

.decision-badge{display:inline-block;padding:6px 12px;border-radius:999px;font-size:12px;font-weight:700;white-space:nowrap}
.decision-badge.tone-green{background:#E8F8EE;color:#176B43}
.decision-badge.tone-amber{background:#FFF4D6;color:#9A6700}
.decision-badge.tone-red{background:#FFEDEB;color:#B42318}
.decision-badge.tone-blue{background:#E6F0FF;color:#1D4ED8}
.decision-badge.tone-gray{background:#EEF1F5;color:#6B7280}

.score-pill{display:inline-block;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:700}
.score-pill.tone-green{background:#E8F8EE;color:#176B43}
.score-pill.tone-amber{background:#FFF4D6;color:#9A6700}
.score-pill.tone-red{background:#FFEDEB;color:#B42318}

.toolbar{display:flex;gap:12px;margin-bottom:16px;flex-wrap:wrap}
.search-input,.filter-select{
  padding:10px 14px;border-radius:10px;border:1px solid #DCE5F0;font-size:14px;font-family:inherit;
}
.search-input{flex:1;min-width:220px}

.run-row{cursor:pointer}
.run-row:hover{background:#F8FAFC}

.table-wrap{overflow-x:auto}
