    /* ══════════ FACILITY COACHES ══════════
       The coach table, the role/status badges and the owner card. They lived in settings.css
       while this was a tab inside Settings → Facility Access; the page moved to its own sidebar
       route, and the styles moved with it. Class names are unchanged — features/team.js renders
       the Accounts & Invites panel on the same page with the same table — so this file is shared
       by both halves rather than being duplicated per panel. */

    /* ── the table ──
       deliberately no overflow-x here (unlike .log-table) — this table always fits its
       container at any width above the 640px mobile breakpoint, where it switches to
       stacked cards instead. overflow-x:auto would also force overflow-y to clip (per the
       CSS overflow spec, setting only one axis computes the other to 'auto' too), which cut
       off each row's kebab dropdown menu against the table's own bottom/right edge. */
    .coaches-tablewrap{border:1px solid var(--b1);border-radius:var(--rl)}
    .coaches-table{width:100%;border-collapse:collapse;font-family:var(--fb)}
    .coaches-table th{font-size:.58rem;font-weight:700;letter-spacing:.1em;color:var(--t3);padding:.7rem .9rem;border-bottom:1px solid var(--b2);text-align:left;white-space:nowrap;background:var(--s2)}
    .coaches-table td{padding:.7rem .9rem;border-bottom:1px solid var(--b1);font-size:.82rem;color:var(--t2);vertical-align:middle}
    .coaches-table tr:last-child td{border-bottom:none}
    .coaches-table tr:hover td{background:var(--s2)}
    .coaches-table .ct-name{color:var(--text);font-weight:700;font-family:var(--fs);font-size:.88rem}
    .coaches-table .ct-email{color:var(--t3);font-size:.76rem}
    .coach-status{display:inline-flex;align-items:center;gap:.35rem;font-family:var(--fb);font-size:.66rem;font-weight:700;letter-spacing:0;padding:.2rem .6rem;border-radius:100px;white-space:nowrap}
    .coach-status::before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor}
    .coach-status--active{color:var(--lime);background:var(--lime-d)}
    .coach-status--pending{color:var(--amber);background:var(--amber-b)}
    .coach-status--expired{color:var(--t3);background:var(--s2)}
    .coach-status--revoked{color:var(--red);background:var(--red-b,rgba(220,38,38,.1))}
    .coaches-table .ct-actions{display:flex;gap:.4rem;justify-content:flex-end;white-space:nowrap}
    .coaches-table .ct-actions .btn{padding:.4rem .7rem;font-size:.72rem}

    /* role badges — a consistent color language across the whole Facility Access page */
    .role-badge{display:inline-block;font-family:var(--fb);font-size:.62rem;font-weight:700;letter-spacing:0;padding:.2rem .55rem;border-radius:100px;white-space:nowrap}
    .role-badge--owner{color:#92400E;background:rgba(202,138,4,.16)}
    .role-badge--admin{color:var(--blue);background:var(--blue-b)}
    .role-badge--coach{color:var(--t3);background:var(--s2);border:1px solid var(--b2)}

    /* facility owner — its own card above the table, visually distinct from every coach row */
    .owner-card{display:flex;align-items:center;gap:.9rem;background:linear-gradient(135deg,rgba(202,138,4,.08),rgba(202,138,4,.02));border:1px solid rgba(202,138,4,.25);border-radius:var(--rl);padding:1rem 1.1rem;margin:1rem 0}
    .owner-card__body{flex:1;min-width:0}
    .owner-card__name{font-family:var(--fd);font-weight:800;font-size:1rem;color:var(--text)}
    .owner-card__email{font-family:var(--fb);font-size:.78rem;color:var(--t3);margin-top:.1rem}

    /* shared name+avatar cell — table rows and the owner card both use this */
    .ct-avatar{flex-shrink:0;width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-family:var(--fd);font-weight:800;font-size:.85rem;color:var(--text);background:var(--s3);border:1px solid var(--b2)}
    .ct-namewrap{display:flex;align-items:center;gap:.65rem}

    /* "Show Revoked" collapsible — decluttered by default, one tap away */
    .team-revoked-toggle{display:flex;align-items:center;gap:.4rem;font-family:var(--fb);font-size:.78rem;font-weight:700;color:var(--t3);background:none;border:none;padding:.7rem .2rem;margin-top:.4rem}
    .team-revoked-toggle:hover{color:var(--text)}
    .team-revoked-toggle .ic{width:14px;height:14px}
    .coaches-table--revoked{opacity:.85}


    @media(max-width:640px){
      .coaches-tablewrap{border:none;overflow:visible}
      .coaches-table{min-width:0}
      .coaches-table thead{display:none}
      .coaches-table,.coaches-table tbody,.coaches-table tr{display:block}
      .coaches-table tr{border:1px solid var(--b1);border-radius:var(--r);padding:.8rem .9rem;margin-bottom:.6rem;background:var(--s1)}
      .coaches-table tr:last-child{margin-bottom:0}
      .coaches-table td{display:block;border:none;padding:.15rem 0}
      .coaches-table td:empty{display:none}
      .coaches-table td[data-label]::before{content:attr(data-label) ": ";font-family:var(--fb);font-weight:700;font-size:.62rem;letter-spacing:0;color:var(--t3)}
      .coaches-table .ct-actions{justify-content:flex-start;margin-top:.5rem}
    }

    /* An inactive coach is still on the list and still named on the classes they were assigned to,
       so the row is dimmed rather than hidden — it has to stay findable to be reactivated. */
    .coaches-table__row--inactive td{opacity:.62}

    /* Accounts with no coach record. Deliberately styled as a prompt rather than a warning: it is
       a piece of bookkeeping to finish, not a fault, and the resolution is one button per row. */
    .fc-strays{margin-top:1.1rem;background:var(--s2);border:1px solid var(--b2);border-radius:var(--rl);padding:1rem 1.1rem}
    .fc-strays__head{display:flex;align-items:center;gap:.5rem;font-family:var(--fd);font-weight:800;font-size:.92rem;color:var(--text)}
    .fc-strays__head .ic{width:16px;height:16px;flex-shrink:0}
    .fc-stray{display:flex;align-items:center;justify-content:space-between;gap:.9rem;flex-wrap:wrap;background:var(--s1);border:1px solid var(--b1);border-radius:var(--r);padding:.55rem .7rem;margin-bottom:.4rem}
    .fc-stray:last-child{margin-bottom:0}
    .fc-stray .ct-name{font-size:.84rem}

    /* The link picker's account list. `size` gives it a fixed number of visible rows so the modal
       does not resize as the search narrows the list. */
    #fcLinkUser{height:auto;padding:.3rem}
    #fcLinkUser option{padding:.4rem .5rem;font-family:var(--fb);font-size:.82rem}

/* Per-coach permission toggles (Edit member modal in features/team.js) */
.perm-row{display:flex;gap:.65rem;align-items:flex-start;padding:.55rem 0;border-bottom:1px solid var(--b1);cursor:pointer}
.perm-row input{margin-top:.2rem;flex:none}
.perm-row__txt{display:flex;flex-direction:column;gap:.1rem}
.perm-row__name{font-weight:600;font-size:.88rem}
.perm-row__hint{font-size:.75rem;color:var(--t3)}
