#crmTeamDebts{position:fixed;inset:0;z-index:12000;display:flex;align-items:flex-end;justify-content:center;background:#0008;backdrop-filter:blur(8px);padding:12px;box-sizing:border-box;color:var(--text-primary,#eee)}
.team-debts-open{overflow:hidden!important}
.team-debts-sheet{width:100%;max-width:620px;max-height:calc(100dvh - env(safe-area-inset-top,0px) - 28px);overflow:auto;overscroll-behavior:contain;background:var(--bg-card,var(--ios-card,#303030));border-radius:24px;padding:16px 14px max(16px,env(safe-area-inset-bottom,0px));box-sizing:border-box;box-shadow:0 12px 60px #0004;font-size:14px;line-height:1.4}
.team-debts-sheet header{display:flex;align-items:center;justify-content:space-between;gap:12px}.team-debts-sheet h2{margin:0;font-size:18px}.team-debts-sheet button{font:inherit;cursor:pointer;border:0;color:inherit;background:var(--bg-hover,#7772);border-radius:12px;min-height:40px;padding:8px 12px}.team-debts-sheet header button{font-size:26px;width:40px;padding:0}.team-debts-intro{font-size:12px;color:var(--text-secondary,#999);margin:8px 0 12px}.team-debts-totals{display:flex;gap:8px;flex-wrap:wrap}.team-debts-totals>span{padding:7px 10px;background:#7771;border-radius:10px}.team-debts-sheet nav{display:flex;gap:6px;margin:12px 0}.team-debts-sheet nav button{flex:1;white-space:nowrap;font-size:12px;padding:6px}.team-debts-sheet nav [aria-pressed=true]{background:var(--accent,var(--ios-accent,#00b5df));color:var(--accent-ink,#fff);font-weight:600}.td-person{border-bottom:1px solid #8882;padding:0}.td-person>summary{display:flex;gap:8px;align-items:center;justify-content:space-between;min-height:64px;list-style:none;cursor:pointer}.td-person>summary::-webkit-details-marker{display:none}.td-name{min-width:0;display:flex;flex-direction:column;gap:2px}.td-name b{font-size:13px;overflow-wrap:anywhere}.td-name small,.td-task small{font-size:11px;color:var(--text-secondary,#999)}.td-chip{flex-shrink:0;font-size:10px;border-radius:8px;padding:5px 7px;background:#8882;font-weight:600}.td-late{color:var(--critical,#ef6262)}.td-today{color:var(--warning,#d99d21)}.td-clear{color:var(--text-secondary,#999)}.td-task{padding:10px;background:#8881;border-radius:12px;margin-bottom:8px;display:flex;flex-direction:column;gap:4px}.td-task>b{font-size:13px}.td-task>div{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px}.td-task button{font-size:11px;color:var(--accent,var(--ios-accent,#00b5df));flex-shrink:0}.td-empty{font-size:13px;color:var(--text-secondary,#999);padding:16px 0}.team-debts-sheet :focus-visible{outline:2px solid var(--accent,#00b5df);outline-offset:2px}
@media(min-width:861px){#crmTeamDebts{align-items:center}.team-debts-sheet{max-height:85dvh}}

/* Same compact sheet and controls as notifications. */
html body #crmTeamDebts .team-debts-sheet {padding:20px!important;border:0!important;border-radius:var(--crm-radii-modal,24px)!important;background:var(--surface,#303030)!important;color:var(--text,#eee)!important;font-family:'Euclid Flex',sans-serif;}
html body #crmTeamDebts .team-debts-intro {font-size:14px!important;line-height:1.45;margin:12px 0 16px!important;}
html body #crmTeamDebts .team-debts-sheet header {padding:0!important;}
html body #crmTeamDebts .team-debts-sheet button {border:0!important;box-shadow:none!important;background:var(--surface-2,#393939)!important;color:var(--text,#eee)!important;border-radius:12px!important;}
html body #crmTeamDebts .team-debts-sheet nav [aria-pressed=true] {background:var(--accent)!important;color:var(--accent-ink)!important;}
html body #crmTeamDebts .team-debts-sheet nav {padding:0!important;margin:16px 0!important;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;}
html body #crmTeamDebts .td-person {border:0!important;background:var(--surface-2,#393939);border-radius:16px!important;padding:12px!important;margin-bottom:10px;}
html body #crmTeamDebts .td-person>summary {min-height:44px!important;gap:10px;}
html body #crmTeamDebts .td-name b {font-size:14px!important;line-height:1.4;}
html body #crmTeamDebts .td-name small {font-size:12px!important;}
html body #crmTeamDebts .td-chip {white-space:nowrap;}
html body #crmTeamDebts .td-task {margin-top:12px;}
@media(min-width:861px){
 html body #crmTeamDebts {align-items:flex-start!important;justify-content:flex-end!important;padding:72px 20px 20px!important;background:transparent!important;backdrop-filter:none!important;}
 html body #crmTeamDebts .team-debts-sheet {width:440px!important;max-height:calc(100dvh - 92px)!important;box-shadow:0 12px 40px #0003!important;}
 html body #crmTeamDebts .team-debts-sheet button {min-height:34px!important;padding:7px 10px!important;font-size:13px!important;}
 html body #crmTeamDebts .team-debts-sheet header button {width:32px!important;height:32px!important;min-height:32px!important;padding:0!important;font-size:20px!important;}
}

@media(max-width:860px){
 html body #crmTeamDebts .team-debts-sheet nav {width:100%!important;box-sizing:border-box!important;margin:16px 0!important;flex:none;}
 html body #crmTeamDebts .team-debts-totals,html body #crmTeamDebts .team-debts-list {padding:0!important;}
 html body #crmTeamDebts .team-debts-sheet nav button {min-width:0!important;width:auto!important;}
 html body #crmTeamDebts .td-task {padding:12px!important;}
}
