/* Phone inbox: reserve space for reading while keeping primary touch controls. */
@media(max-width:620px){
 body.staff-app.staff-v4 .detail-header{min-height:52px;height:52px;padding:4px 10px;gap:6px}
 body.staff-app.staff-v4 .detail-title h2{font-size:14px;line-height:20px;margin:0}
 body.staff-app.staff-v4 .detail-title p{display:none}
 body.staff-app.staff-v4 .detail-actions{gap:2px}
 body.staff-app.staff-v4 .detail-actions [data-close-conversation]{min-height:44px;padding:8px 10px;font-size:12px;border-radius:10px;gap:6px}
 body.staff-app.staff-v4 .thread-tools{height:24px;min-height:24px;padding:0 14px;font-size:11px;border-bottom:0}
 body.staff-app.staff-v4 .thread-tools [data-toggle-bot]{display:inline-flex;align-items:center;gap:4px;min-height:24px;height:24px;padding:0 4px;border:0;background:transparent;font-size:11px;line-height:16px}
 body.staff-app.staff-v4 .thread-tools [data-toggle-bot] .icon{width:14px;height:14px}
 body.staff-app.staff-v4 .thread-tools .thread-channel{display:none}
 body.staff-app.staff-v4 .v4-attention-row{height:44px;min-height:44px;align-items:center;padding:0 10px 0 14px;gap:4px;background:var(--neom-surface)}
 body.staff-app.staff-v4 .v4-attention-row>div:first-child{flex-wrap:nowrap;align-items:center;gap:8px;overflow:hidden}
 body.staff-app.staff-v4 .v4-attention-row .v4-badge{font-size:12px;line-height:18px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
 body.staff-app.staff-v4 .v4-attention-row .v4-badge:not(.is-danger):not(.is-warning){padding:0;background:transparent;border:0;border-radius:0}
 body.staff-app.staff-v4 .v4-attention-row .v4-case-age{font-size:11px;line-height:18px;white-space:nowrap;flex-shrink:0;max-width:84px;overflow:hidden;text-overflow:ellipsis}
 body.staff-app.staff-v4 .v4-attention-actions{margin-left:auto;gap:2px;align-items:center;flex-wrap:nowrap}
 body.staff-app.staff-v4 .v4-attention-actions button{width:44px;height:44px;min-height:44px;padding:12px;border:0;background:transparent;box-shadow:none;border-radius:8px}
 body.staff-app.staff-v4 .v4-attention-actions button .icon{width:18px;height:18px}
 body.staff-app.staff-v4 .thread{padding:12px 14px}
 body.staff-app.staff-v4 .thread-message{max-width:96%;margin-bottom:14px;gap:0}
 body.staff-app.staff-v4 .thread-message>.avatar{display:none}
 body.staff-app.staff-v4 .message-author{font-size:12px;gap:5px;margin-bottom:5px}
 body.staff-app.staff-v4 .message-author strong{font-size:12px;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 body.staff-app.staff-v4 .message-author>span{font-size:10px;padding:1px 4px;font-weight:400}
 body.staff-app.staff-v4 .message-author time{font-size:10px}
 body.staff-app.staff-v4 .message-bubble{font-size:15px;line-height:1.5;padding:9px 12px;border-radius:13px}
 body.staff-app.staff-v4 .composer-wrap{padding:5px 8px max(7px,env(safe-area-inset-bottom));max-height:36%;overflow-y:auto}
 body.staff-app.staff-v4 .composer-heading{padding:0 10px;min-height:44px;gap:8px}
 body.staff-app.staff-v4 .composer-heading .composer-tabs{gap:18px}
 body.staff-app.staff-v4 .composer-heading .composer-tabs button{min-height:44px;padding:8px 0;font-size:12px;gap:6px;line-height:18px}
 body.staff-app.staff-v4 .composer-tabs .icon{width:17px;height:17px}
 body.staff-app.staff-v4 .composer textarea{height:50px;min-height:50px;max-height:100px;font-size:16px!important;line-height:1.45;padding:8px 10px}
 body.staff-app.staff-v4 .composer .composer-footer{display:flex;flex-wrap:nowrap;gap:4px;padding:3px 4px;min-height:50px}
 body.staff-app.staff-v4 .composer-tools{width:auto;flex:0 0 auto;flex-basis:auto;gap:0}
 body.staff-app.staff-v4 .composer-tools button,body.staff-app.staff-v4 .composer-tools .attachment-picker{width:44px;min-width:44px;height:44px;min-height:44px;padding:12px}
 body.staff-app.staff-v4 .composer-tools .icon,body.staff-app.staff-v4 .composer-tools .attachment-picker svg{width:18px;height:18px}
 body.staff-app.staff-v4 .send-actions{width:auto;min-width:0;flex:1 1 0;flex-basis:auto;gap:2px;justify-content:flex-end}
 body.staff-app.staff-v4 .send-actions select{width:0;min-width:0;max-width:none;flex:1 1 0;font-size:16px!important;height:44px;min-height:44px;padding-left:7px;padding-right:22px;border-radius:8px}
 body.staff-app.staff-v4 .send-actions button{width:44px;min-width:44px;height:44px;min-height:44px;padding:11px;flex:0 0 44px;border-radius:9px}
 body.staff-app.staff-v4 #send-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
 body.staff-app.staff-v4 .composer-note .send-actions{flex:1 1 0}
 body.staff-app.staff-v4 .composer-note .send-actions button{margin-left:auto}
}

/* Mobile navigation: one scrollable menu with compact, readable rows. */
@media(max-width:620px){
 body.staff-app.staff-v4 .sidebar{width:min(300px,85vw);padding:12px 14px max(14px,env(safe-area-inset-bottom));gap:8px;overflow-y:auto}
 body.staff-app.staff-v4 .sidebar>nav{flex:none;min-height:auto;overflow:visible}
 body.staff-app.staff-v4 .sidebar .brand-button{min-height:40px;padding:2px 4px;font-size:15px}
 body.staff-app.staff-v4 .sidebar .brand-button .icon,body.staff-app.staff-v4 .sidebar .nav-items .icon,body.staff-app.staff-v4 .sidebar-search .icon,body.staff-app.staff-v4 .sidebar-demo .icon{width:17px;height:17px}
 body.staff-app.staff-v4 .sidebar .tenant-block{padding:7px 10px}
 body.staff-app.staff-v4 .sidebar .tenant-block label{font-size:10px;margin-bottom:0}
 body.staff-app.staff-v4 .sidebar .tenant-block select{min-height:38px;padding-block:5px;font-size:16px!important}
 body.staff-app.staff-v4 .sidebar .sidebar-search{min-height:40px;padding:7px 10px}
 body.staff-app.staff-v4 .sidebar .nav-items{gap:2px}
 body.staff-app.staff-v4 .sidebar .nav-items button{min-height:40px;padding:7px 10px;font-size:13px;line-height:1.25;text-align:left}
 body.staff-app.staff-v4 .sidebar .nav-items .inbox-view{min-height:40px;font-size:12px}
 body.staff-app.staff-v4 .sidebar-bottom{margin-top:4px;padding-top:8px;gap:8px}
 body.staff-app.staff-v4 .appearance-sidebar{gap:4px}
 body.staff-app.staff-v4 .appearance-option{height:40px;min-height:40px;padding:9px}
 body.staff-app.staff-v4 .appearance-option .icon{width:17px;height:17px}
 body.staff-app.staff-v4 .profile{padding-top:8px}
}

/* Keep keyboard focus inside the workspace selector, clear of its label. */
@media(max-width:620px){
 body.staff-app.staff-v4 #tenant-switch:focus{outline:none}
 body.staff-app.staff-v4 #tenant-switch:focus-visible{outline:2px solid var(--neom-brand);outline-offset:-3px;border-radius:6px}
}
