@media(max-width:860px){
 body.notification-sheet-open{overflow:hidden!important}
 html body :is(#crmNotificationOverlay,#crmTeamDebts){
  position:fixed;inset:0;z-index:12000;display:flex;align-items:flex-end;justify-content:center;
  padding:12px 12px max(12px,env(safe-area-inset-bottom,0px));box-sizing:border-box;
  background:var(--veil,#0007)!important;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
 }
 html body :is(#crmNotificationOverlay .notification-panel,#crmTeamDebts .team-debts-sheet){
  position:relative!important;inset:auto!important;transform:none!important;margin:0!important;
  width:100%!important;max-width:560px!important;min-width:0!important;
  height:min(780px,calc(100dvh - max(72px,env(safe-area-inset-top,0px)) - max(12px,env(safe-area-inset-bottom,0px))))!important;
  max-height:calc(100dvh - max(72px,env(safe-area-inset-top,0px)) - max(12px,env(safe-area-inset-bottom,0px)))!important;
  box-sizing:border-box;display:flex!important;flex-direction:column;overflow:hidden!important;
  padding:0!important;border:0!important;border-radius:24px!important;background:var(--surface,var(--panel))!important;
  color:var(--text)!important;box-shadow:none!important;font-family:'Euclid Flex',sans-serif;
 }
 html body :is(#crmNotificationOverlay .notification-panel-head,#crmTeamDebts .team-debts-sheet header){
  flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:18px 18px 12px!important;margin:0!important;
 }
 html body :is(#crmNotificationOverlay .notification-panel-head b,#crmTeamDebts .team-debts-sheet h2){
  font-size:18px!important;line-height:1.3!important;font-weight:700;margin:0;
 }
 #crmNotificationOverlay .notification-panel-head>div{display:grid;gap:4px;min-width:0}
 #crmNotificationOverlay .notification-panel-head small{font-size:12px;line-height:1.4;color:var(--text-secondary,var(--muted))}
 html body :is(#crmNotificationOverlay #notificationClose,#crmTeamDebts .team-debts-sheet header>[data-td-close]){
  width:44px!important;height:44px!important;min-height:44px!important;flex:none;
  display:grid!important;place-items:center!important;padding:0!important;margin:0!important;
  border:0!important;border-radius:14px!important;background:var(--surface-2)!important;line-height:1!important;
 }
 #crmNotificationOverlay #notificationClose{font-size:18px!important}
 #crmNotificationOverlay .notification-tools{display:grid;grid-template-columns:1fr 1fr;gap:8px;flex:none;padding:0 18px 14px;margin:0}
 html body #crmNotificationOverlay .notification-tools button{width:100%;min-height:44px!important;margin:0!important;padding:10px!important;border:0!important;border-radius:14px!important;background:var(--surface-2)!important;font-size:12px!important;white-space:normal}
 #crmNotificationOverlay .notification-permission{flex:none;margin:0 18px 12px;max-height:25%;overflow:auto}
 html body #crmNotificationOverlay .notification-history{
  flex:1;min-height:0;overflow-y:auto!important;overflow-x:hidden;overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;display:flex!important;flex-direction:column!important;align-items:stretch;gap:10px;padding:0 18px 18px;
 }
 #crmNotificationOverlay .notification-entry{position:relative;flex:0 0 auto!important;min-width:0;border-radius:var(--crm-radii-inset);overflow:hidden;background:var(--surface-2)}
 html body #crmNotificationOverlay .notification-item{display:grid;gap:7px;box-sizing:border-box;width:100%;min-width:0;padding:16px 56px 16px 16px!important;margin:0;border:0!important;background:transparent!important;border-radius:16px;text-align:left;color:var(--text)}
 #crmNotificationOverlay .notification-title{display:flex;align-items:baseline;gap:6px;min-width:0}
 #crmNotificationOverlay .notification-title b{font-size:14px!important;line-height:1.4!important;font-weight:700;overflow-wrap:anywhere}
 #crmNotificationOverlay .notification-message{font-size:13px!important;line-height:1.5!important;color:var(--text-secondary);overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
 #crmNotificationOverlay .notification-item small{font-size:11px;line-height:1.4;color:var(--muted)}
 html body #crmNotificationOverlay .notification-delete{position:absolute;top:5px;right:5px;width:44px;height:44px;min-height:44px;padding:0;display:grid;place-items:center;border:0;border-radius:12px;background:transparent;color:var(--muted);font-size:15px}
 #crmNotificationOverlay .notification-empty{padding:20px 0;color:var(--muted)}
 html body #crmTeamDebts .team-debts-intro{flex:none;padding:0 18px 14px;margin:0!important;font-size:13px;line-height:1.5;color:var(--text-secondary)}
 html body #crmTeamDebts .team-debts-totals{flex:none;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:0 18px;margin:0}
 #crmTeamDebts .team-debts-totals>span{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;border-radius:12px;background:var(--surface-2);font-size:12px}
 #crmTeamDebts .team-debts-totals b{font-size:16px;line-height:1.2}
 html body #crmTeamDebts .team-debts-sheet nav{flex:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:14px 18px 10px;margin:0!important}
 html body #crmTeamDebts .team-debts-sheet nav button{min-width:0;min-height:44px!important;padding:8px 4px!important;font-size:12px;line-height:1.3;white-space:normal}
 #crmTeamDebts .team-debts-list{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:0 18px 18px}
 html body #crmTeamDebts .td-person>summary{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:10px;min-height:0;padding:15px 0}
 #crmTeamDebts .td-name{gap:5px;min-width:0}
 #crmTeamDebts .td-name b{font-size:14px;line-height:1.4;font-weight:600;overflow-wrap:anywhere}
 #crmTeamDebts .td-name small{font-size:12px;line-height:1.4}
 #crmTeamDebts .td-chip{align-self:start;margin-top:1px;padding:6px 8px;font-size:10px;line-height:1.4;white-space:nowrap;background:var(--surface-2)}
 #crmTeamDebts .td-task{padding:12px;margin-bottom:10px;background:var(--surface-2)}
 #crmTeamDebts .td-task>div{flex-wrap:wrap;gap:8px}
 html body #crmTeamDebts .td-task button{min-height:40px;padding:8px 12px}
}
@media(max-width:860px) and (max-height:520px){
 html body :is(#crmNotificationOverlay .notification-panel-head,#crmTeamDebts .team-debts-sheet header){padding-top:10px!important;padding-bottom:8px!important}
 html body #crmTeamDebts .team-debts-intro{display:none}
 html body #crmTeamDebts .team-debts-sheet nav{padding-top:8px;padding-bottom:8px}
}

@media (max-width: 860px) and (max-height: 480px) and (orientation: landscape) {
  html body #crmNotificationOverlay .notification-panel {
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }
  #crmNotificationOverlay #notificationPanel .notification-permission { max-height: none; overflow: visible; }
  html body #crmNotificationOverlay .notification-history {
    flex: none;
    overflow: visible !important;
  }
}
