/* Team workspace uses one bounded list; detail windows retain the shared sizing. */
body:has(.team-page),.shell:has(.team-page){height:100dvh;min-height:0;overflow:hidden}
.main:has(.team-page){height:100%;min-height:0;overflow:hidden}
#content:has(>.team-page){height:100%;min-height:0;padding-bottom:24px;overflow:hidden}
.team-page{display:flex;flex-direction:column;height:100%;min-height:0;gap:18px}
.team-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;flex:0 0 auto}
.team-stat{display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding:18px 20px;background:#fff;border:1px solid #dfe8e3;border-radius:14px;text-align:left;color:#315345;transition:background 160ms,transform 140ms,border-color 160ms}
.team-stat>span{font-size:13px;color:#6d8377}.team-stat>strong{font-size:29px;font-weight:600;line-height:1.25;font-variant-numeric:tabular-nums}.team-stat>small{font-size:12px;color:#83948b}
.team-stat:hover{background:#f7fbf9;border-color:#9ccdb7}.team-stat:active{transform:scale(.985)}
.team-panel{display:flex;flex:1 1 0;flex-direction:column;min-height:0;overflow:hidden}
.team-toolbar{flex:0 0 auto;gap:18px;padding:16px 20px}.team-toolbar h2{font-size:19px;white-space:nowrap}.team-toolbar .search{width:min(320px,30vw)}
.team-toolbar .toolbar-group{flex-wrap:wrap;justify-content:flex-end}
.team-tabs{display:flex;gap:6px;padding:0 20px;border-bottom:1px solid #e2eae5;flex:0 0 auto;background:#fafcfb}
.team-tabs button{padding:13px 16px;background:transparent;border-bottom:2px solid transparent;color:#718579;font-size:14px;transition:background 140ms,color 140ms}
.team-tabs button.is-active{color:#008967;background:#eaf6ef;border-color:#008967;border-radius:10px 10px 0 0}
.team-tabs button:hover{color:#007958;background:#f0f7f3}
.team-filters{display:flex;align-items:center;gap:10px;flex-wrap:wrap;flex:0 0 auto;padding:12px 20px;border-bottom:1px solid #e5ece7}
.team-filters select,.team-filters .cs-root{max-width:280px}.team-filters [role=combobox]{min-width:160px}
.team-scroll{flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.team-table,.team-work-table{width:100%;border-collapse:collapse;table-layout:fixed;color:#355346}
.team-table .column-filter-trigger,.team-work-table .column-filter-trigger{min-width:0;margin:0;padding:0;gap:6px}
.team-table .column-filter-trigger>span,.team-work-table .column-filter-trigger>span{min-width:0;overflow-wrap:anywhere}
.team-table .column-filter-trigger i,.team-work-table .column-filter-trigger i{flex:0 0 16px}
.team-table tr[hidden],.team-work-table tr[hidden]{display:none!important}
.team-table th,.team-work-table th{position:sticky;top:0;z-index:1;background:#f0f5f2;text-align:left;padding:13px 16px;font-size:12px;font-weight:500;color:#6a8073;border-bottom:1px solid #dfe8e2}
.team-table td,.team-work-table td{padding:18px 16px;font-size:13px;border-bottom:1px solid #e6ede8;text-align:left;vertical-align:top;overflow-wrap:anywhere}
.team-table th:first-child{width:32%}.team-table th:not(:first-child){width:13.6%}.team-table td:not(:first-child){vertical-align:middle}
.team-work-table th:first-child{width:35%}.team-work-table th:nth-child(2){width:14%}.team-work-table th:nth-child(3){width:18%}.team-work-table th:nth-child(4){width:15%}.team-work-table th:nth-child(5){width:18%}
.team-work-table td>strong{font-size:14px;font-weight:550;color:#284d3b}.team-work-table td small{display:block;margin-top:5px;font-size:12px;line-height:1.5;color:#7c9083}.team-work-table .badge{white-space:normal}
.team-table tr.row-open:hover,.team-work-table tr.row-open:hover{background:#f6faf8}
.team-person{display:flex;align-items:center;gap:12px;min-width:0}.team-person .avatar{width:44px;height:44px;background:#e9f5ef;color:#008967;font-size:14px;border-radius:13px}
.team-person>div{min-width:0}.team-person strong{display:block;font-size:15px;font-weight:550;overflow-wrap:anywhere;color:#284d3b}.team-person small{display:block;margin-top:3px;font-size:12px;color:#82948a}
.team-contract-count{display:block;margin:10px 0 0 56px;font-size:11px;color:#7c9184}
.team-count{font-size:18px;font-weight:550;font-variant-numeric:tabular-nums;color:#3a5a48}.team-count--danger,.team-urgent{color:#b34539!important}.team-count--warn{color:#a26c10}
.team-inline-note{display:flex;align-items:center;gap:10px;width:calc(100% - 32px);margin:12px 16px;padding:12px 14px;text-align:left;border:1px solid #eddfbf;border-radius:10px;background:#fffaf0;color:#806523;font-size:13px;line-height:1.5}
.team-list-count{padding:12px 16px;font-size:12px;color:#81958a}.team-muted-note{font-size:13px;color:#809185;padding:12px 0}
.team-detail-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.team-detail-header>div:last-child{display:flex;align-items:center;gap:12px}.team-detail-header .team-person>div{display:block}.team-detail-header h3{font-size:23px;line-height:1.4;overflow-wrap:anywhere;min-width:0}.team-detail-header .checklist-pencil{flex-shrink:0}
.team-contact{margin:12px 0 0;color:#7b8e82;font-size:13px;overflow-wrap:anywhere}
.team-detail-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:24px 0;background:#f3f8f5;border:1px solid #e1ebe4;border-radius:12px;padding:17px 20px}
.team-detail-stats>div{display:flex;flex-direction:column;gap:3px}.team-detail-stats strong{font-size:25px;color:#2e5841;font-variant-numeric:tabular-nums;font-weight:550}.team-detail-stats span{font-size:12px;color:#7c8f81}
.team-detail-controls{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.team-detail-controls h3{font-size:18px;flex:1}.team-detail-controls>.cs-root{max-width:260px}
.team-assignment-group{margin-bottom:25px}.team-assignment-group>h3{padding:12px 0;font-size:14px;color:#617c6b}.team-assignment-group>h3 span{font-size:12px;font-weight:400;margin-left:8px}
.team-assignment{display:flex;align-items:flex-start;justify-content:space-between;width:100%;gap:22px;padding:17px 18px;border:1px solid #e2ebe5;border-bottom:0;background:white;text-align:left;color:#315844;transition:background 140ms}
.team-assignment:first-of-type{border-radius:12px 12px 0 0}.team-assignment:last-child{border-bottom:1px solid #e2ebe5;border-radius:0 0 12px 12px}.team-assignment:only-of-type{border-radius:12px}.team-assignment:hover{background:#f6faf8}
.team-assignment>div:first-child{flex:1;min-width:0}.team-assignment strong{font-size:14px;font-weight:550;display:block;overflow-wrap:anywhere}.team-assignment small{display:block;margin-top:5px;color:#809386;font-size:12px}.team-assignment-meta{display:grid;grid-template-columns:135px 180px;gap:22px;font-size:13px;flex-shrink:0}.team-assignment-meta .badge{white-space:normal}
.task-summary{padding-bottom:24px;border-bottom:1px solid #e1ebe4}.task-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px 28px;margin:26px 0}.task-facts dt{color:#758a7d;font-size:12px}.task-facts dd{margin:7px 0 0;font-size:14px;overflow-wrap:anywhere}
.task-description{font-size:15px;line-height:1.7;color:#3e5a49;white-space:pre-wrap;overflow-wrap:anywhere;margin:22px 0}
.task-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}.task-actions .btn{font-size:13px}
.task-result{border:1px solid #d9eade;border-radius:12px;padding:16px 18px;margin:16px 0;background:#f3faf5;color:#365c44}.task-result--blocked{border-color:#ebddbd;background:#fffaf0;color:#826124}.task-result strong{font-size:13px}.task-result p{margin-top:7px;font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere}
.task-section{margin-top:28px}.task-section>h3{font-size:18px;margin-bottom:15px}.task-timeline{display:grid;gap:12px}.task-timeline article{padding:15px 17px;border:1px solid #e2ebe5;border-radius:11px;background:#fcfdfc}.task-timeline article>div{display:flex;justify-content:space-between;gap:15px}.task-timeline strong{font-size:13px;font-weight:550;color:#43644f}.task-timeline small{font-size:11px;color:#85968b;white-space:nowrap}.task-timeline p{font-size:13px;line-height:1.7;color:#536d5b;white-space:pre-wrap;overflow-wrap:anywhere;margin-top:7px}
.task-comment-form{display:grid;gap:12px;margin-top:18px}.task-comment-form>.btn{justify-self:start}.task-comment-form textarea{min-height:86px;resize:vertical}.team-task-form [hidden]{display:none!important}
.team-stat:focus-visible,.team-tabs button:focus-visible,.team-assignment:focus-visible,.team-inline-note:focus-visible{outline:2px solid #008967;outline-offset:2px}
@media(max-width:1100px){.team-toolbar{flex-wrap:wrap}.team-toolbar .toolbar-group{flex:1}.team-toolbar .search{width:250px}.team-table th:first-child{width:30%}.team-table th:not(:first-child){width:14%}.team-table td,.team-table th,.team-work-table td,.team-work-table th{padding:13px 11px}.team-assignment-meta{grid-template-columns:115px 140px;gap:12px}}
@media(max-width:800px){
 .shell:has(.team-page){display:flex;flex-direction:column}.main:has(.team-page){flex:1;min-height:0;height:auto}#content:has(>.team-page){padding:10px 12px calc(78px + env(safe-area-inset-bottom))}.team-page{gap:10px}
 .team-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.team-stat{padding:10px 12px;border-radius:10px;gap:2px}.team-stat>span{font-size:11px}.team-stat>strong{font-size:23px}.team-stat>small{display:none}
 .team-toolbar{padding:12px;gap:10px}.team-toolbar h2{font-size:18px}.team-toolbar .toolbar-group{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:8px}.team-toolbar .search{width:100%;grid-column:1/-1}.team-toolbar .btn{white-space:normal;font-size:12px;padding:7px}.team-tabs{padding:0 12px}.team-tabs button{padding:10px 13px;font-size:13px}.team-filters{padding:10px 12px;gap:8px}.team-filters>*{max-width:none!important;min-width:0;flex:1}.team-filters [role=combobox]{min-width:0;width:100%;font-size:12px}.team-filters select{width:100%}
 .team-table,.team-work-table,.team-table tbody,.team-work-table tbody{display:block}.team-table thead,.team-work-table thead{display:none}.team-table tr,.team-work-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;padding:16px;border-bottom:1px solid #e1eae4}.team-table td,.team-work-table td{display:block;padding:0;border:0;width:auto!important;font-size:13px;min-width:0}.team-table td:first-child,.team-work-table td:first-child{grid-column:1/-1}.team-table td:not(:first-child)::before,.team-work-table td:not(:first-child)::before{content:attr(data-label);display:block;color:#83968a;font-size:11px;margin-bottom:3px}.team-count{font-size:17px}.team-person strong{font-size:14px}.team-contract-count{margin-top:6px}.team-inline-note{width:calc(100% - 24px);margin:10px 12px;font-size:12px}
 .team-detail-header{gap:14px;flex-wrap:wrap}.team-detail-header h3{font-size:20px}.team-detail-header>div:last-child{gap:8px}.team-detail-stats{gap:12px 14px;grid-template-columns:repeat(2,minmax(0,1fr));padding:14px;margin:20px 0}.team-detail-stats strong{font-size:23px}.team-detail-controls{flex-wrap:wrap;gap:10px}.team-detail-controls h3{font-size:17px}
 .team-assignment{flex-direction:column;gap:13px;padding:15px}.team-assignment-meta{width:100%;grid-template-columns:1fr 1fr;gap:12px}.task-facts{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 20px}.task-timeline article{padding:12px}.task-timeline article>div{flex-wrap:wrap;gap:4px}.task-actions .btn{font-size:12px;min-height:40px}.task-description{font-size:14px}
}
@media(max-width:420px){.task-facts{grid-template-columns:minmax(0,1fr)}.team-toolbar .btn svg{width:16px}.team-person .avatar{width:38px;height:38px}.team-contract-count{margin-left:50px}.team-detail-header .btn{font-size:12px}}
@media(max-width:800px){.team-filters:has(#team-kind){display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.team-filters:has(#team-kind)>.cs-root:last-child{grid-column:1/-1}.team-filters .cs-trigger{min-height:42px}.team-detail-controls>.cs-root{width:100%;max-width:100%}}
@media(prefers-reduced-motion:reduce){.team-stat,.team-tabs button,.team-assignment{transition:none}.team-stat:active{transform:none}}
