/* Inbox design only. No global CRM layout or form overrides. */
#inboxPage{--desk-ink:#11243b;--desk-muted:#64758c;--desk-border:#e5ebf2;--desk-blue:#265cde;--desk-soft:#f5f8fc;background:linear-gradient(155deg,#f7faff 0%,#edf3fb 100%);border:1px solid #e2eaf5;border-radius:28px;padding:clamp(18px,2.5vw,34px);position:relative;isolation:isolate}
#inboxPage .section-head{display:grid;grid-template-columns:minmax(260px,1fr) auto;align-items:center;gap:18px;padding:4px 4px 26px}
#inboxPage .section-head h3{font-size:clamp(29px,2.7vw,42px);letter-spacing:-.05em;color:var(--desk-ink);margin:6px 0 7px}
#inboxPage .section-head p{max-width:600px;color:var(--desk-muted);font-size:14px;line-height:1.55}
#inboxPage .section-head>button,#inboxPage .section-head>div+button{white-space:nowrap}
#inboxPage #agentPhoneShortcut{background:#112b49;color:#fff;border:1px solid #112b49;border-radius:15px;padding:12px 17px;box-shadow:0 12px 25px #12365a24;text-decoration:none;cursor:pointer}
#inboxPage #agentPhoneShortcut:hover{background:#1b436d}
#inboxPage .inbox-shell{border:1px solid #dce6f1;border-radius:24px;box-shadow:0 24px 55px #19355012;min-height:610px;background:#fff;overflow:hidden}
#inboxPage .inbox-list{background:#fff;border-right:1px solid var(--desk-border)}
#inboxPage .inbox-list-head{background:#fff;border-bottom:1px solid var(--desk-border);padding:20px}
#inboxPage #inboxSearch{background:#f5f8fc;border:1px solid #dde6f0;border-radius:14px;min-height:44px;font-size:13px}
#inboxPage .inbox-filters{gap:6px;flex-wrap:wrap;margin-top:14px}
#inboxPage .inbox-filters button{border-radius:999px;background:#f4f7fb;border:1px solid #e1e8f1;color:#586b82;padding:8px 11px;font-size:11px}
#inboxPage .inbox-filters button.active{background:#183b69;border-color:#183b69;color:#fff;box-shadow:0 7px 17px #17345b2b}
#inboxPage .inbox-conversation{border-bottom:1px solid #edf1f6;padding:15px 16px;transition:background .15s,box-shadow .15s}
#inboxPage .inbox-conversation:hover{background:#f5f9ff}
#inboxPage .inbox-conversation.selected{background:#eaf2ff;box-shadow:inset 4px 0 #3269e6}
#inboxPage .inbox-avatar{background:linear-gradient(145deg,#244a8c,#4b8be8);color:#fff;border-radius:15px;box-shadow:0 8px 18px #315ab83b}
#inboxPage .inbox-preview b{font-size:14px;color:var(--desk-ink)}
#inboxPage .inbox-preview em{color:var(--desk-muted);line-height:1.4}
#inboxPage .inbox-thread{background:#f7faff}
#inboxPage .inbox-thread-head{background:#fff;border-bottom:1px solid var(--desk-border);padding:18px 22px}
#inboxPage .inbox-thread-head strong{font-size:18px;color:var(--desk-ink)}
#inboxPage .inbox-workflow select{border-radius:10px;border:1px solid #dce6f0;background:#f8fafc;min-height:36px}
#inboxPage .inbox-messages{background:radial-gradient(circle at 80% 20%,#edf5ff 0,transparent 35%),#f7faff;padding:26px}
#inboxPage .inbox-message>div{background:#fff;border:1px solid #e0e9f4;border-radius:18px 18px 18px 5px;box-shadow:0 8px 18px #1738610a;font-size:14px;line-height:1.55}
#inboxPage .inbox-message.outbound>div{background:linear-gradient(135deg,#224eaa,#356de6);border:0;color:#fff;border-radius:18px 18px 5px 18px}
#inboxPage .inbox-composer{background:#fff;border-top:1px solid var(--desk-border);padding:16px 20px 8px}
#inboxPage #inboxReplyText{background:#f8fafc;border-radius:13px;min-height:46px;font-size:14px}
#inboxPage #inboxSendButton{border-radius:12px;background:#245bd3;min-height:44px}
#inboxPage .inbox-reply-hint{background:#fff;color:#7b8ba2}
#inboxPage .agent-phone-dock[hidden]{display:none!important}
#inboxPage .agent-phone-dock{position:fixed;right:clamp(12px,2.5vw,38px);top:clamp(75px,10vh,120px);bottom:18px;width:min(380px,calc(100vw - 24px));background:#fff;border:1px solid #dbe6f1;border-radius:23px;box-shadow:0 28px 85px #102b4e55;overflow:hidden;z-index:60;display:flex;flex-direction:column}
#inboxPage .agent-phone-dock-head{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;background:#0f2a48;color:#fff;min-height:67px}
#inboxPage .agent-phone-dock-head div{display:flex;flex-direction:column;gap:2px}
#inboxPage .agent-phone-dock-head small{font-size:10px;letter-spacing:.18em;color:#9bc3f4;font-weight:800}
#inboxPage .agent-phone-dock-head strong{font-size:16px}
#inboxPage #agentPhoneClose{border:1px solid #ffffff42;background:#ffffff15;border-radius:10px;width:34px;height:34px;color:#fff;font-size:23px;line-height:1;cursor:pointer}
#inboxPage #agentPhoneFrame{border:0;flex:1;width:100%;background:#f4f8fd}
@media(max-width:950px){#inboxPage .section-head{grid-template-columns:1fr}#inboxPage .section-head p{max-width:none}}
@media(max-width:720px){#inboxPage{padding:12px}#inboxPage .inbox-shell{min-height:0}#inboxPage .agent-phone-dock{top:70px;right:10px;bottom:10px;width:min(380px,calc(100vw - 20px))}}

/* Phone remains mounted across CRM pages; minimized dock is a compact call indicator. */
#appView .agent-phone-dock[hidden]{display:none!important}
#appView .agent-phone-dock{position:fixed;right:18px;bottom:18px;top:auto;width:min(380px,calc(100vw - 36px));height:min(690px,calc(100vh - 100px));background:#fff;border:1px solid #dbe6f1;border-radius:20px;box-shadow:0 26px 75px #102b4e46;z-index:80;display:flex;flex-direction:column;overflow:hidden}
#appView .agent-phone-dock-head{display:flex;align-items:center;justify-content:space-between;min-height:66px;padding:12px 17px;background:#102d4d;color:#fff;cursor:pointer}
#appView .agent-phone-dock-head div{display:flex;flex-direction:column;gap:3px;min-width:0}
#appView .agent-phone-dock-head small{color:#abd2fa;font-size:10px;letter-spacing:.08em;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:290px}
#appView .agent-phone-dock-head strong{font-size:16px}
#appView #agentPhoneClose{border:1px solid #ffffff40;border-radius:10px;background:#ffffff16;color:#fff;font-size:22px;line-height:1;width:34px;height:34px;cursor:pointer}
#appView #agentPhoneFrame{border:0;flex:1;width:100%;background:#f4f8fd}
#appView .agent-phone-dock.collapsed{width:240px;height:66px;overflow:hidden}
#appView .agent-phone-dock.collapsed #agentPhoneFrame{position:absolute;top:66px;left:0;width:100%;height:600px;opacity:0;pointer-events:none}
#appView .crm-phone-contact-popup[hidden]{display:none!important}
#appView .crm-phone-contact-popup{position:fixed;right:270px;bottom:20px;z-index:81;width:min(320px,calc(100vw - 40px));padding:17px;border:1px solid #bed7f6;border-radius:16px;background:#fff;box-shadow:0 18px 55px #1b38502d;color:#152f50;display:flex;flex-direction:column;gap:7px}
#appView .crm-phone-contact-popup strong{font-size:15px;color:#133a70}
#appView .crm-phone-contact-popup span{font-size:14px;overflow-wrap:anywhere}
#appView .crm-phone-contact-popup div{display:flex;gap:7px;flex-wrap:wrap;margin-top:6px}
#appView .crm-phone-contact-popup button,#appView .crm-phone-contact-popup a{border:1px solid #d5e5f9;border-radius:9px;background:#f1f7ff;padding:8px 10px;color:#174c92;font-size:12px;text-decoration:none;font-weight:700;cursor:pointer}
@media(max-width:760px){#appView .crm-phone-contact-popup{right:16px;bottom:95px}#appView .agent-phone-dock{right:10px;bottom:10px}}

#inboxPage #agentPhoneShortcut{display:none!important}
