/* 04.8.2 – compact sizing and the avatar-based profile editor */
@media(min-width:1001px){
 .workspace.focused-shell>.inbox-nav{width:160px;min-width:160px;flex:0 0 160px}
 .workspace.focused-shell.nav-collapsed>.inbox-nav{display:none}
 .workspace.focused-shell .professional-grid{grid-template-columns:236px minmax(0,1fr) 38px}
 .workspace.focused-shell .nav-scroller{padding-inline:8px}
 .workspace.focused-shell .inbox-nav-head{padding-inline:12px}
 .workspace.focused-shell .inbox-nav-item{padding:8px;gap:7px}
 .workspace.focused-shell .inbox-nav-item strong{font-size:11px}
 .workspace.focused-shell .team-inbox-item{padding:7px 5px;gap:5px;font-size:9px}
 .workspace.focused-shell .team-inbox-item>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
 .workspace.focused-shell .team-mark{height:23px;width:23px;min-width:23px;font-size:8px}
 .workspace.focused-shell .lifecycle-nav-item{padding:7px;font-size:11px}
 .workspace.focused-shell .nav-workspace-footer{font-size:8px;padding-inline:10px;gap:4px}
}
@media(min-width:721px) and (max-width:1000px){.workspace.focused-shell .professional-grid{grid-template-columns:228px minmax(0,1fr) 36px}}
.workspace.focused-shell .professional-card{padding:11px 8px;gap:7px;min-height:86px}
.workspace.focused-shell .professional-card .contact-avatar>.avatar{width:28px;height:28px;font-size:10px}
.workspace.focused-shell .professional-card .contact-avatar>.platform-icon.tiny{width:10px;height:10px;min-width:10px;max-width:10px;border:1px solid var(--ui-surface);padding:0;bottom:-1px;right:-1px}
.workspace.focused-shell .professional-card .contact-avatar>.platform-icon.tiny .platform-svg{width:6px;height:6px}
.workspace.focused-shell .composer-channel-select{max-width:140px;gap:4px;padding:0 2px}
.workspace.focused-shell .composer-channel-select .platform-icon.tiny{width:11px;height:11px;min-width:11px;max-width:11px;padding:0}
.workspace.focused-shell .composer-channel-select .platform-icon.tiny .platform-svg{width:7px;height:7px}
.workspace.focused-shell .composer-channel-select select{font-size:10px;max-width:123px;min-height:24px;padding:2px 15px 2px 2px}
.workspace.focused-shell .thread-person .contact-avatar>.platform-icon.tiny,.workspace.focused-shell .message-avatar>.platform-icon.tiny{height:10px;width:10px;min-width:10px;padding:0}
.workspace.focused-shell .thread-person .platform-icon.tiny .platform-svg,.workspace.focused-shell .message-avatar>.platform-icon.tiny .platform-svg{height:6px;width:6px}
.workspace.focused-shell .professional-controls{padding-inline:11px;gap:4px}
.workspace.focused-shell .professional-controls select{font-size:11px;padding-right:15px;min-width:0;max-width:130px}
.workspace.focused-shell .unread-toggle{font-size:10px;gap:4px}
.workspace.focused-shell .list-channel-filter{padding-inline:12px;gap:4px}
.workspace.focused-shell .activity-connection{font-size:8px;white-space:nowrap}
.workspace.focused-shell .card-title{gap:4px}.workspace.focused-shell .card-title strong{font-size:11px}
.workspace.focused-shell .card-title time{font-size:8px}.workspace.focused-shell .card-preview{font-size:10px}
.workspace.focused-shell .conversation-list{padding-inline:8px}
.workspace.focused-shell .card-side{right:8px;gap:5px}
.profile-global-panel{width:388px;max-width:100vw}.profile-global-panel .global-panel-body{padding:18px 22px}
.profile-sheet{color:var(--ui-ink)}.profile-photo-area{position:relative;width:120px;height:120px;margin:18px auto 0}
.profile-avatar-trigger{display:block;position:relative;width:120px;height:120px;padding:0!important;border:0!important;border-radius:50%;background:var(--ui-accent-soft)!important;box-shadow:0 0 0 1px var(--ui-line);color:var(--ui-accent)!important}
.profile-avatar-trigger>img{display:block;width:120px;height:120px;object-fit:cover;border-radius:50%}
.profile-initials{font-weight:600;font-size:35px;display:grid;place-items:center;height:100%;letter-spacing:-1px}
.profile-camera-badge{display:grid;place-items:center;position:absolute;right:1px;bottom:0;width:35px;height:35px;background:var(--ui-accent);color:var(--ui-on-accent);border:3px solid var(--ui-surface);border-radius:50%}
.profile-camera-badge .ui-icon{width:17px;height:17px}
.profile-avatar-trigger:hover{box-shadow:0 0 0 3px var(--ui-accent-soft)}
.profile-photo-menu{position:absolute;z-index:15;top:102px;left:50%;transform:translateX(-50%);min-width:176px;padding:5px;background:var(--ui-surface);border:1px solid var(--ui-line);border-radius:12px;box-shadow:var(--ui-shadow)}
.profile-photo-menu>button{display:flex;align-items:center;gap:12px;width:100%;white-space:nowrap;background:transparent;border:0;border-radius:7px;font-size:12px;padding:11px 12px;text-align:left;color:var(--ui-ink)}
.profile-photo-menu .ui-icon{height:17px;width:17px;flex:none}.profile-photo-menu>button:hover{background:var(--ui-hover)}.photo-menu-divider{height:1px;background:var(--ui-line);margin:4px 5px}.profile-photo-menu>button.photo-remove{color:var(--ui-danger)}
.profile-sheet-identity{text-align:center;margin:17px 0 22px}.profile-sheet-identity h3{font-size:17px;letter-spacing:0;margin:0 0 5px;font-weight:600}.profile-sheet-identity>span{font-size:11px;color:var(--ui-muted)}
.profile-sheet-fields{margin-top:25px;border-top:1px solid var(--ui-line)}.profile-sheet-fields>div{display:flex;align-items:center;gap:14px;padding:17px 5px;border-bottom:1px solid var(--ui-line)}
.profile-sheet-fields .ui-icon{width:19px;height:19px;color:var(--ui-muted);flex:none}.profile-sheet-fields small{display:block;font-size:10px;color:var(--ui-muted);margin-bottom:5px}.profile-sheet-fields strong{display:block;font-size:12px;font-weight:500;overflow-wrap:anywhere}
.profile-sheet-foot{font-size:10px;color:var(--ui-muted);text-align:center;margin-top:25px}
.photo-stage-heading{display:flex;align-items:center;gap:8px;margin:0 0 22px}.photo-stage-heading h3{font-size:15px;font-weight:600;margin:0}.photo-stage{border-radius:14px;overflow:hidden;background:var(--ui-soft);aspect-ratio:1;display:grid;place-items:center;position:relative;border:1px solid var(--ui-line)}
.photo-stage>img,.photo-stage>video{display:block;width:100%;height:100%;object-fit:cover}.photo-placeholder{font-size:54px;color:var(--ui-muted)}
.camera-stage>video{transform:scaleX(-1)}.camera-wait{position:absolute;padding:15px;font-size:12px;text-align:center;color:var(--ui-muted)}
.photo-stage-actions{display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap;margin-top:19px}.photo-stage-actions>button{font-size:12px;border:1px solid var(--ui-line);padding:9px 15px;border-radius:8px;display:flex;align-items:center;gap:7px}.photo-stage-actions .ui-icon{height:16px;width:16px}
.photo-stage-actions>button.photo-primary{background:var(--ui-accent);border-color:var(--ui-accent);color:var(--ui-on-accent)}.photo-stage-actions>button.photo-danger{color:var(--ui-danger);border-color:var(--ui-danger)}
.photo-stage-help{font-size:11px;color:var(--ui-muted);line-height:1.6;margin:15px 0}.photo-feedback{border:1px solid var(--ui-danger);background:var(--ui-danger-bg);color:var(--ui-danger);padding:10px 12px;border-radius:8px;font-size:11px;line-height:1.55;margin:15px 0}
@media(max-width:720px){.profile-global-panel{width:100vw}.workspace.focused-shell .professional-card{padding:13px 10px}.workspace.focused-shell .card-title strong{font-size:13px}.workspace.focused-shell .card-title time{font-size:9px}.workspace.focused-shell .card-preview{font-size:12px}.workspace.focused-shell .professional-card .contact-avatar>.avatar{width:32px;height:32px}.workspace.focused-shell .professional-controls select{font-size:12px;max-width:165px}}

/* 04.10.0 — reserve real grid space for unread counts and agent photos.
   The wrappers stay in the DOM; display:contents places their children in the
   same three-row grid. No absolutely-positioned badge can cover preview text.
   All grid overrides are scoped to customer list cards, not sidebar totals. */
.workspace.focused-shell .professional-card {
 display:grid;
 grid-template-columns:auto minmax(0,1fr) max-content;
 grid-template-rows:auto auto auto;
 grid-template-areas:"avatar title time" "avatar preview unread" "avatar tags agent";
 column-gap:7px;
 row-gap:4px;
 align-items:center;
 align-content:start;
}
.workspace.focused-shell .professional-card>.contact-avatar {
 grid-area:avatar;
 align-self:start;
}
.workspace.focused-shell .professional-card>.card-main,
.workspace.focused-shell .professional-card>.card-side {
 display:contents;
 position:static;
}
.workspace.focused-shell .professional-card .card-title {
 grid-area:title;
 min-width:0;
 margin:0;
 padding:0;
}
.workspace.focused-shell .professional-card .card-time {
 grid-area:time;
 justify-self:end;
 white-space:nowrap;
 color:var(--ui-muted);
 font-size:8px;
 line-height:1.4;
}
.workspace.focused-shell .professional-card .card-preview {
 grid-area:preview;
 min-width:0;
 margin:0;
 padding:0;
 overflow:hidden;
}
.workspace.focused-shell .professional-card .card-preview>span {
 flex:1 1 auto;
 min-width:0;
 white-space:nowrap;
 overflow:hidden;
 text-overflow:ellipsis;
}
.workspace.focused-shell .professional-card .card-preview>.ui-icon {
 flex:0 0 13px;
}
.workspace.focused-shell .professional-card .card-tags {
 grid-area:tags;
 min-width:0;
 margin:0;
 padding:0;
}
.workspace.focused-shell .professional-card .card-side>.client-unread {
 grid-area:unread;
 justify-self:end;
 align-self:center;
 position:static;
 margin:0;
 flex:none;
 white-space:nowrap;
}
.workspace.focused-shell .professional-card .card-side>.staff-avatar {
 grid-area:agent;
 justify-self:end;
 align-self:start;
 margin:0;
}
@media(max-width:720px) {
 .workspace.focused-shell .professional-card .card-time {font-size:9px;}
}

/* 04.10.0: discreet rail/bell badges, preserving legibility and the full button hit area. */
.professional-shell .app-rail .count-badge.rail-count{height:13px;min-width:13px;padding:0 3px;border:1px solid var(--ui-rail);border-radius:8px;font-size:8px;line-height:1;font-weight:600;top:1px;right:1px;box-sizing:border-box}
.professional-shell .notification-bell .count-badge.rail-count{top:2px;right:0}
.ig-shared-card{min-width:220px;max-width:100%;border-radius:10px;overflow:hidden;background:var(--ui-soft);color:var(--ui-ink)}
.ig-shared-heading{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:600;margin-bottom:8px}.ig-shared-heading .ui-icon{width:15px;height:15px}
.ig-shared-card p{font-size:12px;margin:7px 0;line-height:1.5}.ig-shared-card small{display:block;font-size:10px;color:var(--ui-muted);line-height:1.5}
.ig-shared-controls{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-top:8px}.ig-shared-controls button,.ig-shared-controls a{font-size:11px;color:var(--ui-accent);border:0;background:none;padding:4px 0;text-decoration:none;cursor:pointer}
.ig-shared-controls button:disabled{opacity:.5;cursor:wait}.ig-shared-frame{display:block;border:0;border-radius:9px;width:340px;max-width:100%;height:540px;background:#fff}
.ig-shared-poster{display:block;max-width:100%;max-height:320px;object-fit:contain;border-radius:8px}.message.has-media:has(.ig-shared-card){max-width:min(420px,90%)}
@media(max-width:720px){.ig-shared-frame{width:300px;height:500px}.message.has-media:has(.ig-shared-card){max-width:94%}.ig-shared-card{min-width:0}}
