/* CMP-292 — Membership read-only review styles (additive) */

.session-banner {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.8rem 1rem;
  margin: 0 0 1rem;
  border-radius: 10px;
  background: #fff7e6;
  border: 1px solid var(--ajyal-warning, #f0c36d);
  color: var(--ajyal-warning, #7a4d00);
  font-size: 0.9rem;
}
.session-banner strong {
  font-family: monospace;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
.session-banner.hidden { display: none; }

.search-row {
  display: flex;
  gap: 0.6rem;
  margin: 0.5rem 0 1rem;
  flex-wrap: wrap;
}
.search-row input {
  flex: 1;
  min-width: 220px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--ajyal-line, #d8dde4);
  border-radius: var(--ajyal-radius-button, 8px);
  font-size: 0.92rem;
}
.search-row select {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--ajyal-line, #d8dde4);
  border-radius: var(--ajyal-radius-button, 8px);
  font-size: 0.9rem;
  background: var(--ajyal-surface, #fff);
}
.muted { color: var(--ajyal-muted, #8a929c); font-size: 0.88rem; }

.quality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.quality-grid .qcell {
  background: var(--ajyal-surface-alt, #f7f9fb);
  border: 1px solid var(--ajyal-line, #e6ebf0);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
}
.quality-grid .qcell span { display: block; color: var(--ajyal-muted, #7a828c); font-size: 0.78rem; }
.quality-grid .qcell b { font-size: 1.35rem; }

.rules-list { list-style: none; padding: 0; margin: 0.5rem 0; display: grid; gap: 0.4rem; }
.rules-list li { padding: 0.45rem 0.7rem; background: var(--ajyal-surface-alt, #f7f9fb); border-radius: var(--ajyal-radius-button, 8px); font-size: 0.88rem; }
.rules-list li b { margin-left: 0.4rem; font-family: monospace; }

.filter-explainer { padding: 0.5rem 0; }
.filter-explainer ul { list-style: disc; padding-inline-start: 1.2rem; }

.roster-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 0.8fr;
  gap: 0.5rem;
  align-items: center;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--ajyal-line, #eef1f4);
  cursor: pointer;
}
.roster-row:hover { background: var(--ajyal-surface-alt, #f6f8fa); }
.roster-row.selected { background: var(--ajyal-primary-soft, #eef4fb); }
.roster-row .flag { color: var(--ajyal-error, #c0392b); font-size: 0.72rem; }
.roster-row .tbl { color: var(--ajyal-muted, #6b7480); font-size: 0.75rem; }

#roster-empty { display: none; }
#roster-empty.show { display: block; }
.correction-preview{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px;margin:18px 0}.correction-preview label{display:grid;gap:5px;color:var(--ajyal-muted,#425566);font-size:.85rem}.correction-preview input,.correction-preview textarea,.correction-preview select{width:100%;padding:9px;border:1px solid var(--ajyal-line,#d1dce2);border-radius:var(--ajyal-radius-button,8px);background:var(--ajyal-surface-alt,#f5f7f8)}.correction-preview button{align-self:end;padding:10px;border-radius:var(--ajyal-radius-button,8px)}.membership-application{padding:12px;border-bottom:1px solid var(--ajyal-line,#e5ebee);overflow-wrap:anywhere}

/* Membership operational closure */
.membership-actions{display:flex;gap:.65rem;align-items:center;flex-wrap:wrap;margin:0 0 1rem}
.membership-actions button,.row-actions button,.membership-form button{border:1px solid var(--ajyal-line,#d8dde4);border-radius:9px;padding:.55rem .8rem;background:var(--ajyal-surface,#fff);cursor:pointer}
.membership-actions button:first-child,.membership-form footer button:last-child{background:var(--ajyal-primary,#173f35);color:#fff;border-color:transparent}
button:disabled{opacity:.45;cursor:not-allowed}
.mode-pill{font-size:.78rem;padding:.35rem .6rem;border:1px solid var(--ajyal-line,#d8dde4);border-radius:999px}
.membership-row{display:grid;grid-template-columns:minmax(180px,1.5fr) .65fr .8fr 1fr .8fr auto;gap:.65rem;align-items:center;padding:.75rem;border-bottom:1px solid var(--ajyal-line,#e8edef)}
.membership-row:hover{background:rgba(0,0,0,.018)}
.membership-main{display:grid;gap:.2rem}.membership-main span{font-size:.78rem;color:var(--ajyal-muted,#73808a)}
.status-chip{display:inline-flex;width:max-content;padding:.25rem .55rem;border-radius:999px;background:var(--ajyal-surface-alt,#eef3f0);font-size:.78rem}
.row-actions{display:flex;gap:.35rem;flex-wrap:wrap}.row-actions button{padding:.35rem .55rem;font-size:.78rem}
.compact-row{grid-template-columns:1fr .6fr 1.2fr 1fr}.history-row{grid-template-columns:1.4fr .8fr 1fr 1.2fr}
.membership-row pre{max-width:520px;overflow:auto;direction:ltr;text-align:left;font-size:.72rem}
.membership-form{min-width:min(680px,88vw);display:grid;gap:1rem;padding:1.25rem}
.membership-form header,.membership-form footer{display:flex;align-items:center;justify-content:space-between;gap:.75rem}
.membership-form header h2{margin:0}.membership-form header button{font-size:1.25rem;padding:.2rem .55rem}
.membership-form label{display:grid;gap:.35rem;font-size:.84rem;color:var(--ajyal-muted,#405261)}
.membership-form input,.membership-form select,.membership-form textarea{border:1px solid var(--ajyal-line,#d8dde4);border-radius:var(--ajyal-radius-button,8px);padding:.6rem;background:var(--ajyal-surface,#fff);color:inherit}
.membership-form textarea{min-height:78px;resize:vertical}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}
dialog{border:0;border-radius:14px;box-shadow:0 24px 80px rgba(0,0,0,.22);padding:0}
dialog::backdrop{background:rgba(15,24,28,.48)}
.membership-toast{position:fixed;left:24px;bottom:24px;z-index:200;background:var(--ajyal-primary,#173f35);color:#fff;padding:.75rem 1rem;border-radius:10px;box-shadow:0 8px 28px rgba(0,0,0,.2)}
.membership-toast.error{background:var(--ajyal-error,#8b2f2f)}.membership-toast.hidden{display:none}
.hidden{display:none!important}
@media(max-width:900px){.membership-row{grid-template-columns:1fr 1fr}.row-actions{grid-column:1/-1}.form-grid{grid-template-columns:1fr}}
.member-detail-panel{min-width:min(900px,92vw);max-width:1000px;max-height:86vh;overflow:auto}
.member-detail-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.65rem}
.member-detail-summary>div{display:grid;gap:.25rem;padding:.7rem;border:1px solid var(--ajyal-line,#e4eaed);border-radius:10px;background:var(--ajyal-surface-alt,#f8faf9)}
.member-detail-summary span{font-size:.75rem;color:var(--ajyal-muted,#73808a)}
.member-relationship-strip{display:flex;gap:.4rem;flex-wrap:wrap;margin:.8rem 0}
.detail-warning{background:#fff1d6;color:var(--ajyal-warning,#7a4d00)}
.member-detail-section{margin-top:1rem;border-top:1px solid var(--ajyal-line,#e8edef);padding-top:.8rem}
.member-detail-section h3{margin:.1rem 0 .6rem;font-size:1rem}
.detail-row{display:grid;grid-template-columns:1.1fr 1fr 1fr 1fr;gap:.6rem;padding:.55rem 0;border-bottom:1px solid var(--ajyal-line,#eef2f3);font-size:.82rem}
.detail-history{padding:.55rem 0;border-bottom:1px solid var(--ajyal-line,#eef2f3)}
.detail-history pre{white-space:pre-wrap;direction:ltr;text-align:left;font-size:.72rem;background:var(--ajyal-surface-alt,#f6f8f8);padding:.6rem;border-radius:var(--ajyal-radius-button,8px)}
@media(max-width:780px){.member-detail-summary,.detail-row{grid-template-columns:1fr 1fr}}
