/* ==========================================================================
   ASSESSMENTS DESK
   ========================================================================== */

.as-help { font-size: 11.8px; color: var(--muted); line-height: 1.55; margin: 0 0 12px; }
.as-count { margin-left: auto; font-size: 11px; color: var(--muted); font-family: var(--mono); }
.as-filters { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }

/* Colour carries meaning here: green passed, red is a voided gate, amber is a
   score that needs training. They must never be confusable at a glance. */
.mv.as-g { color: #16a34a; }
.mv.as-r { color: #dc2626; }
.mv.as-a { color: #b45309; }

/* ------------------------------------------------------------------ rows --- */
.as-row {
  display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.as-row:last-child { border-bottom: none; }
.as-who b { display: block; font-size: 12.8px; }
.as-who small { display: block; font-size: 10.8px; color: var(--muted); margin-top: 2px; }
.as-score { text-align: right; }
.as-score b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.as-score small { display: block; font-size: 9.6px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
/* A voided total is struck through: the number is real, and it does not count. */
.as-score .as-void { color: var(--muted); text-decoration: line-through; }
.as-badge { text-align: right; }
.as-badge small { display: block; font-size: 10px; color: #dc2626; margin-top: 3px; }

/* ---------------------------------------------------------------- invites --- */
.as-form { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 8px; align-items: center; }
.as-form input {
  height: 34px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 9px;
  font-size: 12.3px; font-family: inherit; background: var(--card); color: var(--ink); min-width: 0;
}
.as-form input[type="number"] { width: 62px; }
.as-form input:focus { outline: none; border-color: var(--brand-2, #4f46e5); }
.fchip.as-primary { background: var(--brand-2, #4f46e5); color: #fff; border-color: transparent; }

.as-new { margin-top: 12px; padding: 12px 14px; border-radius: 11px;
  border: 1px solid color-mix(in srgb, #16a34a 30%, var(--line-2)); background: color-mix(in srgb, #16a34a 5%, transparent); }
.as-new b { display: block; font-size: 12.6px; margin-bottom: 8px; }
.as-new small { display: block; font-size: 10.8px; color: var(--muted); margin-top: 8px; line-height: 1.5; }

.as-link { width: 100%; height: 32px; padding: 0 10px; border: 1px solid var(--line-2);
  border-radius: 8px; font-family: var(--mono); font-size: 11px; background: var(--card);
  color: var(--ink); margin-bottom: 8px; }

.as-inv { padding: 11px 0; border-bottom: 1px solid var(--line); }
.as-inv:last-child { border-bottom: none; }
.as-invtop b { font-size: 12.5px; }
.as-invtop small { display: block; font-size: 10.6px; color: var(--muted); margin: 2px 0 8px; }
.as-invrow { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; }
.as-invrow .as-link { margin-bottom: 0; }

/* ------------------------------------------------------------------ paper --- */
.as-modal { position: fixed; inset: 0; background: rgba(9,11,24,.5); z-index: 9000;
  display: none; align-items: center; justify-content: center; padding: 20px; }
.as-modal.open { display: flex; }
.as-modal-in { background: var(--card); border-radius: 15px; width: min(660px, 100%);
  max-height: 84vh; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 30px 70px -24px rgba(0,0,0,.5); }
.as-modal-h { display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line); }
.as-modal-h b { font-size: 13.5px; }
.as-modal-b { padding: 16px; overflow-y: auto; }

.as-phead { display: flex; align-items: center; gap: 18px; padding: 14px 16px;
  border-radius: 12px; margin-bottom: 14px; }
.as-phead.pass { background: color-mix(in srgb, #16a34a 8%, transparent); }
.as-phead.fail { background: color-mix(in srgb, #dc2626 7%, transparent); }
.as-phead b { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.as-phead small { display: block; font-size: 10.6px; color: var(--muted); }
.as-pverdict { font-size: 13px; font-weight: 700; }

.as-gates { border: 1px solid color-mix(in srgb, #dc2626 30%, var(--line-2));
  background: color-mix(in srgb, #dc2626 5%, transparent); border-radius: 11px;
  padding: 13px 15px; margin-bottom: 14px; }
.as-gates b { display: block; font-size: 12.6px; color: #dc2626; margin-bottom: 7px; }
.as-gates p { font-size: 11.9px; line-height: 1.6; margin: 0 0 6px; }

.as-secs { display: grid; gap: 9px; margin-bottom: 14px; }
.as-sec { position: relative; padding: 7px 0 11px; border-bottom: 1px solid var(--line); }
.as-sec span { font-size: 11.8px; }
.as-sec b { float: right; font-size: 11.8px; font-variant-numeric: tabular-nums; }
.as-sec i { position: absolute; left: 0; bottom: 4px; height: 3px; border-radius: 2px; display: block; }
.as-sec i.g { background: #16a34a; } .as-sec i.a { background: #d97706; } .as-sec i.r { background: #dc2626; }

.as-wrong b { display: block; font-size: 12.4px; margin-bottom: 8px; }
.as-w { font-size: 11.8px; line-height: 1.6; color: var(--muted); padding: 9px 11px;
  border: 1px solid var(--line-2); border-radius: 9px; margin-bottom: 7px; }
.as-w.gate { border-color: color-mix(in srgb, #dc2626 32%, transparent);
  background: color-mix(in srgb, #dc2626 4%, transparent); color: var(--ink); }
.as-clean { font-size: 12.4px; color: #16a34a; font-weight: 600; }

@media (max-width: 760px) {
  .as-form { grid-template-columns: 1fr; }
  .as-row { grid-template-columns: 1fr auto; row-gap: 6px; }
}

/* ------------------------------------------------------------ credentials --- */
/* Shown once, so it has to be readable at a glance and copyable in one action. */
.as-bulk { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.as-bulk small { display: block; font-size: 10.8px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.as-creds { display: grid; gap: 6px; margin: 4px 0 10px; max-height: 260px; overflow-y: auto; }
.as-cred { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center;
  padding: 7px 9px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--card); }
.as-cname { font-size: 11.8px; font-weight: 600; min-width: 0; }
.as-cname small { display: block; font-size: 9.8px; color: var(--muted); font-weight: 500; }
.as-cred code, .as-user { font-family: var(--mono); font-size: 11px; padding: 3px 7px;
  border-radius: 6px; background: color-mix(in srgb, var(--brand-2, #4f46e5) 8%, transparent);
  white-space: nowrap; }
.as-skip { margin-top: 8px; font-size: 11.2px; color: var(--muted); }

/* --------------------------------------------------------- marking rules --- */
.as-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.as-rules label { display: block; font-size: 11.2px; color: var(--muted); font-weight: 600; }
.as-rules label span { display: flex; align-items: center; gap: 6px; margin-top: 4px;
  font-size: 11px; color: var(--muted); }
.as-rules input { width: 62px; height: 32px; padding: 0 9px; border: 1px solid var(--line-2);
  border-radius: 8px; font-size: 12.6px; font-weight: 700; font-family: var(--mono);
  background: var(--card); color: var(--ink); }
.as-rules input:focus { outline: none; border-color: var(--brand-2, #4f46e5); }

/* The gate switch carries its consequence, because turning it off changes what
   a pass means rather than where the bar sits. */
.as-gate { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 10px;
  padding: 11px 12px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; }
.as-gate input { margin-top: 2px; flex: none; accent-color: var(--brand-2, #4f46e5); }
.as-gate b { display: block; font-size: 12.2px; }
.as-gate small { display: block; font-size: 10.6px; color: var(--muted); line-height: 1.5; margin-top: 3px; }
.as-ruleerr { font-size: 11.4px; color: var(--red, #dc2626); font-weight: 500; margin-bottom: 8px; }
