/* Mise en page propre aux écrans Vendeurs et Règlements.
 * Tous les sélecteurs restent dans la portée Tross et réutilisent les tokens v1.1.
 */

.tx-scope .tx-people-shell { display:grid; gap:var(--tx-s5); }
.tx-scope .tx-people-intro { display:grid; gap:var(--tx-s1); }
.tx-scope .tx-people-intro p,
.tx-scope .tx-panel-copy,
.tx-scope .tx-form-help,
.tx-scope .tx-proof-copy { margin:0; color:var(--tx-muted); }

.tx-scope .tx-people-list { --tx-cols:5.75rem minmax(0,1fr) 8rem; }
.tx-scope #seller-list { --tx-cols:5.75rem minmax(12rem,1fr) 8rem minmax(13rem,16rem) 9rem; }
.tx-scope .tx-people-list--settlements { --tx-cols:5.75rem minmax(0,1fr) 8rem 8rem; }
.tx-scope .tx-people-list .tx-list__row {
  width:100%;
  border:0;
  border-bottom:1px solid var(--tx-border);
  border-radius:0;
  background:var(--tx-surface);
  color:var(--tx-text);
  font:inherit;
  text-align:start;
}
.tx-scope .tx-people-list .tx-list__row:last-child { border-bottom:0; }
.tx-scope .tx-people-list .tx-list__row:hover { background:var(--tx-bg); }
.tx-scope .tx-people-list .tx-list__row[aria-pressed="true"] {
  background:var(--tx-primary-soft);
  box-shadow:inset var(--tx-s1) 0 0 var(--tx-primary);
}
.tx-scope .tx-people-list__meta { color:var(--tx-muted); font-size:var(--tx-fs-small); }
.tx-scope .tx-people-list__amount { text-align:right; }
.tx-scope .tx-seller-list__row { display:grid; grid-template-columns:var(--tx-cols); align-items:stretch; border-bottom:1px solid var(--tx-border); background:var(--tx-surface); }
.tx-scope .tx-seller-list__row:last-child { border-bottom:0; }
.tx-scope .tx-seller-list__row[data-active="true"] { background:var(--tx-primary-soft); box-shadow:inset var(--tx-s1) 0 0 var(--tx-primary); }
.tx-scope .tx-seller-list__main { grid-column:1 / 5; display:grid; grid-template-columns:5.75rem minmax(12rem,1fr) 8rem minmax(13rem,16rem); align-items:center; gap:var(--tx-s3); min-height:4.5rem; padding:var(--tx-s3) var(--tx-s4); border:0; background:transparent; color:var(--tx-text); font:inherit; text-align:start; cursor:pointer; }
.tx-scope .tx-seller-list__main:hover { background:var(--tx-bg); }
.tx-scope .tx-seller-list__action { align-self:center; justify-self:center; margin-inline:var(--tx-s2); }
.tx-scope .tx-people-list__fee { white-space:nowrap; font-weight:400; font-variant-numeric:tabular-nums; }
.tx-scope .tx-people-list__closure { display:grid; gap:var(--tx-s1); }
.tx-scope .tx-people-list__closure .tx-badge { justify-self:start; font-weight:400; }
.tx-scope .tx-people-list__closure small { color:var(--tx-muted); }

.tx-scope .tx-inline-status { min-height:1.4em; color:var(--tx-muted); }
.tx-scope .tx-inline-status.tx-inline-status--success { color:var(--tx-ok); }
.tx-scope .tx-inline-status.tx-inline-status--error { color:var(--tx-danger); font-weight:650; }

.tx-scope .tx-detail-panel[hidden],
.tx-scope .tx-sheet-backdrop[hidden] { display:none !important; }
.tx-scope .tx-detail-panel { width:100%; min-width:0; }
.tx-scope .tx-detail-panel__identity { display:grid; gap:var(--tx-s1); min-width:0; }
.tx-scope .tx-detail-panel__identity h2 { margin:0; overflow-wrap:anywhere; }
.tx-scope .tx-detail-panel__close { flex:none; min-width:44px; padding-inline:var(--tx-s2); }
.tx-scope .tx-detail-panel__section { display:grid; gap:var(--tx-s3); padding-block:var(--tx-s4); border-block-start:1px solid var(--tx-border); }
.tx-scope .tx-detail-panel__section:first-of-type { padding-block-start:0; border-block-start:0; }
.tx-scope .tx-detail-panel__section h3 { margin:0; }
.tx-scope .tx-detail-panel__footer { display:grid; gap:var(--tx-s3); padding-block-start:var(--tx-s4); border-block-start:1px solid var(--tx-border); }

.tx-scope .tx-derived-code {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:var(--tx-s3);
  min-height:var(--tx-control-h);
  padding:var(--tx-s2) var(--tx-s3);
  border:1px solid var(--tx-border);
  border-radius:var(--tx-r-md);
  background:var(--tx-sunken);
}
.tx-scope .tx-derived-code span:first-child { color:var(--tx-muted); }
.tx-scope .tx-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--tx-s3); }
.tx-scope .tx-form-grid__full { grid-column:1 / -1; }
.tx-scope .tx-check > span { display:grid; gap:var(--tx-s1); }
.tx-scope .tx-field-error:empty { display:none; }
.tx-scope .tx-form-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:var(--tx-s2); }
.tx-scope .tx-danger-zone { display:grid; gap:var(--tx-s2); padding-block-start:var(--tx-s3); border-block-start:1px dashed var(--tx-border); }
.tx-scope .tx-danger-zone .tx-btn { justify-self:start; }

.tx-scope .tx-amount-calculation { overflow:hidden; border:1px solid var(--tx-border); border-radius:var(--tx-r-lg); background:var(--tx-surface); }
.tx-scope .tx-amount-line { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:var(--tx-s4); min-height:4.5rem; padding:var(--tx-s3) var(--tx-s4); border-block-start:1px solid var(--tx-border); }
.tx-scope .tx-amount-line:first-child { border-block-start:0; }
.tx-scope .tx-amount-line__label { display:grid; gap:var(--tx-s1); min-width:0; }
.tx-scope .tx-amount-line__label small { color:var(--tx-muted); }
.tx-scope .tx-amount-line__value { display:flex; align-items:baseline; justify-content:flex-end; gap:var(--tx-s2); min-width:8.5rem; text-align:right; font-variant-numeric:tabular-nums; }
.tx-scope .tx-amount-line__value > span { color:var(--tx-muted); font-size:var(--tx-fs-h3); }
.tx-scope .tx-amount-line__value b { white-space:nowrap; font-size:var(--tx-fs-h3); }
.tx-scope .tx-amount-line--total { border-block-start:2px solid var(--tx-primary); background:var(--tx-primary-soft); }
.tx-scope .tx-amount-line--total strong,
.tx-scope .tx-amount-line--total .tx-amount-line__value { color:var(--tx-primary); }
.tx-scope .tx-settlement-state { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:var(--tx-s3); }
.tx-scope .tx-settlement-proof { display:grid; gap:var(--tx-s3); }
.tx-scope .tx-settlement-proof .tx-dl { grid-template-columns:9rem minmax(0,1fr); }
.tx-scope .tx-payment-form { display:grid; gap:var(--tx-s4); }
.tx-scope .tx-payment-form__fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--tx-s3); }
.tx-scope .tx-payment-form__full { grid-column:1 / -1; }
.tx-scope .tx-adjustment { color:var(--tx-warn); font-weight:650; }

.tx-scope dialog.tx-dialog { border:1px solid var(--tx-border); }
.tx-scope dialog.tx-dialog::backdrop { background:var(--tx-overlay); }
.tx-scope dialog.tx-dialog form { display:grid; gap:var(--tx-s3); }
.tx-scope .tx-dialog .tx-dl { margin-block-start:var(--tx-s4); }

@media (max-width:1099px) {
  .tx-scope .tx-detail-panel { inset-block-start:var(--tx-s3); max-height:none; padding-block-end:calc(var(--tx-s5) + env(safe-area-inset-bottom)); }
  .tx-scope #seller-list { --tx-cols:5.25rem minmax(10rem,1fr) 7rem minmax(10rem,12rem) 8rem; }
  .tx-scope .tx-seller-list__main { grid-template-columns:5.25rem minmax(10rem,1fr) 7rem minmax(10rem,12rem); padding-inline:var(--tx-s3); }
  .tx-scope .tx-seller-list__action { white-space:normal; text-align:center; }
}

@media (min-width:1100px) {
  .tx-scope #seller-workspace.is-detail-open { grid-template-columns:minmax(22rem,1fr) minmax(34rem,38rem); }
  .tx-scope #settlement-workspace.is-detail-open { grid-template-columns:minmax(22rem,1fr) minmax(38rem,42rem); }
  .tx-scope #seller-workspace.is-detail-open .tx-seller-list__head { display:none; }
  .tx-scope #seller-workspace.is-detail-open .tx-seller-list__row { grid-template-columns:minmax(0,1fr); padding:var(--tx-s3); gap:var(--tx-s2); }
  .tx-scope #seller-workspace.is-detail-open .tx-seller-list__main { grid-column:1; display:grid; grid-template-columns:minmax(0,1fr) auto; min-height:0; padding:0; gap:var(--tx-s2); }
  .tx-scope #seller-workspace.is-detail-open .tx-people-list__code { grid-column:1; grid-row:1; }
  .tx-scope #seller-workspace.is-detail-open .tx-people-list__name { grid-column:1; grid-row:2; }
  .tx-scope #seller-workspace.is-detail-open .tx-people-list__fee { grid-column:2; grid-row:1; text-align:end; }
  .tx-scope #seller-workspace.is-detail-open .tx-people-list__closure { grid-column:1 / -1; grid-row:3; }
  .tx-scope #seller-workspace.is-detail-open .tx-seller-list__action { grid-column:1; width:100%; margin:0; }

}

@media (max-width:699px) {
  .tx-scope .tx-page-header { align-items:stretch; }
  .tx-scope .tx-page-header > .tx-btn { width:100%; }
  .tx-scope .tx-people-list,
  .tx-scope .tx-people-list--settlements { --tx-cols:minmax(0,1fr) auto; }
  .tx-scope #seller-list { --tx-cols:minmax(0,1fr); }
  .tx-scope .tx-seller-list__head { display:none; }
  .tx-scope .tx-seller-list__row { grid-template-columns:minmax(0,1fr); padding:var(--tx-s3); gap:var(--tx-s2); }
  .tx-scope .tx-seller-list__main { grid-column:1; display:grid; grid-template-columns:minmax(0,1fr) auto; min-height:0; padding:0; gap:var(--tx-s2); }
  .tx-scope .tx-seller-list__main .tx-people-list__code { grid-column:1; grid-row:1; }
  .tx-scope .tx-seller-list__main .tx-people-list__name { grid-column:1; grid-row:2; }
  .tx-scope .tx-seller-list__main .tx-people-list__fee { grid-column:2; grid-row:1; text-align:end; }
  .tx-scope .tx-seller-list__main .tx-people-list__closure { grid-column:1 / -1; grid-row:3; }
  .tx-scope .tx-seller-list__action { grid-column:1; width:100%; margin:0; }
  .tx-scope .tx-people-list .tx-list__row { min-height:0; }
  .tx-scope .tx-people-list__code { grid-column:1; grid-row:1; }
  .tx-scope .tx-people-list__name { grid-column:1; grid-row:2; }
  .tx-scope .tx-people-list__meta { grid-column:1; grid-row:3; }
  .tx-scope .tx-people-list__status { grid-column:2; grid-row:1 / span 2; justify-self:end; align-self:start; }
  .tx-scope .tx-people-list__amount { grid-column:2; grid-row:3; align-self:end; }
  .tx-scope .tx-detail-panel { inset-block-start:0; border-radius:0; }
  .tx-scope .tx-form-grid,
  .tx-scope .tx-payment-form__fields { grid-template-columns:minmax(0,1fr); }
  .tx-scope .tx-form-grid__full,
  .tx-scope .tx-payment-form__full { grid-column:auto; }
  .tx-scope .tx-form-actions > *,
  .tx-scope .tx-danger-zone .tx-btn { width:100%; }
  .tx-scope .tx-settlement-proof .tx-dl { grid-template-columns:minmax(0,1fr); gap:var(--tx-s1); }
  .tx-scope .tx-settlement-proof .tx-dl dd { margin-block-end:var(--tx-s2); }
  .tx-scope .tx-amount-line { align-items:start; gap:var(--tx-s2); padding:var(--tx-s3); }
  .tx-scope .tx-amount-line__value { min-width:7.5rem; }
}
