/* client.css — the client app's own screens (Phase 2, worker 2A: findings,
   suppliers and the supplier page, import). Colours only through the tokens
   (tokens.css / dark.css); the list and record kit is kit.css's, the phone
   kit phone-kit.css's. */

/* ═══════════════════ "Action required" (EUDR OperatorAssessmentsPanel
   .js:415-424): an amber strip over the list that counts what waits on the
   company and applies that filter. ═══════════════════ */
.ct-action-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid var(--potential-edge);
  border-radius: 12px;
  background: var(--potential-tint);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 600;
}
.ct-action-banner-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--potential);
}
.ct-action-banner-text {
  flex: 1 1 auto;
  min-width: 0;
}
.ct-action-banner .ct-btn-secondary {
  flex: 0 0 auto;
}
.ct-client-list-chips:empty,
.ct-client-list-banner:empty,
.ct-client-list-after:empty {
  display: none;
}
.ct-client-list-chips .ct-filter-chips {
  margin: 0 0 12px;
}
.ct-client-list-after > * + * {
  margin-top: 24px;
}
.ct-client-list-after {
  margin-top: 24px;
}

/* A two-line cell's second line, for the sub facts a list keeps out of
   extra columns. */
.ct-client-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: var(--text-xs);
}
.ct-client-facts > span {
  white-space: nowrap;
}
.ct-num-cell {
  font-variant-numeric: tabular-nums;
}
.ct-num-cell.is-zero {
  color: var(--text-subtle);
}
/* A count still on its way: never a false 0 (EUDR SupplierPanel.js:186-188). */
.ct-count-pending {
  display: inline-block;
  width: 2ch;
  height: 0.8em;
  border-radius: 4px;
  background: var(--border);
  vertical-align: middle;
}

/* The verdict guidance under a CMR verdict (handbook C3): the slot is built,
   and stays hidden until the wording is signed off (§5 #3). */
.ct-verdict-guidance {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
}
.ct-verdict-guidance[hidden] {
  display: none;
}

@media (max-width: 600px) {
  /* The phone's banner: an amber row (EUDR PhoneOpPlots.js:100-106). */
  body.ct-ph .ph-row.ct-ph-row--amber {
    background: color-mix(in srgb, var(--potential-tint) 70%, var(--m-cell));
  }
  body.ct-ph .ph-row.ct-ph-row--amber .ph-row-title {
    font-weight: 600;
  }
}

/* ═══════════════════ A form in place of the list (EUDR "ship-inline-form"):
   a title, the one problem line, fields in two columns, Cancel | Save.
   ═══════════════════ */
.ct-client-form-card {
  margin-top: 8px;
}
.ct-client-form {
  display: grid;
  gap: 16px;
  max-width: 920px;
}
.ct-client-form-title {
  margin: 0;
  color: var(--text);
  font-size: var(--text-lg);
  font-weight: 700;
}
.ct-client-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
}
.ct-client-field--wide {
  grid-column: 1 / -1;
}
.ct-client-field .ct-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 600;
}
.ct-client-field input,
.ct-client-field select,
.ct-client-field textarea {
  width: 100%;
}
.ct-client-field-hint {
  margin: 4px 0 0;
}
.ct-client-problem {
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--confirmed-edge);
  border-radius: 10px;
  background: var(--confirmed-tint);
  color: var(--confirmed);
  font-size: var(--text-sm);
  font-weight: 600;
}
.ct-client-problem[hidden] {
  display: none;
}
.ct-client-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
@media (max-width: 760px) {
  .ct-client-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.ct-req {
  color: var(--confirmed);
  font-weight: 700;
}

/* ═══════════════════ Import: check → review → import (C5) ═══════════════════ */
.ct-import-steps {
  margin: 0 0 14px;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.55;
}
.ct-import-slot-title {
  margin: 0 0 4px;
  font-size: var(--text-base);
  font-weight: 700;
}
.ct-import-slot.has-file {
  border-color: var(--clear-edge);
}
.ct-import-readas {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.ct-import-readas .ct-label {
  display: inline-flex;
  align-items: center;
  margin: 0;
  font-weight: 600;
}
.ct-import-readas .ct-select {
  min-width: 220px;
}
.ct-import-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}
.ct-import-why {
  margin-right: auto;
}
.ct-import-pick,
.ct-import-facts,
.ct-import-preview,
.ct-import-decide {
  margin-bottom: 14px;
}
.ct-import-looks {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid var(--potential-edge);
  border-radius: 12px;
  background: var(--potential-tint);
  font-size: var(--text-sm);
  font-weight: 600;
}
.ct-import-mapper > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 700;
}
.ct-import-mapper[open] > summary {
  margin-bottom: 12px;
}
.ct-import-mapper .ct-client-problem {
  margin-bottom: 10px;
}
.ct-import-sugg {
  color: var(--potential);
  font-size: var(--text-sm);
}
.ct-import-preview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 10px;
}
.ct-import-preview-head .ct-panel-title {
  margin: 0;
}
.ct-import-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-right: auto;
}
.ct-import-notes {
  margin: 0;
  padding-left: 16px;
  font-size: var(--text-sm);
}
.ct-import-row--error td:first-child {
  box-shadow: inset 3px 0 0 var(--confirmed);
}
.ct-import-result {
  margin: 12px 0 0;
  font-size: var(--text-base);
}
@media (max-width: 600px) {
  body.ct-ph .ct-ph-import-zones {
    display: grid;
    gap: 12px;
    margin: 16px 16px 20px;
  }
  body.ct-ph .ct-ph-import-zone .ct-filedrop {
    min-height: 0;
    padding: 18px 12px;
  }
  body.ct-ph .ct-ph-import-zone-title {
    margin: 0 0 6px 16px;
    color: var(--m-sec);
    font-size: 13px;
    text-transform: uppercase;
  }
}
.ct-import-facts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.ct-import-facts-head .ct-panel-title {
  margin: 0;
}
