/* ============================================================
   ASPI Portal — Public status page
   Loaded after style.css, which supplies the shared tokens.
   ============================================================ */

.status-card { max-width: 720px; margin: 0 auto; padding: 28px; }

.status-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding-bottom: 20px; border-bottom: 1px solid var(--slate-200);
}
.status-head h2 { font-size: 20px; color: var(--slate-800, #1e293b); letter-spacing: -.02em; margin: 6px 0 4px; }
.sc-id {
  font-family: "JetBrains Mono", monospace; font-size: 12.5px; font-weight: 700;
  color: var(--primary); letter-spacing: .02em;
}
.sc-school { font-size: 13.5px; color: var(--slate-500); }

.status-pill {
  padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.sp-blue { background: #eff6ff; color: #1d4ed8; }
.sp-purple { background: #f5f3ff; color: #6d28d9; }
.sp-amber { background: #fffbeb; color: #b45309; }
.sp-green { background: #f0fdf4; color: #15803d; }
.sp-red { background: #fef2f2; color: #b91c1c; }
.sp-grey { background: var(--slate-100); color: var(--slate-600); }

/* ---- Progress track ---- */
.progress-track { display: flex; gap: 4px; margin: 24px 0 4px; }
.pt-step { flex: 1; text-align: center; position: relative; }
.pt-step::before {
  content: ""; position: absolute; top: 13px; left: 0; right: 0; height: 3px;
  background: var(--slate-200); border-radius: 2px; z-index: 0;
}
.pt-step.done::before, .pt-step.current::before { background: var(--primary); }
.pt-dot {
  position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center;
  width: 29px; height: 29px; border-radius: 50%; background: #fff;
  border: 3px solid var(--slate-200); font-size: 12px; font-weight: 700; color: var(--slate-400);
}
.pt-step.done .pt-dot { border-color: var(--primary); background: var(--primary); color: #fff; }
.pt-step.current .pt-dot { border-color: var(--primary); color: var(--primary); }
.pt-lbl { display: block; margin-top: 7px; font-size: 12px; font-weight: 600; color: var(--slate-400); }
.pt-step.done .pt-lbl, .pt-step.current .pt-lbl { color: var(--slate-700); }

.waiting-note {
  margin-top: 18px; padding: 12px 15px; border-radius: 10px;
  background: #f5f3ff; border: 1px solid #ddd6fe; color: #5b21b6;
  font-size: 13.5px; font-weight: 500;
}

/* ---- Detail grid ---- */
.status-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  /* white base + inset dividers, so a half-empty last row still looks right */
  background: #fff; border: 1px solid var(--slate-200);
  border-radius: 12px; overflow: hidden; margin-top: 26px;
}
.sg-item { padding: 13px 15px; box-shadow: inset -1px -1px 0 var(--slate-200); }
.sg-lbl {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--slate-400); margin-bottom: 4px;
}
.sg-val { font-size: 14px; color: var(--slate-700); font-weight: 500; }
.sg-role {
  font-size: 11.5px; font-weight: 600; color: var(--slate-400);
  background: var(--slate-100); padding: 2px 7px; border-radius: 5px; margin-left: 4px;
}

/* ---- Batch strip ---- */
.batch-strip {
  margin-top: 18px; padding: 14px 16px; border-radius: 12px;
  background: var(--primary-light); border: 1px solid #bfdbfe;
  font-size: 13px; color: var(--primary-dark);
}
.bs-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.bs-item {
  background: #fff; border: 1px solid #bfdbfe; border-radius: 999px;
  padding: 5px 11px; font-size: 12.5px; font-weight: 600; color: var(--slate-700);
}
.bs-item.me { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
.bs-item em { font-style: normal; font-weight: 500; color: var(--slate-400); }

/* ---- Sections ---- */
.sc-section { margin-top: 30px; }
.sc-section h3 {
  font-size: 14px; color: var(--slate-700); margin-bottom: 4px; letter-spacing: -.01em;
}
.sc-section .hint-text { margin-bottom: 14px; }

/* ---- Timeline ---- */
.status-timeline { position: relative; padding-left: 22px; margin-top: 14px; }
.status-timeline::before {
  content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 2px; background: var(--slate-200);
}
.st-item { position: relative; padding-bottom: 18px; }
.st-item:last-child { padding-bottom: 0; }
.st-dot {
  position: absolute; left: -21px; top: 4px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 3px solid var(--primary);
}
.st-action { font-size: 13.5px; font-weight: 600; color: var(--slate-700); }
.st-detail { font-size: 13px; color: var(--slate-500); margin-top: 2px; }
.st-time { font-size: 11.5px; color: var(--slate-400); margin-top: 3px; }

/* ---- Message thread ---- */
.msg-thread {
  max-height: 340px; overflow-y: auto; display: grid; gap: 12px;
  padding: 4px; margin-bottom: 14px;
}
.msg { max-width: 86%; padding: 11px 14px; border-radius: 13px; font-size: 13.5px; line-height: 1.5; }
.msg-team { background: var(--slate-100); border: 1px solid var(--slate-200); justify-self: start; border-bottom-left-radius: 4px; }
.msg-client { background: var(--primary-light); border: 1px solid #bfdbfe; justify-self: end; border-bottom-right-radius: 4px; }
.msg-meta { font-size: 11px; color: var(--slate-400); font-weight: 600; margin-bottom: 4px; }
.msg-body { color: var(--slate-700); white-space: pre-wrap; }

.msg-compose { display: flex; gap: 10px; align-items: flex-end; }
.msg-compose textarea { flex: 1; resize: vertical; min-height: 62px; }

/* ---- Batch list ---- */
.batch-list { display: grid; gap: 10px; margin-top: 22px; }
.batch-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1.5px solid var(--slate-200); border-radius: 12px; text-decoration: none;
  background: #fff; transition: border-color .15s, transform .15s;
}
.batch-row:hover { border-color: var(--primary); transform: translateY(-1px); }
.br-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.br-main strong { font-size: 14px; color: var(--slate-800, #1e293b); }
.br-id { font-family: "JetBrains Mono", monospace; font-size: 11.5px; color: var(--slate-400); }
.br-meta { margin-left: auto; font-size: 12.5px; color: var(--slate-500); text-align: right; }

@media (max-width: 640px) {
  .status-card { padding: 20px 16px; }
  .status-head { flex-direction: column; }
  .pt-lbl { font-size: 10.5px; }
  .msg { max-width: 100%; }
  .msg-compose { flex-direction: column; align-items: stretch; }
  .batch-row { flex-wrap: wrap; }
  .br-meta { margin-left: 0; width: 100%; text-align: left; }
}

/* ---- Completion evidence on the status page ---- */
.ev-note { font-size: 14px; color: var(--slate-700); margin-bottom: 10px; }
.ev-link { font-size: 13.5px; margin-bottom: 14px; }
.ev-link a { color: var(--primary); font-weight: 600; }
.ev-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ev-shot { margin: 0; border: 1px solid var(--slate-200); border-radius: 12px; overflow: hidden; background: #fff; }
.ev-shot figcaption {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--slate-400); padding: 8px 12px; border-bottom: 1px solid var(--slate-100);
}
.ev-shot img { display: block; width: 100%; height: auto; max-height: 300px; object-fit: contain; background: var(--slate-50); }
.ev-shot-empty { padding: 30px 12px; text-align: center; color: var(--slate-400); font-size: 12.5px; }
@media (max-width: 640px) { .ev-pair { grid-template-columns: 1fr; } }
