/* Auveno mobile: compact, touch-friendly navigation; established case colors remain. */
@media(max-width:800px){
 .shell{background:#f5f7fb;color:#183453}
 .mobile-thread .topbar{display:none}
 .topbar{border-bottom:1px solid #e7edf4;background:#fff}
 .topbar h1{font-size:22px;letter-spacing:-.035em}
 .mobile-context{font-size:13px;border:0!important;border-radius:20px;padding:10px 14px}
 .mobile-bottom{border-top-color:#e7edf4;padding-top:5px;box-shadow:0 -5px 24px #19345306}
 .mobile-bottom>button{font-size:13px;gap:4px;border-radius:16px}
 .mobile-bottom>button.active{background:#edf3fa;color:#193f6b}
 .list-tools{background:#fff;padding:12px 16px;border-bottom:1px solid #e5ebf3}
 .list-tools>.row-head>strong{font-size:16px}
 .list-tools .row-head>button{min-height:44px;font-size:13px;border:0;background:#f3f6fa;border-radius:12px}
 .list-tools .search{border-radius:14px;border-color:#e1e8f0;background:#f5f7fa;padding:12px 14px;min-height:46px}
 .primary-filters{padding:4px;background:#eef2f7;border-radius:14px;gap:3px}
 .primary-filters .filter{min-height:42px;border:0;border-radius:11px;font-size:14px;background:transparent;color:#52677f;box-shadow:none}
 .primary-filters .filter.active{background:#fff;color:#173d65;box-shadow:0 2px 6px #18345312}
 .primary-filters .filter-count{background:#e4ebf5;color:#284d75}
 .list-options{font-size:14px;margin-top:10px;align-items:center}
 .list-options>label,.extra-filters>summary{min-height:44px;display:flex;align-items:center;gap:7px}
 .list-count{font-size:12px;color:#697b8e}
 .case-row{padding:16px;border-bottom:1px solid #e6ecf3;border-left-width:3px;box-shadow:none}
 .case-row.selected{box-shadow:inset 0 0 0 1px #8ca8cb}
 .case-row .row-head strong{font-size:16px;font-weight:650;letter-spacing:-.015em}
 .case-row p{font-size:15px;line-height:1.45;margin:6px 0 10px}
 .case-row time,.case-row small{font-size:12px}
 .case-row .badge{font-size:12px;padding:4px 7px;border-radius:7px}
 .case-row .mobile-draft{color:#805b1c;background:#fff2d5}
 .mobile-chat-head{position:relative;z-index:4;flex:0 0 auto;overflow:visible;max-height:none;padding:8px 16px 10px;background:#fff;border-bottom:1px solid #e4ebf3;box-shadow:0 3px 12px #17365604}
 .mobile-chat-toolbar{display:flex;align-items:center;gap:8px;min-width:0}
 .mobile-icon-button,.mobile-back.mobile-icon-button,.mobile-details-toggle.mobile-icon-button{display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;min-width:44px;min-height:44px;padding:10px;margin:0;border:0;background:transparent;color:#23496f;border-radius:50%;float:none;cursor:pointer}
 .mobile-icon-button svg{width:24px;height:24px;flex:none}
 .mobile-icon-button:active{background:#e8eff7}
 .mobile-icon-button:focus-visible,.mobile-case-menu>summary:focus-visible{outline:3px solid #729bc9;outline-offset:2px}
 .mobile-chat-identity{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}
 .mobile-chat-identity strong{font-size:16px;font-weight:650;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 .mobile-chat-identity span{font-size:12px;color:#687c90;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 .mobile-chat-head>h2{font-size:15px;font-weight:500;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:7px 0 8px}
 .mobile-chat-head>.mobile-duplicate-phone{display:none}
 .mobile-chat-head>.tags{gap:5px;margin:0;max-width:100%;flex-wrap:wrap}
 .mobile-chat-head>.tags .badge{font-size:12px;padding:4px 7px;border-radius:7px}
 .mobile-primary-action{display:flex;margin-top:10px}
 .mobile-primary-action button{flex:1;min-height:44px;border-radius:12px;font-size:14px}
 .mobile-case-menu{position:static;flex:0 0 44px}
 .mobile-case-menu>summary{list-style:none}.mobile-case-menu>summary::-webkit-details-marker{display:none}
 .mobile-action-panel{position:absolute;top:56px;right:12px;width:min(280px,calc(100% - 24px));max-height:50vh;overflow-y:auto;padding:8px;background:#fff;border:1px solid #dce5ef;border-radius:16px;box-shadow:0 12px 36px #18345328;z-index:10}
 .mobile-action-panel .live-actions{display:flex;flex-direction:column;margin:0;gap:4px}
 .mobile-action-panel .live-actions>*{flex:none;width:100%;min-height:46px;padding:11px 12px;font-size:14px;border:0;border-radius:10px;text-align:left;background:#f6f8fb;color:#254867}
 .mobile-message-stage{position:relative;display:flex;flex-direction:column;flex:1 1 0;min-height:0;min-width:0;overflow:hidden;background:#f4f7fb}
 .inbox>.thread>.mobile-message-stage>.messages{display:flex;flex-direction:column;flex:1 1 0;min-height:0;min-width:0;width:100%;max-width:100%;padding:18px 14px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;gap:16px}
 .messages .bubble{max-width:92%;font-size:16px;line-height:1.5;padding:12px 14px;background:#fff;border:1px solid #e3eaf3;border-radius:17px 17px 17px 5px;box-shadow:0 2px 4px #18345303}
 .messages .bubble.out{background:#e9f1fa;border-color:#dde8f5;border-radius:17px 17px 5px 17px}
 .messages .bubble.note{background:#fff7e6;border-color:#ead8ad}
 .messages .bubble small{display:block;font-size:12px;line-height:1.4;margin-bottom:6px;color:#62788f}
 .messages .event{font-size:12px;line-height:1.5;color:#6b7e90;text-align:center;margin:4px 12px}
 .mobile-latest{position:absolute;right:16px;bottom:12px;display:flex;align-items:center;gap:6px;min-height:44px;padding:9px 13px;border-radius:24px;background:white;border:1px solid #dce6f1;color:#24496d;box-shadow:0 4px 16px #19345316;font-size:13px;z-index:2}
 .mobile-latest[hidden]{display:none}.mobile-latest svg{height:19px;width:19px}
 .compose-area{padding:8px 14px calc(10px + env(safe-area-inset-bottom));border-top:1px solid #dfe7f1!important;background:white;box-shadow:0 -3px 12px #18345304}
 .compose-area.writing-note{background:#fffbf2;border-top:2px solid #d2ad63!important}
 .compose-status{font-size:12px;line-height:1.4;margin-bottom:4px;color:#60768e}
 .compose-tabs{gap:18px;margin-bottom:8px}
 .compose-tabs button{font-size:14px;min-height:40px;padding:8px 0}
 .compose-area textarea{border:1px solid #dce5ef;border-radius:16px;background:#f7f9fc;min-height:48px;font-size:16px;padding:12px;transition:border-color .15s}
 .compose-area textarea:focus{background:#fff;border-color:#7e9fc5;outline:2px solid #dce9f8;outline-offset:0}
 .compose-area .footer-actions button,.compose-area .composer-bottom button{min-height:44px;font-size:14px;border-radius:12px;padding:10px 18px}
 .compose-area .footer-actions>small,.compose-area .composer-bottom>small{font-size:12px;line-height:1.35}
 .composer-focused .thread-head.mobile-chat-head{padding:4px 12px;min-height:52px}
 .composer-focused .mobile-chat-head>.mobile-primary-action{display:none}
 .composer-focused .mobile-message-stage>.messages{padding-top:12px;padding-bottom:12px}
 .composer-focused .compose-tabs button{min-height:36px;padding:6px 0}
 .composer-focused .compose-area{padding:6px 12px 8px}
 .mobile-more{padding:20px 16px;background:#f5f7fb}
 .mobile-more>.row-head{margin-bottom:16px}.mobile-more h2{letter-spacing:-.03em;font-size:26px}
 .mobile-more section{border-radius:18px;border-color:#e3eaf2;padding:8px;box-shadow:0 3px 10px #18345303}
 .mobile-more section button{min-height:54px;border-radius:12px;font-size:16px}.mobile-more section button:active{background:#edf3fa}
 .mobile-more h3{font-size:12px;letter-spacing:.06em}
 .mobile-more .workspace-switch{padding:16px;border-radius:18px;background:#203e63}
 .mobile-more .workspace-switch-fields select{min-height:46px;border-radius:12px}
 .inbox>.thread.swipe-dragging{transform:translateX(var(--swipe-x,0));transition:none;box-shadow:-8px 0 24px #18345316}
 .inbox>.thread.swipe-returning{transform:translateX(var(--swipe-x,0));transition:transform .18s ease-out}
}
@media(max-width:360px){.mobile-chat-head{padding-left:10px;padding-right:10px}.mobile-chat-toolbar{gap:4px}.mobile-chat-identity strong{font-size:15px}}
@media(prefers-reduced-motion:reduce){.inbox>.thread.swipe-dragging,.inbox>.thread.swipe-returning{transform:none!important;transition:none!important}}

/* Design 1C: white list with one shared takeover/priority pill. */
.list{background:#fff}
.list .case-row,.list .case-row.case-ai,.list .case-row.case-resolved,.list .case-row.case-urgent,.list .case-row.case-normal,.list .case-row.case-human{
 width:100%;margin:0;padding:18px 20px;background:#fff;border:0;border-bottom:1px solid #dfe4e9;border-radius:0;box-shadow:none;text-align:left;transition:background-color .12s;
}
.list .case-row.selected{background:#f6f8fa;box-shadow:inset 0 0 0 1px #b4c0cd;border-color:#dfe4e9}
.list .case-row:focus-visible{outline:2px solid #536f8c;outline-offset:-3px}
.list .case-row .row-head{flex-wrap:wrap;column-gap:10px;row-gap:4px;align-items:baseline}
.list .case-row .case-contact-heading{flex:1 1 205px;min-width:0;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;font-size:15px;line-height:1.45;font-weight:650;letter-spacing:0;color:#20364f}
.list .case-row time{margin-left:auto;font-size:12px;color:#6d7886;font-weight:400}
.list .case-row p{font-size:16px;color:#53606f;line-height:1.45;margin:6px 0 11px}
.list .case-row .tags{gap:7px;flex-wrap:wrap;align-items:center}
.list .case-row .badge{display:inline-flex;align-items:center;gap:6px;max-width:100%;border-radius:6px;background:transparent;color:#5b6572;font-size:14px;font-weight:500;padding:3px 7px;border:1px solid transparent;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
.list .case-row .case-handoff{display:inline-flex;flex-wrap:wrap;gap:4px 0;background:#f5ead9;color:#77512e;border:1px solid #d4b48a;border-radius:16px;padding:4px 7px;font-weight:600}
.list .case-row .handoff-label{min-width:0;overflow-wrap:anywhere}
.list .case-row .handoff-priority{display:inline-flex;align-items:center;gap:6px;margin-left:6px;padding-left:6px;border-left:1px solid #b48c5e;line-height:1.25;white-space:nowrap}
.list .case-row .handoff-priority.priority-urgent{color:#8b4c58}
.list .case-row .handoff-priority.priority-emergency{color:#783b47;font-weight:700}
.list .case-row .priority-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:currentColor;flex:0 0 7px}
.list .case-row .case-priority.priority-normal{background:#fff;color:#805f3c;border-color:#b39a78;font-weight:600}
.list .case-row .case-priority.priority-urgent{background:#f6eff0;color:#875258;border-color:#c8afb3;font-weight:600}
.list .case-row .case-priority.priority-emergency{background:#f3e7e9;color:#763b43;border-color:#b88a92;font-weight:650}
.list .case-row .case-priority.priority-unknown{background:#fff;border-color:#c4b198;color:#805f3c}
.list .case-row .assignee{background:#f1f4f6;color:#536f83;border-color:transparent;border-radius:999px;padding:4px 10px;font-weight:600}
.list .case-row .assignee svg{flex:0 0 18px}
.list .case-row .needs-response{background:#fff;border-color:#b4c0cd;color:#536779}
.list .case-row .status-ai,.list .case-row .status-waiting,.list .case-row .status-paused{padding-left:0;padding-right:0}
.list .case-row>small{display:block;margin-top:8px;font-size:12px;color:#75818d}
.list .case-row .mobile-draft{background:#f4eee5;color:#805f3c}
.list .primary-filters{display:flex;padding:0;gap:0;background:#fff;border-radius:0;border-bottom:1px solid #dfe4e9}
.list .primary-filters .filter{flex:1;min-width:0;min-height:46px;padding:10px 3px;border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent;color:#637082;font-size:14px;box-shadow:none}
.list .primary-filters .filter.active{border-bottom-color:#233f60;background:transparent;color:#233f60;font-weight:650;box-shadow:none}
.list .primary-filters .filter-count{padding:0 2px;background:transparent;color:inherit;border-radius:0;font-size:inherit}
.list .list-tools .search{background:#fff;border-color:#d7dfe7;border-radius:9px}
.messages .bubble.note{background:#fffcf5;border:1px solid #e9e1d2;border-left:3px solid #b59b70;border-radius:12px;box-shadow:none}
.messages .bubble.note small{color:#8a734f}
.compose-area.writing-note{background:#fdfbf7;border-top:1px solid #ddcfb7!important;box-shadow:none}
.compose-area.writing-note .compose-tabs button[aria-selected=true]{color:#8a6f40;border-bottom-color:#b79b6b}
@media(hover:hover){.list .case-row:hover{background:#f7f9fb}}
@media(max-width:800px){
 .mobile-primary-action{gap:8px;flex-wrap:wrap}
 .mobile-primary-action>button,.mobile-primary-action>select{flex:1 1 145px;min-width:0;max-width:100%;min-height:44px;border-radius:11px;font-size:14px}
 .mobile-primary-action>select{padding:10px 12px;background:#f2f5f9;border-color:#dbe4ee;color:#2b4868;font-weight:600}
 .mobile-action-panel .mobile-call{display:flex;flex-direction:column;gap:3px;text-decoration:none}
 .mobile-call small{font-size:12px;color:#718197;font-weight:400;overflow-wrap:anywhere}
 .mobile-call:focus-visible{outline:3px solid #729bc9;outline-offset:1px}
 .mobile-chat-head>.tags .badge{background:#f0f3f7;color:#597086;border-radius:6px;font-weight:550}
 .mobile-chat-head>.tags .badge.amber{background:#f6f0e6;color:#8d744b}
 .list .case-row .case-contact-heading{font-size:15px}
 .list .case-row{padding:17px 16px;margin:0}
 .list .case-row .tags{row-gap:5px}
}

/* Compact three-line case list. Desktop text matches the 13px transcript. */
.list .case-row,.list .case-row.case-ai,.list .case-row.case-resolved,.list .case-row.case-urgent,.list .case-row.case-normal,.list .case-row.case-human{padding:10px 14px;font-size:13px;line-height:1.35}
.list .case-row .row-head{flex-wrap:nowrap;gap:8px;margin:0;min-width:0;line-height:1.35}
.list .case-row .case-contact-heading{flex:1 1 auto;min-width:0;font-size:13px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.list .case-row time{flex:0 0 auto;white-space:nowrap;font-size:12px;line-height:1.35}
.list .case-row p.case-reason{display:block;-webkit-line-clamp:unset;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px;line-height:1.35;margin:3px 0 5px;min-height:1.35em}
.list .case-row .tags{flex-wrap:nowrap;gap:5px;min-width:0;max-width:100%;min-height:24px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
.list .case-row .tags::-webkit-scrollbar{display:none}
.list .case-row .badge{flex:0 0 auto;font-size:13px;line-height:1.3;padding:2px 6px;white-space:nowrap}
.list .case-row .case-handoff{flex-wrap:nowrap;border-radius:14px;gap:0;padding:2px 7px}
.list .case-row .handoff-priority{gap:5px;margin-left:6px;padding-left:6px}
.list .case-row .assignee{flex:0 1 auto;min-width:48px;max-width:50%;padding:2px 7px}
.list .case-row .assignee>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.list .case-row .assignee svg{width:16px;height:16px;flex-basis:16px}
.list .case-row .priority-dot{width:6px;height:6px;flex-basis:6px}
@media(max-width:800px){
 .list .case-row .case-contact-heading,.list .case-row p.case-reason{font-size:14px}
 .list .case-row .badge{font-size:13px}
}

/* Compact search disclosure and mobile brand masthead. */
.mobile-brand{display:none}
.list-tools .primary-filters{border-top:1px solid #dce3e9;padding-top:6px;margin-top:10px}
.list-options{position:relative;padding-right:40px}
.inbox-search-toggle{position:absolute;right:0;top:0;width:36px;height:36px;display:grid;place-items:center;padding:7px;border:0;background:transparent}
.inbox-search-toggle svg{width:21px;height:21px}
.inbox-search-toggle.has-search{background:#edf2f7;color:#193365}
#inboxSearchPanel:not([hidden]){margin:10px 0 0}
@media(max-width:800px){
 .shell:not(.mobile-thread) .topbar{background:#193365;color:white;border-bottom-color:#193365}
 .shell:not(.mobile-thread) .topbar>div:not(.mobile-brand){display:none}
 .shell:not(.mobile-thread) .topbar>.mobile-brand{display:block;padding:0;font-size:28px;line-height:1;letter-spacing:-1.2px;color:white}
 .shell:not(.mobile-thread) .topbar .mobile-context{background:#ffffff12;color:white;border:1px solid #ffffff28}
 .list-tools .primary-filters{margin-top:10px}
 .list-options{gap:10px;padding-right:42px}
 .list-options label,.list-options summary{font-size:13px}
}

.list .case-row p.case-reason{display:flex;gap:0;min-width:0}
.case-reason .case-category{flex:0 1 auto;max-width:55%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.case-reason .case-category:only-child{max-width:100%}
.case-reason .case-summary{flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:pre}

/* Desktop keeps the permanent search field; mobile uses a focused search view. */
.list-tools{display:flex;flex-direction:column}
.list-tools>.row-head{order:0}
.list-tools>#inboxSearchPanel{order:1}
.list-tools>.primary-filters{order:2}
.list-tools>.list-options{order:3}
.list-tools>.list-count{order:4}
#closeInboxSearch{display:none}
@media(min-width:801px){
 #toggleInboxSearch{display:none}
 .list-options{padding-right:0}
 #inboxSearchPanel{display:block!important;margin:8px 0 0}
}
@media(max-width:800px){
 .shell.mobile-search>.main{padding-bottom:0}
 .shell.mobile-search .topbar,.shell.mobile-search .banner,.shell.mobile-search .mobile-bottom{display:none!important}
 .shell.mobile-search .list-tools{position:sticky;top:0;z-index:4;background:white;padding:8px 10px;border-bottom:1px solid #dce3e9}
 .shell.mobile-search .list-tools>.row-head,.shell.mobile-search .primary-filters,.shell.mobile-search .list-options,.shell.mobile-search .list-count,.shell.mobile-search .layout-reset{display:none!important}
 .shell.mobile-search #inboxSearchPanel{display:flex;gap:6px;align-items:center;margin:0}
 .shell.mobile-search #closeInboxSearch{display:grid;place-items:center;flex:0 0 40px;height:44px;padding:7px;border:0;background:transparent}
 #closeInboxSearch svg{width:24px;height:24px}
 .shell.mobile-search #search{flex:1;min-width:0;margin:0;font-size:16px;height:44px}
 .shell.mobile-search .inbox>.list{padding-bottom:0;overflow-x:hidden}
 .shell:not(.mobile-search) #inboxSearchPanel{display:none}
}
