/* Phase 2 — operational overview and controlled manual intake */
.metric-grid article { min-height: 138px; padding: 24px 26px; }
.metric-grid span { color: #606863; font-weight: 600; }
.metric-grid small { color: #7c847f; line-height: 1.45; }
.metric-grid strong { margin: 20px 0 7px; }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.section-heading > div > span { color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
.section-heading h2 { margin: 7px 0 0; font-size: 21px; font-weight: 590; letter-spacing: -.025em; }
.section-heading > p { margin: 0; color: var(--muted); font-size: 12px; }

.workflow-panel {
  margin-top: 18px;
  padding: 24px 26px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow-sm);
}
.workflow-track { display: grid; grid-template-columns:auto 1fr auto 1fr auto 1fr auto 1fr auto; align-items: center; margin-top: 24px; }
.workflow-step { display: flex; align-items: center; gap: 11px; min-width: 135px; }
.workflow-step > i { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted); font-size: 12px; font-style: normal; font-weight: 650; font-variant-numeric: tabular-nums; }
.workflow-step > div { display: grid; gap: 4px; }
.workflow-step span { color: var(--muted); font-size: 12px; }
.workflow-step strong { font-size: 13px; font-weight: 620; white-space: nowrap; }
.workflow-step[data-state="complete"] > i { border-color: #cfe1d4; background: var(--green-soft); color: var(--green); }
.workflow-step[data-state="empty"] > i { background: var(--panel-subtle); color: var(--muted-2); }
.workflow-connector { height: 1px; margin: 0 14px; background: linear-gradient(90deg, #cbd3ce, #e6e9e7); }

.overview-grid { grid-template-columns:minmax(0, 1fr) 350px; margin-top: 18px; }
.overview-grid > .panel { min-height: 350px; }
.trade-row { grid-template-columns:1.25fr 1.25fr .95fr .8fr .8fr; align-items: center; min-height: 55px; padding: 12px 10px; }
.trade-row.header { min-height: 36px; padding: 0 10px 10px; color: var(--muted); font-weight: 650; }
.trade-row-action { border-radius: 7px; transition: background 150ms var(--ease), transform 150ms var(--ease); }
.trade-row-action:hover { transform: translateX(2px); }
.trade-row strong { font-size: 13px; font-weight: 620; }
.dataset-cell { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }

.assurance { border-color: #242b27; background: linear-gradient(145deg, #171c19, #202622) !important; color: #fff; box-shadow: var(--shadow-md); }
.assurance > span { color: #8d9891; }
.assurance h2 { margin-top: 24px; color: #fff; font-size: 28px; line-height: 1.08; }
.assurance p { color: #aeb7b1; line-height: 1.65; }
.assurance ul { margin-top: 26px; }
.assurance li { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; color: #dce1de; }
.assurance .state-badge.good { border-color: rgba(111,163,125,.25); background: rgba(79,130,94,.14); color: #a9cfb3 !important; }

.activity-panel { margin-top: 18px; }
.activity-count { color: var(--muted); font-size: 12px; font-weight: 600; }
.activity-table-head, .activity-row { display: grid; grid-template-columns:1.6fr 1fr .55fr .8fr; align-items: center; gap: 18px; }
.activity-table-head { min-height: 36px; padding: 0 10px 10px; color: var(--muted); font-size: 12px; font-weight: 650; }
.activity-row { min-height: 58px; padding: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.activity-row strong { font-size: 13px; font-weight: 620; }
.activity-row span { color: var(--muted); }
.activity-empty { padding: 26px 10px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

.intake-progress { display: grid; grid-template-columns:auto 1fr auto 1fr auto 1fr auto; align-items: center; padding: 15px 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,255,255,.76); box-shadow: var(--shadow-sm); }
.intake-progress > b { height: 1px; margin: 0 18px; background: var(--line); }
.intake-step { display: flex; align-items: center; gap: 9px; color: var(--muted-2); }
.intake-step i { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 50%; font-size: 12px; font-style: normal; font-weight: 650; }
.intake-step span { font-size: 12px; font-weight: 620; }
.intake-step.active { color: var(--ink); }
.intake-step.active i { border-color: #b8c9ff; background: var(--blue-soft); color: #496edb; }
.intake-step.complete { color: var(--green); }
.intake-step.complete i { border-color: #cfe1d4; background: var(--green-soft); }

.upload-layout { grid-template-columns:minmax(340px,.72fr) minmax(560px,1.28fr); gap: 46px; padding-top: 34px; }
.intake-guidance h2 { max-width: 500px; margin: 17px 0 20px; font-size: clamp(38px,3.3vw,54px); font-weight: 550; letter-spacing: -.055em; line-height: .98; }
.intake-guidance .view-intro { max-width: 560px; }
.preflight-card { margin-top: 30px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,255,255,.75); box-shadow: var(--shadow-sm); }
.preflight-card > span { color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.preflight-card ul { margin: 16px 0 0; padding: 0; list-style: none; }
.preflight-card li { display: flex; align-items: flex-start; gap: 13px; padding: 13px 0; border-top: 1px solid var(--line); }
.preflight-card li i { color: var(--muted-2); font-size: 12px; font-style: normal; font-variant-numeric: tabular-nums; }
.preflight-card li div { display: grid; gap: 5px; }
.preflight-card li strong { font-size: 13px; font-weight: 620; }
.preflight-card li small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.source-disclosure { margin-top: 18px; border: 1px solid #d8e2da; border-left: 3px solid var(--green); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--green-soft); }

.upload-card { padding: 26px; }
.upload-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.upload-card-head span { color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.upload-card-head h3 { margin: 7px 0 0; font-size: 21px; font-weight: 590; letter-spacing: -.025em; }
.drop-zone { min-height: 235px; border-color: #bfc6c1; background: linear-gradient(180deg,#fff,#fafbfa); transition: border-color 160ms var(--ease), background 160ms var(--ease), transform 160ms var(--ease); }
.drop-zone:hover { transform: translateY(-1px); border-color: #8fa1ed; background: #fbfcff; }
.drop-zone .drop-index { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--muted); }
.drop-zone strong { margin-top: 14px; font-size: 16px; font-weight: 620; }
.drop-zone small { margin-top: 8px; color: var(--muted); }
.drop-zone em { margin-top: 16px; color: var(--muted-2); font-size: 12px; font-style: normal; }

.file-list { display: grid; gap: 8px; margin: 12px 0 20px; }
.file-list-empty { display: grid; gap: 5px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-subtle); }
.file-list-empty strong { font-size: 13px; font-weight: 600; }
.file-list-empty span { color: var(--muted); font-size: 12px; }
.file-manifest-row { display: grid; grid-template-columns:minmax(0,1fr) auto auto; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.file-manifest-row strong { overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.file-manifest-row span { color: var(--muted); font-size: 12px; }
.file-manifest-row i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.file-manifest-summary { display: flex; justify-content: space-between; padding: 4px 2px; color: var(--muted); font-size: 12px; }

.metadata-grid { display: grid; grid-template-columns:1fr 1fr; gap: 14px; }
.metadata-grid label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.metadata-grid input, .metadata-grid select { min-height: 47px; }
.confirm { margin: 21px 0; }
.confirm input { margin-top: 2px; }
.upload-card > button { min-height: 46px; font-size: 12px; }
.upload-result { position: relative; margin-top: 18px; padding: 18px 18px 18px 22px; border-color: #cfe1d4; background: var(--green-soft); }
.upload-result::before { position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--green); content:""; }
.upload-result > span { color: var(--green); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.upload-result strong { display: block; margin-top: 9px; font-size: 14px !important; }
.upload-result p { font-size: 12px !important; line-height: 1.5; }

@media (max-width: 1120px) {
  .workflow-track { grid-template-columns:1fr; gap: 10px; }
  .workflow-connector { width: 1px; height: 15px; margin: 0 0 0 15px; }
  .workflow-step { min-width: 0; }
  .overview-grid { grid-template-columns:1fr; }
  .overview-grid > .panel { min-height: 0; }
  .upload-layout { grid-template-columns:1fr; }
}

@media (max-width: 760px) {
  .trade-row { grid-template-columns:1.25fr .9fr .8fr; }
  .trade-row > :nth-child(2), .trade-row > :nth-child(5) { display:none; }
  .activity-table-head, .activity-row { grid-template-columns:1.3fr 1fr .7fr; }
  .activity-table-head > :nth-child(3), .activity-row > :nth-child(3) { display:none; }
  .intake-progress { grid-template-columns:1fr 1fr; gap:10px; }
  .intake-progress > b { display:none; }
  .metadata-grid { grid-template-columns:1fr; }
}
