.workspace.is-calls .view-switcher,
.workspace.is-calls .control-bar,
.workspace.is-calls .status-jump,
.workspace.is-calls .applied-filters,
.workspace.is-calls #create-task { display: none; }

.calls-view { min-height: 0; padding: 0 28px 28px; overflow: hidden; }
.calls-view.is-active { display: flex; }
.calls-view > #calls-root { width: 100%; min-height: 0; display: flex; }
.calls-shell [hidden], .detached-phone [hidden] { display: none !important; }
.calls-shell { width: 100%; min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; box-shadow: 0 9px 28px rgba(31,49,62,.05); }
.calls-toolbar { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fbfcfd; }
.calls-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 11px; background: #eaf0f2; }
.calls-tabs button { height: 40px; display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 8px; padding: 0 13px; background: transparent; color: #74818d; cursor: pointer; font-size: 11.5px; font-weight: 760; }
.calls-tabs button:hover { color: var(--ink); }
.calls-tabs button.is-active { background: #fff; color: var(--accent-dark); box-shadow: 0 2px 8px rgba(35,53,66,.1); }
.calls-tabs svg, .calls-detach svg { width: 16px; height: 16px; }
.calls-detach { height: 42px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid #bcdadd; border-radius: 10px; padding: 0 14px; background: #f0f8f8; color: var(--accent-dark); cursor: pointer; font-size: 11px; font-weight: 780; }
.calls-detach:hover { border-color: #7eb6ba; background: #e5f3f3; }
.calls-phone-layout { min-height: 0; flex: 1; display: block; padding: 18px; overflow: auto; background: radial-gradient(circle at 20% 0,rgba(36,143,148,.06),transparent 34%),#f7f9fa; }
.calls-phone-layout > main { min-width: 0; max-width: 1380px; margin: 0 auto; }

.phone-surface { display: grid; grid-template-columns: minmax(340px,430px) minmax(500px,1fr); grid-auto-flow: row; align-items: start; gap: 13px 16px; }
.phone-surface > .phone-status-card,
.phone-surface > .phone-owner-note,
.phone-surface > .phone-microphone,
.phone-surface > .phone-call-card,
.phone-surface > .phone-dial-zone,
.phone-surface > .phone-recents,
.phone-surface > .phone-call-actions,
.phone-surface > .phone-transfer,
.phone-surface > .phone-keypad { grid-column: 1; }
.phone-surface > .phone-team { grid-column: 2; grid-row: 1 / span 9; align-self: stretch; min-height: 455px; }
.phone-surface.is-compact { display: grid; grid-template-columns: minmax(0,1fr); }
.phone-surface.is-compact > * { grid-column: 1; grid-row: auto; }
.phone-surface.is-compact > .phone-team { min-height: 0; }
.phone-surface[data-phone-phase="incoming"],
.phone-surface[data-phone-phase="active"] { grid-template-columns: minmax(340px,480px); justify-content: center; }
.phone-surface[data-phone-phase="incoming"] > .phone-team,
.phone-surface[data-phone-phase="active"] > .phone-team { display: none; }
.phone-status-card { min-height: 86px; display: grid; grid-template-columns: 11px minmax(0,1fr) auto; align-items: center; gap: 14px; border: 1px solid #d6e1e5; border-radius: 16px; padding: 14px 16px; background: linear-gradient(140deg,#fff,#f8fbfb); box-shadow: 0 8px 24px rgba(32,51,65,.055); }
.phone-status-card > i { width: 9px; height: 9px; border-radius: 50%; background: #9aa6af; box-shadow: 0 0 0 5px rgba(154,166,175,.11); }
.phone-status-card > span { min-width: 0; display: grid; gap: 4px; }
.phone-status-card strong { font-size: 16px; }
.phone-status-card small { overflow: hidden; color: #7d8b97; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.phone-status-card.is-ready > i { background: #55a479; box-shadow: 0 0 0 5px rgba(85,164,121,.12); }
.phone-status-card.is-active > i, .phone-status-card.is-incoming > i { background: #1a8c92; box-shadow: 0 0 0 5px rgba(26,140,146,.13); animation: phone-pulse 1.3s ease-in-out infinite; }
.phone-status-card.is-away > i { background: #c08a45; box-shadow: 0 0 0 5px rgba(192,138,69,.13); }
@keyframes phone-pulse { 50% { opacity: .35; transform: scale(.84); } }
.phone-status-card > button { min-height: 39px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid #cfe2d7; border-radius: 999px; padding: 0 14px; background: #f1f8f4; color: #4d7561; cursor: pointer; font-size: 11px; font-weight: 780; }
.phone-status-card > button b { width: 7px; height: 7px; border-radius: 50%; background: #5ba57c; }
.phone-status-card > button.is-away { border-color: #ead8be; background: #fff8ed; color: #9a6c34; }
.phone-status-card > button.is-away b { background: #bd8541; }
.phone-status-card > button:disabled { cursor: default; opacity: .58; }
.phone-owner-note, .phone-microphone { min-height: 54px; display: grid; grid-template-columns: 32px minmax(0,1fr) auto; align-items: center; gap: 11px; border: 1px solid #cfe2e4; border-radius: 12px; padding: 9px 12px; background: #eff8f8; color: #4b6f73; }
.phone-owner-note[hidden], .phone-microphone[hidden] { display: none; }
.phone-owner-note > svg, .phone-microphone > svg { width: 18px; height: 18px; justify-self: center; color: var(--accent); }
.phone-owner-note span { font-size: 12px; line-height: 1.45; }
.phone-microphone { border-color: #efd1cc; background: #fff5f3; color: #8c5550; }
.phone-microphone > span { display: grid; gap: 3px; }
.phone-microphone strong { font-size: 11px; }
.phone-microphone small { color: #a77772; font-size: 11px; }
.phone-microphone button { min-height: 36px; border: 0; border-radius: 8px; padding: 0 12px; background: #b9665e; color: #fff; cursor: pointer; font-size: 12px; font-weight: 750; }
.phone-dial-zone { position: relative; }
.phone-search-row { display: grid; grid-template-columns: minmax(0,1fr) 58px; gap: 10px; }
.phone-search-row label { height: 58px; display: grid; grid-template-columns: 21px minmax(0,1fr); align-items: center; gap: 11px; border: 1px solid #c9d6dc; border-radius: 14px; padding: 0 15px; background: #fff; color: #7f8d98; box-shadow: 0 7px 20px rgba(33,52,66,.05); }
.phone-search-row label:focus-within { border-color: #75b0b4; background: #fff; box-shadow: 0 0 0 3px rgba(20,123,130,.1); }
.phone-search-row label svg { width: 18px; height: 18px; }
.phone-search-row input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 15px; }
.phone-search-row > button { display: grid; place-items: center; border: 0; border-radius: 14px; background: #42ad78; color: #fff; cursor: pointer; box-shadow: 0 9px 20px rgba(66,173,120,.24); }
.phone-search-row > button:hover { background: #439d70; }
.phone-search-row > button svg { width: 22px; height: 22px; }
.phone-search-results { position: absolute; z-index: 12; top: 59px; left: 0; right: 61px; max-height: 280px; overflow-y: auto; border: 1px solid #d7e0e5; border-radius: 12px; padding: 5px; background: #fff; box-shadow: 0 15px 35px rgba(30,47,60,.16); }
.phone-search-results[hidden] { display: none; }
.phone-search-results button { width: 100%; min-height: 52px; display: grid; grid-template-columns: 36px minmax(0,1fr) 25px; align-items: center; gap: 10px; border: 0; border-radius: 9px; padding: 7px 9px; background: transparent; text-align: left; cursor: pointer; }
.phone-search-results button:hover { background: #f0f6f6; }
.phone-search-results button:disabled { cursor: default; opacity: .58; }
.phone-search-results button > span { min-width: 0; display: grid; gap: 3px; }
.phone-search-results strong, .phone-search-results small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-search-results strong { font-size: 13px; }
.phone-search-results small { color: #84909b; font-size: 11px; }
.phone-search-results p { margin: 0; padding: 15px; color: #7e8a95; font-size: 12px; text-align: center; }
.phone-recents { overflow: hidden; border: 1px solid #dce5e8; border-radius: 13px; background: #fff; }
.phone-recents > header { min-height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 12px; border-bottom: 1px solid #e8edef; color: #687782; font-size: 12px; font-weight: 780; }
.phone-recents > header button { width: 29px; height: 29px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #84909a; cursor: pointer; }
.phone-recents > header button:hover { background: #edf4f4; color: var(--accent); }
.phone-recents > header svg { width: 13px; height: 13px; }
.phone-recents > div { display: grid; }
.phone-recents > div > button { min-width: 0; min-height: 51px; display: grid; grid-template-columns: 33px minmax(0,1fr) 17px; align-items: center; gap: 9px; border: 0; border-top: 1px solid #edf1f3; padding: 7px 10px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.phone-recents > div > button:first-child { border-top: 0; }
.phone-recents > div > button:hover { background: #f2f8f8; }
.phone-recents .calls-avatar { width: 31px; height: 31px; font-size: 8px; }
.phone-recents > div > button > span { min-width: 0; display: grid; gap: 2px; }
.phone-recents strong, .phone-recents small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-recents strong { font-size: 12.5px; }
.phone-recents small { color: #85919b; font-size: 10.5px; }
.phone-recents > div > button > svg { width: 14px; height: 14px; color: #579195; }
.calls-avatar { width: 36px; height: 36px; display: inline-grid; place-items: center; overflow: hidden; border-radius: 50%; background: color-mix(in srgb,var(--avatar-color) 18%,#edf2f5); color: var(--avatar-color); font-size: 10px; font-weight: 850; }
.calls-avatar img { width: 100%; height: 100%; object-fit: cover; }
.calls-avatar.is-large { width: 58px; height: 58px; font-size: 15px; }
.phone-team { border: 1px solid #d9e3e7; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 8px 24px rgba(32,51,65,.045); }
.phone-team > header { min-height: 57px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid #e5ebee; color: #657681; font-size: 11px; font-weight: 820; text-transform: uppercase; letter-spacing: .08em; }
.phone-team > header button { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #8b97a1; cursor: pointer; }
.phone-team > header button:hover { background: #edf3f4; color: var(--accent); }
.phone-team > header svg { width: 14px; height: 14px; }
.phone-team-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-content: start; gap: 9px; padding: 12px; }
.phone-person { min-width: 0; min-height: 76px; display: grid; grid-template-columns: 46px minmax(0,1fr); align-items: center; gap: 11px; border: 1px solid #dce3e7; border-radius: 13px; padding: 9px 11px; background: #fff; text-align: left; cursor: pointer; }
.phone-person .calls-avatar { width: 43px; height: 43px; font-size: 11px; }
.phone-person:hover:not(:disabled) { border-color: #83b9bc; background: #f5fafa; }
.phone-person:disabled { cursor: default; }
.phone-person > span { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 5px; align-items: center; }
.phone-person strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.phone-person small { color: #71808d; font-size: 11px; }
.phone-person em { grid-column: 1 / -1; overflow: hidden; color: #687b86; font-style: normal; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.phone-person.is-offline { background: #f8f9fa; color: #8d98a2; }
.phone-person.is-offline .calls-avatar { filter: grayscale(.7); opacity: .72; }
.phone-person.is-away { border-color: #edddc7; background: #fffaf4; color: #9a7349; }
.phone-person.is-in-call { border-color: #bcdfe0; background: #f0f8f8; color: #286f73; }
.phone-empty { grid-column: 1 / -1; margin: 0; padding: 18px; color: #87939d; font-size: 12px; text-align: center; }
.phone-call-card { overflow: hidden; border: 1px solid #d7e2e5; border-radius: 17px; padding: 8px 8px 12px; background: #fff; box-shadow: 0 10px 28px rgba(32,51,65,.065); }
.phone-call-card[hidden], .phone-call-actions[hidden], .phone-transfer[hidden], .phone-keypad[hidden] { display: none; }
.phone-call-main { min-height: 164px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 15px 16px 11px; text-align: center; }
.phone-call-main > .phone-call-identity { min-width: 0; max-width: 100%; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.phone-call-main .calls-avatar.is-large { width: 58px; height: 58px; font-size: 15px; }
.phone-call-main small { color: var(--accent); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .075em; }
.phone-call-main strong { max-width: 100%; overflow: hidden; font-size: 19px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.phone-call-main em, .phone-call-main b { max-width: 100%; overflow: hidden; color: #71808b; font-size: 11px; font-style: normal; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.phone-call-main button { border: 0; padding: 2px 0; background: transparent; color: #287c82; cursor: pointer; font-size: 11.5px; font-weight: 750; }
.phone-call-main time { color: #315f62; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.phone-call-likely { min-height: 48px; display: grid; grid-template-columns: 31px minmax(0,1fr); align-items: center; gap: 9px; margin: 0 10px 9px; border: 1px solid #d4e6e7; border-radius: 12px; padding: 8px 10px; background: #f2f9f9; color: #496c70; text-align: left; }
.phone-call-likely .calls-avatar { width: 30px; height: 30px; font-size: 8px; }
.phone-call-likely > span { min-width: 0; display: grid; gap: 3px; }
.phone-call-likely small { color: #7c9295; font-size: 9.5px; }
.phone-call-likely strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.calls-client-tasks { margin: 0 10px; border: 1px solid #e0e7e9; border-radius: 13px; padding: 9px 10px 8px; background: #f8fafb; text-align: left; }
.calls-client-tasks > header { min-height: 32px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 0 1px 7px; }
.calls-client-tasks > header > span { min-width: 0; display: grid; gap: 2px; }
.calls-client-tasks > header strong { color: #596873; font-size: 10px; letter-spacing: .045em; text-transform: uppercase; }
.calls-client-tasks > header small { overflow: hidden; color: #87939c; font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.calls-client-tasks > header b { min-width: 23px; height: 23px; display: grid; place-items: center; border-radius: 999px; padding: 0 6px; background: #e4f0f0; color: #44787b; font-size: 10px; }
.calls-task-list { max-height: 176px; overflow-y: auto; }
.calls-task-row { width: 100%; min-height: 48px; display: grid; grid-template-columns: minmax(0,1fr) auto 16px; align-items: center; gap: 9px; border: 0; border-top: 1px solid #e8edef; padding: 7px 2px; background: transparent; text-align: left; cursor: pointer; }
.calls-task-row:first-child { border-top: 0; }
.calls-task-row > span { min-width: 0; display: grid; gap: 2px; }
.calls-task-row strong, .calls-task-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calls-task-row strong { font-size: 11.5px; }
.calls-task-row small { color: #84909a; font-size: 10px; }
.calls-task-row em { border-radius: 999px; padding: 4px 7px; background: #edf3f3; color: #4b777a; font-size: 9.5px; font-style: normal; white-space: nowrap; }
.calls-task-row svg { width: 14px; height: 14px; color: #97a1aa; }
.calls-task-more { display: block; padding: 8px 4px 3px; color: #82909a; font-size: 11px; }
.phone-call-actions { display: flex; justify-content: center; gap: 18px; padding: 2px 4px; }
.phone-call-actions button { min-width: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 0; padding: 0; background: transparent; color: #586771; cursor: pointer; font-size: 10.5px; font-weight: 700; }
.phone-call-actions button svg { width: 46px; height: 46px; border-radius: 50%; padding: 13px; background: #e9eff1; color: #596872; }
.phone-call-actions button:hover:not(:disabled) svg, .phone-call-actions button.is-selected svg { background: #dceeee; color: var(--accent-dark); }
.phone-call-actions button:disabled { cursor: default; opacity: .5; }
.phone-call-actions button.is-hangup svg { background: #cf5b55; color: #fff; }
.phone-call-actions button.is-hangup:hover svg { background: #ba4d48; color: #fff; }
.phone-surface[data-phone-phase="incoming"] .phone-call-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.phone-surface[data-phone-phase="incoming"] .phone-call-actions button { min-height: 46px; flex-direction: row; gap: 7px; border: 1px solid #d9e3e6; border-radius: 11px; background: #fff; font-size: 11.5px; }
.phone-surface[data-phone-phase="incoming"] .phone-call-actions button svg { width: 16px; height: 16px; border-radius: 0; padding: 0; background: transparent; }
.phone-surface[data-phone-phase="incoming"] .phone-call-actions button.is-answer { border-color: #bfe2cd; background: #eaf7ef; color: #397c58; }
.phone-surface[data-phone-phase="incoming"] .phone-call-actions button.is-hangup { border-color: #efceca; background: #fff0ee; color: #ae5650; }
.phone-surface[data-phone-phase="incoming"] .phone-call-actions button.is-hangup svg { color: currentColor; }
.phone-keypad { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; border: 1px solid #dfe6e9; border-radius: 13px; padding: 10px; background: #f7f9fa; }
.phone-keypad button { height: 40px; border: 1px solid #dce4e7; border-radius: 10px; background: #fff; cursor: pointer; font-size: 14px; font-weight: 750; }
.phone-transfer { border: 1px solid #d9e4e6; border-radius: 13px; padding: 8px; background: #f8fbfb; }
.phone-transfer > header { min-height: 35px; display: flex; align-items: center; justify-content: space-between; padding: 0 3px 6px; }
.phone-transfer > header strong { font-size: 12px; }
.phone-transfer > header button { width: 29px; height: 29px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.phone-transfer > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.phone-transfer > div > button { min-height: 54px; display: grid; grid-template-columns: 36px minmax(0,1fr) 17px; align-items: center; gap: 8px; border: 1px solid #dde5e8; border-radius: 10px; padding: 7px; background: #fff; text-align: left; cursor: pointer; }
.phone-transfer button > span { min-width: 0; display: grid; gap: 2px; }
.phone-transfer button strong, .phone-transfer button small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-transfer button strong { font-size: 12px; }
.phone-transfer button small { color: #84909a; font-size: 10.5px; }
.phone-transfer button svg { width: 14px; height: 14px; }

[data-calls-pane="history"], [data-calls-pane="archive"] { min-height: 0; flex: 1; overflow: hidden; }
[data-calls-pane="history"] > div, [data-calls-pane="archive"] > div { height: 100%; }
.calls-history { height: 100%; min-height: 0; display: flex; flex-direction: column; }
.calls-history-heading { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 11px 18px; border-bottom: 1px solid #e4eaed; }
.calls-history-heading > div { display: grid; gap: 4px; }
.calls-history-heading strong { font-size: 15px; }
.calls-history-heading small { color: #84909b; font-size: 11.5px; }
.calls-history-heading > button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #dce4e8; border-radius: 9px; background: #fff; color: #788590; cursor: pointer; }
.calls-history-heading svg { width: 15px; height: 15px; }
.calls-history-switch { min-height: 58px; display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid #e5eaed; background: #fafcfc; }
.calls-history-switch > span { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: #e9eef1; }
.calls-history-switch button { height: 36px; border: 0; border-radius: 7px; padding: 0 13px; background: transparent; color: #74818d; cursor: pointer; font-size: 12px; font-weight: 740; }
.calls-history-switch button.is-active { background: #fff; color: var(--ink); box-shadow: 0 2px 7px rgba(38,54,67,.1); }
.calls-history-list { min-height: 0; flex: 1; overflow-y: auto; padding: 10px 14px 18px; scrollbar-width: thin; scrollbar-color: #d2dce1 transparent; }
.call-history-card { min-height: 84px; height: max-content; display: grid; grid-template-columns: 31px 42px minmax(0,1fr); grid-auto-rows: max-content; align-items: start; align-content: start; gap: 10px; border: 1px solid #e1e7ea; border-radius: 13px; padding: 11px 13px; background: #fff; margin-bottom: 8px; overflow: hidden; box-shadow: 0 3px 9px rgba(34,51,64,.035); }
.call-history-card.is-missed { border-color: #efd8d5; background: #fffafa; }
.call-direction { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; background: #e6f2ed; color: #4b8a6a; }
.is-missed .call-direction { background: #fbe9e7; color: #c05d56; }
.call-direction svg { width: 14px; height: 14px; }
.call-history-copy { width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; grid-auto-rows: max-content; align-content: start; gap: 4px 10px; overflow: hidden; }
.call-history-copy header { min-width: 0; grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.call-history-copy header strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.call-history-copy header span { flex: 0 0 auto; color: #788691; font-size: 12px; white-space: nowrap; }
.call-history-copy > small { grid-column: 1 / -1; color: #74828e; font-size: 11.5px; }
.call-open-client, .call-quick-add { justify-self: start; border: 0; border-radius: 7px; padding: 6px 9px; background: #edf6f6; color: var(--accent-dark); cursor: pointer; font-size: 11.5px; font-weight: 760; }
.call-quick-add { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #b9d9dc; background: #fff; }
.call-quick-add svg { width: 13px; height: 13px; }
.call-recording-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.call-recording-actions button, .call-recording-actions a { height: 36px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #dce4e7; border-radius: 8px; padding: 0 10px; background: #fff; color: #667581; text-decoration: none; cursor: pointer; font-size: 11.5px; font-weight: 740; }
.call-recording-actions button.is-playing { border-color: #79b2b6; background: #e8f4f4; color: var(--accent-dark); }
.call-recording-actions svg { width: 13px; height: 13px; }
.call-no-recording { grid-column: 1 / -1; margin-top: 4px; color: #a0a9b0; font-size: 10.5px; }
.call-recording-segments { grid-column: 1 / -1; display: grid; gap: 5px; margin-top: 6px; border-top: 1px solid #e7ecef; padding-top: 8px; }
.call-recording-segments > strong { margin-bottom: 2px; color: #6f7c87; font-size: 11.5px; }
.call-recording-segment { min-height: 40px; display: grid; grid-template-columns: minmax(0,1fr) 31px 31px; align-items: center; gap: 6px; border: 1px solid #e2e8eb; border-radius: 9px; padding: 5px 6px 5px 9px; background: #f9fbfb; }
.call-recording-segment > span { min-width: 0; display: grid; gap: 2px; }
.call-recording-segment b, .call-recording-segment small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-recording-segment b { font-size: 12px; }
.call-recording-segment small { color: #87939c; font-size: 10.5px; }
.call-recording-segment button, .call-recording-segment a { width: 31px; height: 31px; display: grid; place-items: center; border: 0; border-radius: 8px; background: #eaf3f3; color: #527f82; text-decoration: none; cursor: pointer; }
.call-recording-segment button.is-playing { background: var(--accent); color: #fff; }
.call-recording-segment svg { width: 13px; height: 13px; }
.call-record-player { grid-column: 1 / -1; display: grid; grid-template-columns: 34px minmax(80px,1fr) 34px; align-items: center; gap: 7px; margin-top: 6px; padding: 7px 9px; border-radius: 9px; background: #edf5f5; color: #61757a; font-size: 11px; font-variant-numeric: tabular-nums; }
.call-record-player input { width: 100%; accent-color: var(--accent); cursor: pointer; }
.calls-history-more { flex: 0 0 auto; height: 42px; margin: 0 14px 12px; border: 1px solid #d8e1e5; border-radius: 9px; background: #fff; color: #62717d; cursor: pointer; font-size: 12px; font-weight: 740; }
.calls-history-state { min-height: 190px; display: grid; place-items: center; align-content: center; gap: 9px; color: #88949e; text-align: center; }
.calls-history-state > svg { width: 29px; height: 29px; }
.calls-history-state > span { width: 28px; height: 28px; border: 3px solid #d8e3e6; border-top-color: var(--accent); border-radius: 50%; animation: calls-spin .8s linear infinite; }
.calls-history-state strong { font-size: 12px; font-weight: 650; }
@keyframes calls-spin { to { transform: rotate(360deg); } }
.calls-history.is-archive { overflow: hidden; }
.calls-history.is-archive .calls-archive-filters,
.calls-history.is-archive .calls-history-heading,
.calls-history.is-archive .calls-history-more { flex: 0 0 auto; }
.calls-history.is-archive .calls-history-list { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.calls-archive-filters { flex: 0 0 auto; padding: 12px 16px; border-bottom: 1px solid #e1e7ea; background: #f8fafb; }
.calls-filter-row { display: grid; grid-template-columns: repeat(2,minmax(125px,180px)) minmax(180px,1fr); gap: 9px; }
.calls-filter-row label, .calls-filter-field { min-width: 0; display: grid; gap: 5px; color: #77848f; font-size: 11.5px; font-weight: 740; }
.calls-filter-field { position: relative; }
.calls-filter-row input { height: 41px; border: 1px solid #d5dfe4; border-radius: 9px; padding: 0 11px; outline: 0; background: #fff; color: var(--ink); font-size: 13px; }
.calls-filter-row input:focus { border-color: #79b2b6; box-shadow: 0 0 0 3px rgba(20,123,130,.09); }
.calls-date-trigger { width: 100%; height: 41px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid #d5dfe4; border-radius: 9px; padding: 0 10px 0 11px; background: #fff; color: var(--ink); cursor: pointer; text-align: left; font-size: 13px; font-weight: 650; }
.calls-date-trigger:hover, .calls-date-trigger[aria-expanded="true"] { border-color: #79b2b6; box-shadow: 0 0 0 3px rgba(20,123,130,.09); }
.calls-date-trigger span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calls-date-trigger svg { width: 15px; height: 15px; flex: 0 0 auto; color: #778791; }
.calls-date-popover { position: absolute; z-index: 25; top: calc(100% + 6px); left: 0; width: 294px; border: 1px solid #d6e0e4; border-radius: 13px; padding: 8px; background: #fff; color: #42515e; box-shadow: 0 18px 45px rgba(28,43,55,.2); }
.calls-date-popover[hidden] { display: none; }
.calls-filter-field:nth-child(2) .calls-date-popover { left: auto; right: 0; }
.calls-date-popover > header { height: 39px; display: grid; grid-template-columns: 34px minmax(0,1fr) 34px; align-items: center; gap: 5px; }
.calls-date-popover > header strong { text-align: center; text-transform: capitalize; font-size: 12.5px; }
.calls-date-popover > header button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #667681; cursor: pointer; }
.calls-date-popover > header button:hover { background: #edf3f4; }
.calls-date-popover > header svg { width: 15px; height: 15px; }
.calls-date-weekdays, .calls-date-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; }
.calls-date-weekdays { margin: 5px 0 3px; }
.calls-date-weekdays span { height: 24px; display: grid; place-items: center; color: #9aa5ad; font-size: 8.5px; font-weight: 820; }
.calls-date-grid button { height: 34px; border: 0; border-radius: 9px; background: transparent; color: #445360; cursor: pointer; font-size: 11.5px; }
.calls-date-grid button:hover { background: #edf5f5; color: var(--accent-dark); }
.calls-date-grid button.is-outside { color: #b3bbc1; }
.calls-date-grid button.is-today { box-shadow: inset 0 0 0 1px #75b0b3; color: var(--accent-dark); font-weight: 780; }
.calls-date-grid button.is-selected { background: var(--accent); color: #fff; box-shadow: none; font-weight: 800; }
.calls-date-popover > footer { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; border-top: 1px solid #e9edef; padding-top: 8px; }
.calls-date-popover > footer button { height: 31px; border: 0; border-radius: 8px; padding: 0 9px; background: transparent; color: var(--accent-dark); cursor: pointer; font-size: 9.5px; font-weight: 750; }
.calls-date-popover > footer button:hover { background: #e8f3f3; }
.calls-filter-chips { display: grid; grid-template-columns: max-content max-content minmax(190px,1fr); align-items: start; gap: 7px; margin-top: 10px; }
.calls-filter-chips > div:not(.calls-employee-menu) { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 9px; background: #e9eef1; }
.calls-filter-chips button { height: 36px; border: 0; border-radius: 7px; padding: 0 11px; background: transparent; color: #75828d; cursor: pointer; font-size: 11.5px; font-weight: 730; }
.calls-filter-chips button.is-active { background: #fff; color: var(--accent-dark); box-shadow: 0 2px 6px rgba(38,54,67,.09); }
.calls-employee-filter { width: 100%; display: inline-flex; align-items: center; justify-content: space-between; gap: 7px; border: 1px solid #d8e1e5 !important; background: #fff !important; }
.calls-employee-filter svg { width: 13px; height: 13px; transform: rotate(90deg); }
.calls-employee-menu { grid-column: 1 / -1; width: 100%; max-height: 176px; display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 4px; overflow-x: hidden; overflow-y: auto; border: 1px solid #d7e0e5; border-radius: 11px; padding: 5px; background: #fff; scrollbar-width: thin; }
.calls-employee-menu[hidden] { display: none; }
.calls-employee-menu button { width: 100%; min-height: 42px; display: grid; justify-content: stretch; gap: 2px; border: 1px solid #edf1f3; padding: 6px 9px; background: #f9fbfb; text-align: left; }
.calls-employee-menu button:hover { background: #edf5f5; }
.calls-employee-menu strong { font-size: 12px; }
.calls-employee-menu small { color: #8a95a0; font-size: 10.5px; }
.calls-archive-filters footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.calls-archive-filters footer span { display: flex; gap: 5px; }
.calls-archive-filters footer button { height: 37px; border: 1px solid #d7e0e4; border-radius: 8px; padding: 0 11px; background: #fff; color: #64727e; cursor: pointer; font-size: 11.5px; font-weight: 730; }
.calls-archive-filters footer button.is-primary { border-color: var(--accent); background: var(--accent); color: #fff; }

.phone-top-button { width: 39px; height: 39px; display: inline-grid; place-items: center; position: relative; border: 0; border-radius: 10px; background: transparent; color: #6f7b88; cursor: pointer; }
.phone-top-button:hover { background: #edf2f4; color: var(--ink); }
.phone-top-button svg { width: 19px; height: 19px; }
.phone-top-button i { position: absolute; right: 6px; bottom: 6px; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: #9ca7af; }
.phone-top-button.is-ready i { background: #54a57a; }
.phone-top-button.is-incoming i, .phone-top-button.is-active i { background: #16878d; animation: phone-pulse 1.1s ease-in-out infinite; }
.phone-top-button.is-away i { background: #c08842; }
.phone-mini-panel { position: fixed; z-index: 80; top: 59px; right: 20px; width: min(380px,calc(100vw - 24px)); max-height: calc(100dvh - 72px); overflow-x: hidden; overflow-y: auto; border: 1px solid #cfdde2; border-radius: 18px; background: #fff; box-shadow: 0 22px 65px rgba(25,42,55,.24); }
.phone-mini-panel[hidden] { display: none; }
.phone-mini-panel > .phone-mini-shared { width: 100%; height: auto; min-height: 0; }
.phone-mini-panel .phone-mini-shared-actions { display: flex; align-items: center; gap: 3px; }
.phone-mini-panel .phone-mini-shared-actions button { width: 34px; min-width: 34px; height: 34px; justify-content: center; padding: 0; }
.phone-mini-panel .phone-mini-shared > section { flex: none; overflow: visible; padding: 10px; }
.phone-mini-panel .phone-mini-shared > section[data-mini-pane="history"] { max-height: calc(100dvh - 190px); overflow-y: auto; }
.phone-mini-panel .phone-surface.is-compact,
.phone-mini-panel .phone-surface.is-compact[data-phone-phase="incoming"],
.phone-mini-panel .phone-surface.is-compact[data-phone-phase="active"] { width: 100%; min-width: 0; grid-template-columns: minmax(0,1fr); justify-content: stretch; }
.phone-mini-panel .phone-surface.is-compact > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
.phone-mini-panel > header { min-height: 58px; display: grid; grid-template-columns: 36px minmax(0,1fr) 34px 34px; align-items: center; gap: 7px; padding: 8px 9px; border-bottom: 1px solid #e1e8eb; position: sticky; top: 0; z-index: 2; background: #f8fbfb; }
.phone-mini-panel > header > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: #e2f0f0; color: var(--accent); }
.phone-mini-panel > header > div { min-width: 0; display: grid; gap: 3px; }
.phone-mini-panel > header strong, .phone-mini-panel > header small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-mini-panel > header strong { font-size: 13px; }
.phone-mini-panel > header small { color: #73838e; font-size: 11px; }
.phone-mini-panel > header button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #76838e; cursor: pointer; }
.phone-mini-panel > header button:hover { background: #eaf1f3; }
.phone-mini-panel > header svg { width: 16px; height: 16px; }
.phone-mini-call { width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; overflow: hidden; box-sizing: border-box; padding: 14px 10px 13px; }
.phone-mini-call-main { width: 100%; min-width: 0; max-width: 100%; min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; box-sizing: border-box; padding: 7px 12px 4px; text-align: center; }
.phone-mini-call-main .calls-avatar.is-large { width: 58px; height: 58px; font-size: 15px; }
.phone-mini-identity { width: 100%; min-width: 0; max-width: 100%; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.phone-mini-identity > strong { max-width: 100%; display: -webkit-box; overflow: hidden; overflow-wrap: anywhere; font-size: 19px; line-height: 1.2; -webkit-box-orient: vertical; -webkit-line-clamp: 2; text-overflow: ellipsis; white-space: normal; }
.phone-mini-identity > small { max-width: 100%; overflow: hidden; color: #75828e; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.phone-mini-identity > .phone-mini-direction { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .075em; text-transform: uppercase; }
.phone-mini-identity > time { color: #315f62; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.phone-mini-identity > .phone-mini-client { height: auto; border: 0; padding: 2px 0; background: transparent; color: var(--accent-dark); cursor: pointer; font-size: 11px; font-weight: 750; }
.phone-mini-call > .phone-call-likely { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; margin: 0; }
.phone-mini-call > .calls-client-tasks { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; margin: 0; }
.phone-mini-call-actions { width: 100%; min-width: 0; display: flex; justify-content: center; gap: 30px; box-sizing: border-box; padding: 4px 0 0; }
.phone-mini-call-actions button { min-width: 64px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 0; padding: 0; background: transparent; color: #586771; cursor: pointer; font-size: 10.5px; font-weight: 700; }
.phone-mini-call-actions button svg { width: 46px; height: 46px; border-radius: 50%; padding: 13px; background: #e9eff1; color: #596872; }
.phone-mini-call-actions button:hover svg { background: #dceeee; color: var(--accent-dark); }
.phone-mini-call-actions button.is-hangup svg { background: #cf5b55; color: #fff; }
.phone-mini-call-actions button.is-hangup:hover svg { background: #ba4d48; color: #fff; }
.phone-mini-panel[data-phone-phase="incoming"] .phone-mini-call-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.phone-mini-panel[data-phone-phase="incoming"] .phone-mini-call-actions button { min-height: 44px; flex-direction: row; gap: 7px; border: 1px solid #d9e3e6; border-radius: 11px; background: #fff; font-size: 11.5px; }
.phone-mini-panel[data-phone-phase="incoming"] .phone-mini-call-actions button svg { width: 15px; height: 15px; border-radius: 0; padding: 0; background: transparent; }
.phone-mini-panel[data-phone-phase="incoming"] .phone-mini-call-actions button.is-answer { border-color: #bde0cb; background: #e9f7ef; color: #397b57; }
.phone-mini-panel[data-phone-phase="incoming"] .phone-mini-call-actions button.is-hangup { border-color: #edceca; background: #fff0ee; color: #a95750; }
.phone-mini-panel[data-phone-phase="incoming"] .phone-mini-call-actions button.is-hangup svg { color: currentColor; }
.phone-mini-ready { display: grid; gap: 10px; padding: 12px; }
.phone-mini-dial { display: grid; grid-template-columns: minmax(0,1fr) 46px; gap: 8px; }
.phone-mini-dial label { height: 46px; display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: center; gap: 9px; border: 1px solid #cfdae0; border-radius: 11px; padding: 0 12px; background: #f8fafb; color: #84919c; }
.phone-mini-dial label:focus-within { border-color: #74afb3; background: #fff; box-shadow: 0 0 0 3px rgba(20,123,130,.09); }
.phone-mini-dial svg { width: 16px; height: 16px; }
.phone-mini-dial input { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.phone-mini-dial > button { display: grid; place-items: center; border: 0; border-radius: 11px; background: #42ad78; color: #fff; cursor: pointer; box-shadow: 0 7px 15px rgba(66,173,120,.2); }
.phone-mini-dial > button svg { width: 18px; height: 18px; }
.phone-mini-people { min-width: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; overflow: hidden; padding: 1px 0; }
.phone-mini-people > button { width: 100%; min-width: 0; height: 49px; display: grid; grid-template-columns: 33px minmax(0,1fr); align-items: center; gap: 7px; border: 1px solid #dce4e7; border-radius: 11px; padding: 6px 8px; background: #fff; text-align: left; cursor: pointer; }
.phone-mini-people > button:hover { border-color: #82b7ba; background: #f2f8f8; }
.phone-mini-people .calls-avatar { grid-row: 1 / span 2; width: 32px; height: 32px; }
.phone-mini-people span { overflow: hidden; font-size: 12px; font-weight: 740; text-overflow: ellipsis; white-space: nowrap; }
.phone-mini-people small { grid-column: 2; overflow: hidden; color: #76858f; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.phone-mini-presence { height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #cfe2d7; border-radius: 9px; background: #f1f8f4; color: #4c765f; cursor: pointer; font-size: 12px; font-weight: 740; }
.phone-mini-presence i { width: 7px; height: 7px; border-radius: 50%; background: #55a479; }
.phone-mini-presence.is-away { border-color: #ead9bf; background: #fff8ee; color: #936a3b; }
.phone-mini-presence.is-away i { background: #bd8542; }
.phone-mini-presence:disabled { cursor: default; opacity: .55; }
.phone-mini-panel > footer { display: grid; grid-template-columns: .7fr 1.3fr; gap: 7px; padding: 10px 12px 12px; border-top: 1px solid #e5eaed; position: sticky; bottom: 0; z-index: 2; background: #fbfcfd; }
.phone-mini-panel > footer button { height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid #d8e1e5; border-radius: 10px; background: #fff; color: #64747f; cursor: pointer; font-size: 12px; font-weight: 760; }
.phone-mini-panel > footer button svg { width: 14px; height: 14px; }
.phone-mini-panel > footer .phone-mini-open { border-color: var(--accent); background: var(--accent); color: #fff; }
.calls-client-tasks.is-compact .calls-task-row { min-height: 48px; grid-template-columns: minmax(0,1fr) auto; padding-inline: 0; }
.calls-client-tasks.is-compact .calls-task-row,
.calls-client-tasks.is-compact .calls-task-row > span { min-width: 0; max-width: 100%; }
.calls-client-tasks.is-compact .calls-task-row > svg { display: none; }
.calls-quick-add-layer { display: none; position: fixed; z-index: 120; inset: 0; place-items: center; padding: 18px; background: rgba(20,31,40,.42); backdrop-filter: blur(4px); }
.calls-quick-add-layer.is-open { display: grid; }
.calls-quick-add-layer > div { width: min(350px,100%); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-radius: 16px; padding: 14px; background: #fff; box-shadow: var(--shadow); }
.calls-quick-add-layer header { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.calls-quick-add-layer header strong { font-size: 14px; }
.calls-quick-add-layer header button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.calls-quick-add-layer p { grid-column: 1 / -1; margin: 0; color: #73818c; font-size: 11px; }
.calls-quick-add-layer > div > button { min-height: 42px; border: 1px solid #d5dfe4; border-radius: 9px; background: #fff; cursor: pointer; font-size: 12px; font-weight: 750; }
.calls-quick-add-layer > div > button:hover { border-color: #79b2b6; background: #edf7f7; color: var(--accent-dark); }
.client-phone-call { display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 0; background: transparent; color: #287d83; cursor: pointer; font-weight: 750; }
.client-phone-call:hover span { text-decoration: underline; }
.client-phone-call svg { width: 14px; height: 14px; }
.client-list-phone.is-callable { color: #287d83; font-weight: 700; }
.client-list-phone.is-callable:hover { text-decoration: underline; }

body[data-phone-surface="detached"] { min-width: 340px; min-height: 520px; overflow: hidden; background: #f0f4f5; }
.detached-phone-root { height: 100vh; overflow: hidden; }
.detached-phone-loading, .detached-phone-message { height: 100%; display: grid; place-items: center; align-content: center; gap: 12px; padding: 24px; color: #788691; text-align: center; }
.detached-phone-loading > span { width: 34px; height: 34px; border: 3px solid #d6e1e4; border-top-color: var(--accent); border-radius: 50%; animation: calls-spin .8s linear infinite; }
.detached-phone-loading strong, .detached-phone-message strong { color: var(--ink); font-size: 13px; }
.detached-phone-message > span { width: 49px; height: 49px; display: grid; place-items: center; border-radius: 14px; background: #e0f0f0; color: var(--accent); }
.detached-phone-message p { max-width: 300px; margin: 0; font-size: 12px; line-height: 1.55; }
.detached-phone-message button { height: 40px; border: 0; border-radius: 9px; padding: 0 14px; background: var(--accent); color: #fff; cursor: pointer; font-size: 12px; font-weight: 750; }
.detached-phone { height: 100%; display: flex; flex-direction: column; background: #f5f7f8; }
.detached-phone-head { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-bottom: 1px solid #dbe3e7; background: #fff; }
.detached-phone-head > div { display: flex; align-items: center; gap: 9px; }
.detached-phone-head > div > span { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; background: #e0f0f0; color: var(--accent); }
.detached-phone-head strong { font-size: 13px; }
.detached-phone-head button { height: 36px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #d6e0e4; border-radius: 9px; padding: 0 10px; background: #fff; color: #687681; cursor: pointer; font-size: 11.5px; font-weight: 730; }
.detached-phone-head svg { width: 14px; height: 14px; }
.detached-phone > nav { min-height: 54px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin: 8px; padding: 3px; border: 0; border-radius: 10px; background: #e9eef1; }
.detached-phone > nav button { min-height: 40px; border: 0; border-radius: 7px; background: transparent; color: #74818d; cursor: pointer; font-size: 12.5px; font-weight: 760; }
.detached-phone > nav button.is-active { background: #fff; color: var(--ink); box-shadow: 0 2px 7px rgba(38,54,67,.1); }
.detached-phone > section { min-height: 0; flex: 1; overflow-y: auto; padding: 10px; }
.detached-phone > section[hidden] { display: none; }
.phone-surface.is-compact .phone-team-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.phone-surface.is-compact .phone-person { min-height: 58px; }
.phone-surface.is-compact .phone-call-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
.phone-surface.is-compact .phone-transfer > div { grid-template-columns: 1fr; }
.phone-surface.is-compact .phone-call-main { min-height: 0; display: grid; grid-template-columns: 48px minmax(0,1fr); align-items: center; gap: 11px; padding: 12px; text-align: left; }
.phone-surface.is-compact .phone-call-main > .phone-call-identity { align-items: flex-start; }
.phone-surface.is-compact .phone-call-main .calls-avatar.is-large { width: 48px; height: 48px; transform: none; }
.phone-surface.is-compact .phone-call-main strong { font-size: 15px; }
.phone-surface.is-compact .phone-owner-note { display: none; }
.detached-phone .calls-history { height: auto; min-height: 100%; }
.detached-phone .calls-history-list { overflow: visible; padding: 7px 0; }
.detached-phone .calls-history-heading { min-height: 58px; padding: 9px 10px; }
.detached-phone .calls-history-heading strong { font-size: 15px; }
.detached-phone .calls-history-heading small { font-size: 11px; line-height: 1.35; }
.detached-phone .calls-history-switch { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 8px; }
.detached-phone .calls-history-switch > span { width: 100%; display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.detached-phone .call-history-card { grid-template-columns: 31px minmax(0,1fr); gap: 9px; padding: 10px; }
.detached-phone .call-history-card > .calls-avatar { display: none; }
.detached-phone .call-history-copy { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.detached-phone .call-history-copy header { width: 100%; display: grid; grid-template-columns: minmax(0,1fr); gap: 3px; }
.detached-phone .call-history-copy header strong { display: -webkit-box; overflow: hidden; white-space: normal; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.detached-phone .call-history-copy header span { white-space: normal; }
.detached-phone .call-history-copy > small { width: 100%; overflow-wrap: anywhere; }
.detached-phone .call-open-client,
.detached-phone .call-quick-add { max-width: 100%; }
.detached-phone .call-recording-actions,
.detached-phone .call-recording-segments,
.detached-phone .call-record-player,
.detached-phone .call-no-recording { width: 100%; grid-column: auto; }

@media (max-width: 1100px) {
  .phone-surface:not(.is-compact) { grid-template-columns: minmax(0,1fr); }
  .phone-surface:not(.is-compact) > * { grid-column: 1; grid-row: auto; }
  .phone-surface:not(.is-compact) > .phone-team { min-height: 0; }
  .phone-team-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 860px) {
  .calls-filter-row { grid-template-columns: 1fr 1fr; }
  .calls-filter-row .is-wide { grid-column: 1 / -1; }
  .calls-filter-chips { grid-template-columns: 1fr 1fr; }
  .calls-employee-filter { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .workspace.is-calls .page-head { padding-bottom: 11px; }
  .calls-view { padding: 0 10px 82px; }
  .calls-shell { border-radius: 14px; }
  .calls-toolbar { min-height: 57px; padding: 7px; }
  .calls-tabs { min-width: 0; overflow-x: auto; }
  .calls-tabs button { height: 39px; padding: 0 11px; white-space: nowrap; font-size: 11px; }
  .calls-detach { width: 39px; flex: 0 0 39px; padding: 0; justify-content: center; }
  .calls-detach span { display: none; }
  .calls-phone-layout { padding: 10px; overflow-y: auto; }
  .phone-team-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; padding: 7px; }
  .phone-person { min-height: 68px; padding: 7px; }
  .phone-person > span { display: grid; grid-template-columns: 1fr; }
  .phone-person small { justify-self: start; }
  .phone-person strong { font-size: 12px; }
  .phone-person small { font-size: 11px; }
  .phone-person em { display: none; }
  .phone-call-main { min-height: 0; display: grid; grid-template-columns: 48px minmax(0,1fr); align-items: center; gap: 11px; padding: 12px; text-align: left; }
  .phone-call-main > .phone-call-identity { align-items: flex-start; }
  .calls-avatar.is-large { width: 48px; height: 48px; }
  .phone-call-main strong { font-size: 15px; }
  .phone-call-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .phone-transfer > div { grid-template-columns: 1fr; }
  .calls-history-heading { padding: 9px 11px; }
  .calls-history-list { padding: 8px; }
  .call-history-card { grid-template-columns: 27px 36px minmax(0,1fr); gap: 7px; padding: 9px; }
  .call-history-copy header { display: grid; gap: 3px; }
  .call-history-copy header span { white-space: normal; }
  .call-recording-actions span { display: none; }
  .calls-filter-row { grid-template-columns: 1fr 1fr; }
  .calls-filter-row .is-wide { grid-column: 1 / -1; }
  .calls-filter-chips { grid-template-columns: 1fr; }
  .calls-filter-chips > div:not(.calls-employee-menu) { overflow: visible; }
  .calls-employee-filter { justify-content: space-between; }
  .calls-employee-menu { grid-template-columns: 1fr; max-height: min(154px,22dvh); }
  .calls-archive-filters footer { align-items: stretch; flex-direction: column; }
  .calls-archive-filters footer span { display: grid; grid-template-columns: 1fr 1fr; }
  .phone-top-button { display: inline-grid !important; }
  .phone-mini-panel { top: 54px; right: 8px; }
}

@media (max-width: 430px) {
  .phone-team-grid { grid-template-columns: 1fr; }
  .phone-status-card { grid-template-columns: 10px minmax(0,1fr); }
  .phone-status-card > button { grid-column: 1 / -1; justify-content: center; }
  .call-history-card { grid-template-columns: 27px minmax(0,1fr); }
  .call-history-card > .calls-avatar { display: none; }
  .calls-filter-row { grid-template-columns: 1fr; }
  .calls-filter-row .is-wide { grid-column: auto; }
  .calls-date-popover, .calls-filter-field:nth-child(2) .calls-date-popover { left: 0; right: auto; width: min(294px, calc(100vw - 52px)); }
}
