/* Admin area (Team plan): users, roles & permission groups, profiles. Ported from the approved mockups' team.css;
   every rule is scoped to .ta (the Admin pages' wrapper) so nothing leaks into the rest of the app. */
.ta .subtabs { display:flex; gap:.2rem; border-bottom:1px solid var(--line); margin:.3rem 0 .9rem; }
.ta .subtabs a { padding:.45rem .8rem; text-decoration:none; color:#374151; border-bottom:3px solid transparent; font-size:.93rem; }
.ta .subtabs a.active { border-bottom-color:var(--accent); font-weight:600; color:#111827; }
.ta .crumbs { font-size:.82rem; color:var(--muted); margin-top:.3rem; } .ta .crumbs a { color:var(--muted); }
.ta .avatar-xs { width:24px; height:24px; font-size:.66rem; margin-right:.35rem; }
.ta .avatar-md { width:32px; height:32px; font-size:.8rem; }
.ta .avatar-xl { width:112px; height:112px; font-size:2.3rem; margin:0; }
.ta img.avatar { object-fit:cover; background:#e2e8f0; }
.ta .person { display:inline-flex; align-items:center; white-space:nowrap; }
.ta .person .pn { font-weight:600; } .ta .person .ps { color:var(--muted); font-size:.8rem; display:block; line-height:1.15; font-weight:400; }
.ta .pstack { display:flex; flex-direction:column; line-height:1.2; }
.ta .uchip { display:inline-flex; align-items:center; gap:0; background:#eef2f7; border-radius:999px; padding:.08rem .55rem .08rem .1rem; font-size:.84rem; white-space:nowrap; color:#1f2937; }
.ta .uchip .avatar { margin-right:.3rem; }
.ta .uchip.warn { background:#fef3c7; outline:1px dashed #f59e0b; }
.ta .badge-role { display:inline-block; font-size:.74rem; font-weight:700; border-radius:999px; padding:.05rem .5rem; border:1px solid; white-space:nowrap; }
.ta .r-owner { background:#1d3557; color:#fff; border-color:#1d3557; } .ta .r-admin { background:#fee2e2; color:#991b1b; border-color:#fca5a5; }
.ta .r-prof { background:#eef2f7; color:#1d3557; border-color:#cbd5e1; font-weight:600; }
.ta .st { font-size:.8rem; font-weight:600; border-radius:999px; padding:.05rem .5rem; white-space:nowrap; }
.ta .st-active { background:#dcfce7; color:#14532d; } .ta .st-invited { background:#e0f2fe; color:#075985; } .ta .st-disabled { background:#f1f5f9; color:#64748b; } .ta .st-leaving { background:#fef3c7; color:#92400e; }
.ta .tz { font-size:.8rem; color:var(--muted); white-space:nowrap; } .ta .tz b { color:#1f2937; font-weight:600; }
.ta table.users td { vertical-align:middle; padding:.45rem .6rem; font-size:.9rem; }
.ta table.users th { font-size:.82rem; color:#4b5563; white-space:nowrap; }
.ta tr.dim td { opacity:.6; }
.ta .seatbar { display:flex; align-items:center; gap:1rem; background:#fff; border:1px solid var(--line); border-radius:6px; padding:.6rem .9rem; margin:.2rem 0 .8rem; }
.ta .meter { flex:0 0 220px; height:10px; background:#e5e7eb; border-radius:999px; overflow:hidden; display:flex; }
.ta .meter span { display:block; height:100%; } .ta .meter .m1 { background:var(--brand); } .ta .meter .m2 { background:#7dd3fc; }
.ta .grid-2 { display:grid; grid-template-columns:minmax(0,1fr) 330px; gap:1rem; align-items:start; }
.ta .grid-2w { display:grid; grid-template-columns:minmax(0,1fr) 420px; gap:1rem; align-items:start; }
.ta .grid-eq { display:grid; grid-template-columns:1fr 1fr; gap:1rem; align-items:start; }
.ta .card { background:#fff; border:1px solid var(--line); border-radius:6px; padding:.8rem .9rem; margin:0 0 1rem; }
.ta .card h2, .ta .card h3 { margin:0 0 .5rem; font-size:1.02rem; }
.ta .card.hl { border:2px solid var(--brand); box-shadow:0 0 0 4px #e0e7ef; }
.ta .feed { list-style:none; margin:0; padding:0; } .ta .feed li { display:flex; gap:.5rem; padding:.45rem 0; border-bottom:1px solid var(--line); font-size:.86rem; line-height:1.35; }
.ta .feed li:last-child { border-bottom:0; } .ta .feed .when { color:var(--muted); font-size:.77rem; display:block; }
.ta .note { font-size:.84rem; background:#f8fafc; border:1px solid var(--line); border-left:4px solid var(--brand); border-radius:4px; padding:.45rem .7rem; margin:.5rem 0; }
.ta .note.warn { border-left-color:#f59e0b; background:#fffbeb; } .ta .note.red { border-left-color:#dc2626; background:#fef2f2; } .ta .note.green { border-left-color:#16a34a; background:#f0fdf4; }
.ta .filterline { display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; margin-bottom:.6rem; }
.ta .filterline input[type=search] { flex:1 1 16rem; padding:.45rem .6rem; border:1px solid #cbd2da; border-radius:4px; font-size:.92rem; }
.ta .seg { display:inline-flex; border:1px solid #cbd2da; border-radius:5px; overflow:hidden; background:#fff; }
.ta .seg a, .ta .seg span { padding:.3rem .65rem; font-size:.84rem; text-decoration:none; color:#374151; border-right:1px solid #e5e7eb; white-space:nowrap; }
.ta .seg a:last-child, .ta .seg span:last-child { border-right:0; } .ta .seg .on { background:var(--brand); color:#fff; font-weight:600; }
.ta .seg .count { margin-left:.25rem; }
.ta table.perm th, .ta table.perm td { text-align:center; font-size:.88rem; padding:.42rem .5rem; }
.ta table.perm th:first-child, .ta table.perm td:first-child { text-align:left; }
.ta .ck { display:inline-block; width:18px; height:18px; border-radius:4px; border:1.5px solid #94a3b8; background:#fff; vertical-align:middle; position:relative; }
.ta .ck.on { background:var(--brand); border-color:var(--brand); } .ta .ck.on::after { content:""; position:absolute; left:5px; top:1px; width:5px; height:10px; border:solid #fff; border-width:0 2px 2px 0; transform:rotate(45deg); }
.ta .ck.fixed { background:#f1f5f9; border-style:dashed; } .ta .ck.fixed::after { content:"🔒"; font-size:.6rem; position:absolute; left:2px; top:0; }
.ta select.sm { padding:.25rem .4rem; font-size:.84rem; border:1px solid #cbd2da; border-radius:4px; background:#fff; }
.ta .lock { font-size:.8rem; }
.ta .fx { display:inline-flex; border:1px solid #cbd2da; border-radius:5px; overflow:hidden; font-size:.74rem; background:#fff; }
.ta .fx span { padding:.12rem .38rem; color:#64748b; border-right:1px solid #e5e7eb; } .ta .fx span:last-child { border-right:0; }
.ta .fx .e.on { background:#16a34a; color:#fff; font-weight:700; } .ta .fx .v.on { background:#eab308; color:#422006; font-weight:700; } .ta .fx .h.on { background:#475569; color:#fff; font-weight:700; }
.ta .fx.locked { opacity:.55; }
.ta table.fm { font-size:.85rem; } .ta table.fm th { font-size:.78rem; text-align:center; vertical-align:bottom; line-height:1.2; padding:.4rem .3rem; }
.ta table.fm td { text-align:center; padding:.28rem .3rem; } .ta table.fm td:first-child, .ta table.fm th:first-child { text-align:left; padding-left:.6rem; }
.ta table.fm tr.grp td { background:#f1f5f9; font-weight:700; font-size:.78rem; text-transform:uppercase; letter-spacing:.04em; color:#475569; text-align:left; }
.ta table.fm tr.bulk td { background:#f8fafc; } .ta table.fm td.sel, .ta table.fm th.sel { background:#eff6ff; }
.ta table.fm tr.changed td.sel { background:#dbeafe; }
.ta .legend { display:flex; gap:1rem; align-items:center; flex-wrap:wrap; font-size:.82rem; color:#374151; }
.ta .vbanner { background:#312e81; color:#fff; border-radius:6px; padding:.55rem .9rem; display:flex; align-items:center; gap:.8rem; margin:.4rem 0 .8rem; flex-wrap:wrap; }
.ta .vbanner .btn { background:#fff; color:#312e81; } .ta .vbanner .muted { color:#c7d2fe; }
.ta .fld-hidden { background:repeating-linear-gradient(135deg,#f1f5f9 0 8px,#e2e8f0 8px 16px); color:#475569; border-radius:4px; padding:.05rem .5rem; font-size:.82rem; font-style:italic; }
.ta .fld-ro { color:#1f2937; } .ta .ro-tag { font-size:.72rem; background:#fef9c3; color:#713f12; border:1px solid #eab308; border-radius:4px; padding:0 .35rem; margin-left:.4rem; white-space:nowrap; }
.ta dl.det { grid-template-columns:11rem 1fr; border:1px solid var(--line); border-radius:6px; font-size:.92rem; }
.ta dl.det dt.h, .ta dl.det dd.h { opacity:.85; }
.ta .btn.off { background:#cbd5e1; color:#64748b; cursor:not-allowed; }
.ta .drawer { background:#fff; border:2px solid var(--brand); border-radius:8px; box-shadow:0 10px 30px rgba(15,23,42,.18); padding:1rem; }
.ta .drawer h2 { margin:0 0 .3rem; font-size:1.1rem; }
.ta .opt { display:flex; gap:.5rem; align-items:flex-start; border:1px solid var(--line); border-radius:6px; padding:.5rem .6rem; margin:.35rem 0; font-size:.88rem; }
.ta .opt.on { border-color:var(--brand); background:#f5f8fc; } .ta .opt .rd { width:16px; height:16px; border-radius:50%; border:2px solid #94a3b8; flex:none; margin-top:.15rem; } .ta .opt.on .rd { border:5px solid var(--brand); }
.ta .picklist { list-style:none; margin:.3rem 0; padding:0; border:1px solid var(--line); border-radius:6px; }
.ta .picklist li { display:flex; align-items:center; justify-content:space-between; padding:.35rem .55rem; border-bottom:1px solid var(--line); font-size:.86rem; }
.ta .picklist li:last-child { border-bottom:0; } .ta .picklist li.on { background:#eff6ff; }
.ta .kv { display:grid; grid-template-columns:auto 1fr; gap:.2rem .8rem; font-size:.88rem; }
.ta .rule { display:grid; grid-template-columns:34px minmax(0,1fr) auto; gap:.7rem; align-items:start; background:#fff; border:1px solid var(--line); border-radius:6px; padding:.7rem .8rem; margin:.5rem 0; }
.ta .rule .rnum { width:28px; height:28px; border-radius:50%; background:var(--brand); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; }
.ta .rule h3 { margin:0; font-size:.98rem; } .ta .rule p { margin:.15rem 0 .3rem; font-size:.86rem; color:#4b5563; }
.ta .drag { color:#94a3b8; cursor:grab; }
.ta table.terr td { font-size:.86rem; padding:.35rem .5rem; vertical-align:middle; }
.ta .stchip { display:inline-block; font-family:ui-monospace,monospace; font-size:.75rem; background:#e0e7ef; color:#1d3557; border-radius:3px; padding:0 .3rem; margin:.05rem; }
.ta .plans { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
.ta .plan { background:#fff; border:1px solid var(--line); border-radius:8px; padding:1rem 1.1rem; position:relative; }
.ta .plan.rec { border:2px solid var(--brand); box-shadow:0 6px 20px rgba(29,53,87,.15); }
.ta .plan h2 { margin:0; font-size:1.25rem; } .ta .plan .price { font-size:1.6rem; font-weight:800; color:var(--brand); margin:.3rem 0; }
.ta .plan .price small { font-size:.85rem; font-weight:400; color:var(--muted); }
.ta .plan ul { margin:.4rem 0; padding-left:1.1rem; font-size:.9rem; } .ta .plan li { margin:.15rem 0; }
.ta .ribbon-tag { position:absolute; top:-11px; right:14px; background:var(--accent); color:#fff; font-size:.72rem; font-weight:700; border-radius:999px; padding:.1rem .6rem; }
.ta .placeholder { background:#fef3c7; border:1px dashed #f59e0b; border-radius:4px; padding:0 .3rem; color:#92400e; font-size:.8em; font-weight:700; }
.ta .steps { display:flex; gap:0; margin:.6rem 0 1rem; counter-reset:s; }
.ta .steps div { flex:1; padding:.5rem .8rem; background:#fff; border:1px solid var(--line); font-size:.88rem; color:#64748b; }
.ta .steps div.done { color:#14532d; background:#f0fdf4; } .ta .steps div.cur { color:#fff; background:var(--brand); font-weight:600; }
.ta .steps div:first-child { border-radius:6px 0 0 6px; } .ta .steps div:last-child { border-radius:0 6px 6px 0; }
.ta .form2 { display:grid; grid-template-columns:1fr 1fr; gap:.6rem .9rem; }
.ta .form2 .full { grid-column:1/-1; }
.ta .f label { display:block; font-size:.82rem; color:var(--muted); margin-bottom:.15rem; }
.ta .f input, .ta .f select, .ta .f textarea { width:100%; padding:.42rem .55rem; border:1px solid #cbd2da; border-radius:4px; font:inherit; font-size:.9rem; background:#fff; }
.ta .f .hint { font-size:.76rem; color:var(--muted); }
.ta .f.sens label::after { content:" 🔒"; }
.ta .photo-field { display:flex; gap:.9rem; align-items:center; }
.ta .drop { border:2px dashed #cbd2da; border-radius:6px; padding:.5rem .8rem; font-size:.82rem; color:var(--muted); background:#f8fafc; }
.ta .secnav { display:flex; gap:.2rem; background:#fff; border:1px solid var(--line); border-radius:6px; padding:.25rem; margin:.6rem 0 .8rem; }
.ta .secnav a { padding:.35rem .8rem; border-radius:4px; text-decoration:none; color:#374151; font-size:.9rem; } .ta .secnav a.on { background:var(--brand); color:#fff; font-weight:600; }
.ta .prof-head { display:flex; gap:1rem; align-items:center; background:#fff; border:1px solid var(--line); border-radius:8px; padding:.9rem 1rem; }
.ta .prof-head h1 { margin:0; }
.ta .sec { background:#fff; border:1px solid var(--line); border-radius:6px; padding:.75rem .9rem; margin:0 0 .9rem; }
.ta .sec h2 { font-size:1rem; margin:0 0 .6rem; display:flex; justify-content:space-between; align-items:center; }
.ta .sec h2 .muted { font-size:.78rem; font-weight:400; }
.ta .sec.sensitive { border-left:4px solid #7c3aed; }
.ta .dircard { background:#fff; border:1px solid var(--line); border-radius:10px; padding:1rem; text-align:center; width:300px; box-shadow:0 4px 14px rgba(15,23,42,.08); }
.ta .dircard h3 { margin:.5rem 0 0; font-size:1.1rem; } .ta .dircard .t { color:var(--muted); font-size:.88rem; }
.ta .dircard .rows { text-align:left; font-size:.86rem; margin-top:.7rem; border-top:1px solid var(--line); padding-top:.6rem; display:grid; gap:.3rem; }
.ta .popconf { position:absolute; z-index:5; background:#fff; border:1px solid #cbd5e1; border-radius:8px; box-shadow:0 12px 32px rgba(15,23,42,.25); padding:.8rem .9rem; width:360px; font-size:.86rem; }
.ta .popconf h4 { margin:0 0 .3rem; font-size:.95rem; }
.ta .overlay { position:fixed; inset:0; background:rgba(15,23,42,.5); z-index:20; display:flex; align-items:flex-start; justify-content:center; padding-top:110px; }
.ta .modal { background:#fff; border-radius:8px; padding:1.1rem 1.3rem; box-shadow:0 12px 40px rgba(0,0,0,.3); }
.ta .modal h2 { margin:0 0 .4rem; font-size:1.12rem; }
.ta .sumbox { background:#f8fafc; border:1px solid var(--line); border-radius:6px; padding:.55rem .7rem; font-size:.83rem; }
.ta .sumbox table { background:transparent; } .ta .sumbox td { padding:.12rem .3rem; border:0; font-size:.8rem; }
.ta .y { color:#15803d; font-weight:700; } .ta .n { color:#94a3b8; } .ta .p { color:#b45309; font-weight:700; }
.ta .rowsel td { background:#eff6ff !important; }
.ta table.cl td { font-size:.88rem; padding:.38rem .55rem; vertical-align:middle; }
.ta .filterline select { width:auto; } .ta .filterline .btn { flex:none; }
.ta table.users .row-actions { white-space:nowrap; line-height:1.5; }
.ta .feed li { break-inside:avoid; }
.ta table.users td, .ta table.users th { padding:.4rem .45rem; font-size:.85rem; }
.ta .seg .count, .ta .seg span .count { padding:0 .45rem; border-right:0; margin-left:.3rem; color:var(--brand); }
.ta .picklist li { gap:.6rem; } .ta .picklist li .muted { text-align:right; }
.ta .subtabs .count, .ta .tabs-row .count { padding:0 .45rem; }
.ta .hier > div { border-left:3px solid var(--brand); padding:.3rem .5rem; margin:.25rem 0; background:#f8fafc; border-radius:0 4px 4px 0; line-height:1.4; }
.ta .hier .hl1 { margin-left:.6rem; } .ta .hier .hl2 { margin-left:1.2rem; } .ta .hier .hl3 { margin-left:1.8rem; } .ta .hier .hl4 { margin-left:2.4rem; }

.ta { max-width:1260px; }
.ta .r-super { background:#7f1d1d; color:#fff; border-color:#7f1d1d; }
.ta .r-assist { background:#fff1f2; }
.ta .head-actions { display:flex; gap:.4rem; flex-wrap:wrap; align-items:center; }
.ta .pagehead { display:flex; justify-content:space-between; align-items:center; gap:1rem; flex-wrap:wrap; }
.ta .pagehead h1 { margin:.2rem 0 .5rem; }
.ta table.groups td, .ta table.groups th { vertical-align:middle; font-size:.88rem; padding:.42rem .55rem; }
.ta table.groups tr[draggable=true] { cursor:grab; } .ta table.groups tr.dragging { opacity:.5; } .ta table.groups tr.drop-target td { border-top:2px solid var(--brand); }
.ta table.perm input[type=checkbox] { width:18px; height:18px; accent-color:var(--brand); }
.ta table.perm input[type=checkbox]:disabled { opacity:.45; }
.ta .ck-lock { font-size:.75rem; }
.ta .actions-inline { display:inline-flex; gap:.4rem; align-items:center; flex-wrap:wrap; }
.ta .actions-inline form { display:inline; margin:0; }
.ta .linkbtn { background:none; border:0; padding:0; color:var(--brand); text-decoration:underline; cursor:pointer; font:inherit; font-size:inherit; }
.ta .linkbtn.danger { color:#b91c1c; }
.ta .btn.danger, .ta .btn-danger { background:#b91c1c; color:#fff; border-color:#b91c1c; }
.ta .fieldlist { columns:2; column-gap:1.5rem; font-size:.86rem; list-style:none; padding:0; margin:.3rem 0; }
.ta .fieldlist li { break-inside:avoid; display:flex; justify-content:space-between; gap:.5rem; padding:.15rem 0; border-bottom:1px dotted var(--line); }
.ta .acc-edit { color:#15803d; font-weight:600; } .ta .acc-view { color:#b45309; font-weight:600; } .ta .acc-hidden { color:#475569; font-style:italic; }
.ta .pwd-confirm { display:flex; gap:.4rem; align-items:center; flex-wrap:wrap; margin-top:.4rem; }
.ta .pwd-confirm input[type=password] { width:14rem; }
.ta .empty { color:var(--muted); font-style:italic; }
.soon-tag { font-size:.62rem; font-weight:700; background:#fef3c7; color:#92400e; border:1px dashed #f59e0b; border-radius:999px; padding:0 .4rem; margin-left:.25rem; vertical-align:middle; text-transform:uppercase; letter-spacing:.03em; }
.nav-team { font-size:.62rem; font-weight:700; background:var(--accent); color:#fff; border-radius:999px; padding:.02rem .4rem; margin-left:.3rem; vertical-align:middle; }
.mainnav .nav-group { display:flex; flex-direction:column; }
.mainnav .nav-group-head { font-weight:600; }
body.nav-left .mainnav .nav-group-head.active { border-left:3px solid var(--accent); }
.mainnav .nav-group-items { list-style:none; margin:0 0 .3rem; padding:0 0 0 .6rem; }
.mainnav .nav-group-items a { display:block; padding:.32rem .8rem; font-size:.9rem; border:0; }
.mainnav .nav-group-items a.active { background:#f1f5f9; border-left:3px solid var(--accent); font-weight:600; }
.mainnav .nav-group-items a.soon, .mainnav .nav-dropdown-menu a.soon { color:#94a3b8; }
main:has(.ta) { max-width:1260px; }
.ta { max-width:none; }
.ta td form.inline, .ta td .button_to { display:inline; }
.ta table.groups td.nowrap { white-space:nowrap; }
.ta h2.h-sec { font-size:1.1rem; margin:1rem 0 .4rem; }
/* Teammate avatars outside the Admin area too (task assignees, chips, activity). */
.avatar-xs { width:24px; height:24px; font-size:.66rem; margin-right:.35rem; }
.avatar-md { width:32px; height:32px; font-size:.8rem; }
.avatar-xl { width:112px; height:112px; font-size:2.3rem; margin:0; }
img.avatar { object-fit:cover; background:#e2e8f0; }
.uchip { display:inline-flex; align-items:center; background:#eef2f7; border-radius:999px; padding:.08rem .55rem .08rem .1rem; font-size:.84rem; white-space:nowrap; color:#1f2937; text-decoration:none; }
.uchip .avatar { margin-right:.3rem; }
.ta table.groups[aria-label="Permission groups"] td:nth-child(3) { min-width:15rem; }
.ta table.groups[aria-label="Permission groups"] td:nth-child(2) { min-width:9rem; }
.ta .users-bottom { grid-template-columns:minmax(0,1fr) 380px; margin-top:1rem; }
.ta .feed-2col .feed { columns:2; column-gap:1.2rem; } .ta .feed-2col .feed li { break-inside:avoid; }
.ta .row-actions { line-height:1.6; } .ta .row-actions form.inline { display:inline; }
.ta .linkbtn { background:none; border:0; padding:0; color:var(--brand, #1d3557); text-decoration:underline; cursor:pointer; font:inherit; }
.ta .linkbtn.danger, .ta a.danger-link { color:#b91c1c; }
.ta .linkbtn[disabled] { color:#94a3b8; cursor:not-allowed; text-decoration:none; }
.ta .head-actions { display:flex; gap:.4rem; flex-wrap:wrap; }
.ta .btn.disabled { opacity:.5; pointer-events:none; }
.ta table.users { width:100%; }
.visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.ta .access-box { border:1px solid var(--line); } .ta .access-box legend { padding:0 .3rem; }
.ta .access-box .opt { display:flex; gap:.5rem; align-items:flex-start; flex-wrap:wrap; }
.ta .pw-fields { display:inline-flex; gap:.4rem; flex-wrap:wrap; align-items:center; } .ta .pw-fields.off { opacity:.45; }
.ta .pw-fields input[type=password] { width:12rem; }
.ta .more-fields summary { cursor:pointer; color:var(--brand); }
.ta .photo-field .logo-field { border:0; padding:0; margin:0; }
.ta fieldset.plain { border:0; padding:0; margin:0; min-width:0; }
.ta .form2.c4 { grid-template-columns:repeat(4, minmax(0,1fr)); }
@media (max-width: 900px) { .ta .form2.c4 { grid-template-columns:1fr 1fr; } }
.ta .pair { display:flex; gap:.3rem; } .ta .pair input:last-child { width:6rem; flex:none; }
.ta .prof-actions { display:flex; flex-direction:column; gap:.35rem; align-items:flex-end; }
.ta .prof-actions span { display:flex; gap:.3rem; flex-wrap:wrap; justify-content:flex-end; }
.ta .sec { scroll-margin-top:1rem; }
/* Roles page: the groups table needs the full width on laptop screens; "Who manages whom" moves below it. */
@media (max-width: 1440px) { .ta .grid-2.roles-grid { grid-template-columns:minmax(0,1fr); } }
.ta .seatbar b { white-space:nowrap; }

/* ---- Field permissions (mockup 03): matrix, segmented cells, enforcement badges ---- */
.ta table.perm th small.mod-desc { display:block; font-weight:400; color:#6b7280; font-size:.76rem; max-width:22rem; line-height:1.3; margin-top:.15rem; }
.ta table.perm th label.mod-extra { display:flex; align-items:center; gap:.35rem; font-weight:600; font-size:.8rem; margin-top:.4rem; }
.ta .fp-tools { display:flex; flex-wrap:wrap; gap:.6rem; align-items:center; margin:.4rem 0 .7rem; }
.ta .fp-search { flex:1 1 18rem; max-width:30rem; padding:.42rem .6rem; border:1px solid #cbd2da; border-radius:5px; }
.ta .fp-filter button { padding:.3rem .65rem; font-size:.84rem; border:0; border-right:1px solid #e5e7eb; background:#fff; cursor:pointer; color:#374151; }
.ta .fp-filter button:last-child { border-right:0; } .ta .fp-filter button.on { background:var(--brand); color:#fff; font-weight:600; }
.ta .fp-legend { display:inline-flex; gap:.3rem; margin-left:auto; }
.ta .fp-key { font-size:.78rem; padding:.15rem .45rem; border-radius:4px; font-weight:600; }
.fp-key.fp-edit, .fp-seg .fp-on.fp-edit { background:#16a34a; color:#fff; }
.fp-key.fp-view { background:#eab308; color:#1f2937; } .fp-key.fp-hidden { background:#475569; color:#fff; }
.ta .fp-scroll { overflow-x:auto; border:1px solid var(--line); border-radius:6px; background:#fff; }
.ta table.fp-grid { border-collapse:collapse; width:100%; font-size:.86rem; }
.ta table.fp-grid th, .ta table.fp-grid td { padding:.3rem .5rem; border-bottom:1px solid #eef0f3; text-align:center; vertical-align:middle; }
.ta table.fp-grid thead th { position:sticky; top:0; background:#f8fafc; font-weight:600; white-space:nowrap; }
.ta table.fp-grid thead th small { display:block; font-weight:400; color:#6b7280; font-size:.74rem; }
.ta table.fp-grid th[scope=row], .ta table.fp-grid th.fp-field { text-align:left; font-weight:500; white-space:nowrap; }
.ta table.fp-grid .fp-section th { background:#f1f5f9; text-transform:uppercase; letter-spacing:.04em; font-size:.74rem; color:#475569; text-align:left; }
.ta table.fp-grid .fp-bulk th, .ta table.fp-grid .fp-bulk td { background:#fafafa; }
.ta table.fp-grid small.fp-inputs { display:block; color:#6b7280; font-size:.72rem; font-weight:400; }
.ta table.fp-single { max-width:34rem; margin-bottom:1rem; border:1px solid var(--line); }
.fp-seg { display:inline-flex; border:1px solid #cbd2da; border-radius:5px; overflow:hidden; background:#fff; }
.fp-seg input { position:absolute; opacity:0; width:1px; height:1px; pointer-events:none; }
.fp-seg label, .fp-seg > span { padding:.16rem .45rem; font-size:.78rem; color:#6b7280; cursor:pointer; border-right:1px solid #eef0f3; user-select:none; }
.fp-seg label:last-of-type, .fp-seg > span:last-child { border-right:0; }
.fp-seg input:checked + label.fp-edit { background:#16a34a; color:#fff; font-weight:600; }
.fp-seg input:checked + label.fp-view { background:#eab308; color:#1f2937; font-weight:600; }
.fp-seg input:checked + label.fp-hidden { background:#475569; color:#fff; font-weight:600; }
.fp-seg input:focus-visible + label { outline:2px solid var(--brand); outline-offset:-2px; }
.fp-seg input:disabled + label { cursor:not-allowed; opacity:.55; }
.fp-seg.locked { opacity:.55; } .fp-seg.locked > span { cursor:default; }
.fp-seg.fp-dirty { box-shadow:0 0 0 2px #2563eb; }
.ta td.fp-locked { background:#fafafa; }
.ta .fp-help { display:grid; grid-template-columns:repeat(auto-fit, minmax(14rem, 1fr)); gap:.8rem; margin-top:1rem; }
.ta .fp-help h3 { margin:0 0 .3rem; font-size:.95rem; }

/* Enforcement on record pages / forms */
.fp-badge { display:inline-block; font-size:.72rem; font-weight:600; padding:.05rem .4rem; border-radius:4px; vertical-align:middle; }
.fp-badge.fp-view { background:#fef3c7; color:#92400e; border:1px solid #fcd34d; }
.fp-badge.fp-hidden { background:#e2e8f0; color:#334155; }
fieldset.fp-wrap { border:0; padding:0; margin:0; min-width:0; }
fieldset.fp-readonly input, fieldset.fp-readonly select, fieldset.fp-readonly textarea { background:#f8fafc; color:#475569; }
.fp-striped { background:repeating-linear-gradient(135deg, #f1f5f9 0 8px, #e2e8f0 8px 16px); color:#475569; font-size:.8rem; padding:.15rem .5rem; border-radius:4px; display:inline-block; }

/* Admin > Assignments (bulk reassign) and Assignment rules. */
.ta .asg-grid { display:grid; grid-template-columns:minmax(320px, 440px) 1fr; gap:1rem; align-items:start; }
.ta .asg-form label { display:block; margin:.3rem 0; }
.ta .asg-form fieldset { border:0; padding:0; margin:.8rem 0; }
.ta .asg-form legend { font-weight:700; margin-bottom:.3rem; }
.ta .asg-mode { display:block; border:1px solid var(--line); border-radius:6px; padding:.5rem .6rem; margin:.35rem 0; }
.ta .asg-mode select { display:block; margin-top:.35rem; max-width:100%; }
.ta .rr-pool { display:flex; flex-wrap:wrap; gap:.2rem .8rem; margin:.3rem 0 0 1.4rem; }
.ta .rr-pool label { display:inline-flex; gap:.3rem; align-items:center; margin:0; }
.ta .asg-form .actions { display:flex; gap:.5rem; justify-content:flex-end; }
.ta .rules-grid { display:grid; grid-template-columns:1fr 300px; gap:1rem; align-items:start; }
.ta .asg-rule h2 { display:flex; align-items:center; gap:.5rem; }
.ta .rule-n { display:inline-grid; place-items:center; width:1.6rem; height:1.6rem; border-radius:50%; background:var(--brand); color:#fff; font-size:.85rem; }
.ta .asg-rule .switch { margin-left:auto; font-size:.85rem; font-weight:400; }
.ta .rules-test label { display:block; margin:.4rem 0; }
.ta .rules-test select { max-width:100%; }
.ta #territories input[type=text] { width:100%; }
@media (max-width: 900px) { .ta .asg-grid, .ta .rules-grid { grid-template-columns:1fr; } }
.ta .asg-rule h2 { font-size:1.05rem; margin:0 0 .3rem; } .ta .asg-rule .hint { margin:.3rem 0 0; }
.ta .asg-rule .checks label { display:inline-flex; gap:.3rem; align-items:center; }

/* New permission group: Group name + Start from, inline field permissions */
.ta .f label.inline-check { display:flex; align-items:center; gap:.45rem; color:inherit; font-size:.88rem; }
.ta .f label.inline-check input { width:auto; }
.ta .start-from { padding-bottom:.7rem; margin-bottom:.7rem; border-bottom:1px solid var(--line); }
.ta .start-from .f label { font-weight:600; color:#1f2937; font-size:.88rem; }
.ta .start-from small { display:block; margin-top:.2rem; font-size:.78rem; }
.ta .new-fields { margin-top:.8rem; border-top:1px solid var(--line); padding-top:.6rem; }
.ta .new-fields summary { cursor:pointer; }
/* Settings > Upgrade to Team (wizard) */
.team-upgrade .steps a { color:inherit; }
.team-upgrade .upgrade-keep { background:#f0fdf4; border-left:4px solid #16a34a; padding:.5rem .8rem; border-radius:4px; font-size:.9rem; }
.team-upgrade .panel h2 { margin-top:0; font-size:1.15rem; }
.team-upgrade .f { max-width:28rem; margin-bottom:.8rem; }
.team-upgrade .role-ladder li { margin:.2rem 0; }
.team-upgrade .upgrade-review th { text-align:left; padding-right:1.2rem; color:var(--muted); font-weight:600; }
.team-upgrade .upgrade-review td { padding:.3rem 1rem .3rem 0; }
.team-upgrade .upgrade-billing { background:#f8fafc; border-left:4px solid var(--brand); padding:.5rem .8rem; border-radius:4px; font-size:.9rem; }
