/* app.css -- Partner Portal styles. Loaded after base2summit-admin.css; uses the --b2s-* tokens. */

/* ---------- sign-in / forgot / reset pages ---------- */
body.auth-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px 16px;background:var(--b2s-bg)}
.auth-card{width:100%;max-width:640px}
.auth-page .alert{font-size:.9rem}

/* ---------- status badges ---------- */
.st{display:inline-block;font-family:"Sora",sans-serif;font-weight:600;font-size:.72rem;letter-spacing:.01em;
  padding:.28rem .65rem;border-radius:999px;white-space:nowrap;background:#eef0f3;color:var(--b2s-slate-dark)}
.st-pending{background:#fff4d6;color:#8a5a00}
.st-accepted,.st-active,.st-published,.st-closed_won{background:#dff5e6;color:#14693a}
.st-declined,.st-closed_lost,.st-terminated{background:#fde2e0;color:#a32117}
.st-introduced,.st-evaluation,.st-negotiation{background:#e0eefb;color:#1b568f}
.st-expired,.st-retired,.st-suspended,.st-draft{background:#eceef1;color:#5a6472}
.st-warn{background:#fff4d6;color:#8a5a00}

/* ---------- tables ---------- */
.tbl-tools{display:flex;flex-wrap:wrap;gap:.6rem;align-items:center;margin-bottom:1rem}
.tbl-tools .form-control,.tbl-tools .form-select{width:auto;min-width:180px}
.tbl-tools .tbl-search{flex:1 1 220px;max-width:340px}
table.tbl tbody tr.row-link{cursor:pointer}
table.tbl tbody tr.row-link:hover{background:rgba(41,49,65,.035)}
table.tbl th.sortable{cursor:pointer;white-space:nowrap}
table.tbl th.sortable .arr{opacity:.35;margin-left:.25rem}
table.tbl th.sorted .arr{opacity:1}
.tbl-pager{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-top:1rem;font-size:.85rem;color:var(--b2s-muted)}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.82rem;word-break:break-all}

/* ---------- key/value blocks ---------- */
.kv{display:grid;grid-template-columns:minmax(120px,170px) 1fr;gap:.55rem 1rem;margin:0}
.kv dt{font-weight:600;color:var(--b2s-muted);font-size:.85rem;font-family:"Sora",sans-serif}
.kv dd{margin:0;word-break:break-word}
@media (max-width:575.98px){.kv{grid-template-columns:1fr;gap:.15rem}.kv dd{margin-bottom:.6rem}}

/* ---------- timeline ---------- */
.timeline{list-style:none;margin:0;padding:0 0 0 1.1rem;border-left:2px solid var(--b2s-line)}
.timeline li{position:relative;padding:0 0 1.1rem 1rem}
.timeline li::before{content:"";position:absolute;left:-1.62rem;top:.35rem;width:.7rem;height:.7rem;border-radius:50%;
  background:#fff;border:2px solid var(--b2s-brand)}
.timeline .tl-when{font-size:.78rem;color:var(--b2s-muted)}
.timeline .tl-note{white-space:pre-wrap}

/* ---------- terms ---------- */
.terms-text{max-height:420px;overflow:auto;white-space:pre-wrap;border:1px solid var(--b2s-line);border-radius:12px;
  padding:1.1rem 1.25rem;background:#fcfcfd;font-size:.92rem;line-height:1.6}
.terms-pdf{width:100%;height:520px;border:1px solid var(--b2s-line);border-radius:12px}

.fn-hint{font-size:.8rem;color:var(--b2s-muted)}
.card-title.sm{font-size:1rem}
.page-actions .btn{white-space:nowrap}
.field-err{color:#a32117;font-size:.82rem;margin-top:.25rem}
.modal-content{border-radius:var(--b2s-radius)}

/* "view as partner" bar (staff, read-only) */
.imp-banner{position:fixed;left:0;right:0;bottom:0;z-index:2000;display:flex;gap:12px;align-items:center;justify-content:space-between;
  padding:10px 16px;background:#1f2a3a;color:#fff;border-top:3px solid var(--b2s-brand,#e0552f);font-size:.9rem}
.imp-banner .btn{flex:none}
body:has(.imp-banner){padding-bottom:64px}

/* role editor */
.perm-box{border:1px solid var(--bs-border-color,#dfe3ea);border-radius:10px;padding:12px 14px;display:grid;gap:10px}
.perm-row .form-check-label{cursor:pointer}

/* Base2Summit logo */
.auth-logo{display:block;margin:0 auto 1.25rem;width:min(220px,70%);height:auto}
.sb-brand img{width:40px;height:40px;object-fit:contain;background:#fff;border-radius:10px;padding:5px}

/* programs: type badges, filterable check lists */
.st-type-referral{background:#e0eefb;color:#1b568f}
.st-type-var{background:#efe4fb;color:#5b2c91}
.chk-head{display:flex;gap:.75rem;align-items:center;margin-bottom:.4rem}
.chk-head .chk-filter{max-width:260px}
.chk-box{max-height:190px;overflow:auto;border:1px solid var(--bs-border-color,#dee2e6);border-radius:8px;padding:.35rem .6rem;background:#fff}
.chk-item{display:flex;align-items:center;gap:.5rem;padding:.18rem 0;margin:0;cursor:pointer;font-weight:400}
.avail-opts[hidden]{display:none}
