.portal-shell { grid-template-columns: clamp(230px,19vw,260px) minmax(0,1fr); }
.portal-shell .sidebar { display: flex; flex-direction: column; }
.portal-shell .brand { flex: 0 0 auto; }
.portal-shell .nav-item { min-height: 44px; gap: 10px; font-size: 14px; }
.portal-shell .nav-item svg { width: 30px; height: 30px; padding: 5px; flex-shrink: 0; border-radius: 8px; color: #fff; background: #8e939d; box-shadow: inset 0 0 0 .5px rgba(255,255,255,.25),0 1px 3px rgba(31,43,68,.10); }
.portal-shell .nav-item[data-portal-page="sip"] svg { background: linear-gradient(160deg,#40a6ff,#0876e5); }
.portal-shell .nav-item[data-portal-page="tasks"] svg { background: linear-gradient(160deg,#ffb34a,#f58b18); }
.portal-shell .nav-item[data-portal-page="templates"] svg { background: linear-gradient(160deg,#bd85fa,#9458e9); }
.portal-shell .nav-item[data-portal-page="calls"] svg { background: linear-gradient(160deg,#54cd9a,#20a976); }
.portal-shell .nav-item[data-portal-page="account"] svg { background: linear-gradient(160deg,#a4a9b3,#7b818d); }
.portal-header { justify-content: space-between; gap: 16px; }
.portal-content { overflow: auto; }
.portal-content > div { height: 100%; }
.portal-panel > [data-list] { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.portal-table td { overflow-wrap: anywhere; }
.portal-table td:last-child { text-align: center; }
.portal-table td .portal-text-button { margin: 0 6px; white-space: nowrap; }
.portal-text-button.is-danger { color: #ff3b30; }
.portal-status { color: #989eaa; }
.portal-status.is-online { color: #29944b; }
.portal-task-account { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #edf0f4; align-items: center; }
[data-accounts] { max-height: 200px; overflow: auto; margin-top: 8px; }
.portal-panel { display: flex; flex-direction: column; height: 100%; min-height: 430px; min-width: 0; overflow: hidden; border: 1px solid rgba(60,60,67,.10); border-radius: 18px; background: var(--apple-panel); box-shadow: 0 7px 24px rgba(36,47,71,.045); }
.portal-panel .user-toolbar { flex-shrink: 0; }
.portal-panel .user-toolbar-actions { margin-left: auto; }
.portal-toolbar-select { min-width: 120px; margin-left: auto; }
.portal-toolbar-select + .user-toolbar-actions { margin-left: 0; }
.portal-field.portal-sip-import textarea,
.portal-field.portal-sip-export textarea { grid-column: 1 / -1; width: 100%; min-height: 220px; font-family: "SFMono-Regular", Consolas, monospace; line-height: 1.8; }
.portal-sip-import-guide { margin-left: 0 !important; }
.portal-sip-toolbar { flex-wrap: wrap; gap: 12px; }
.portal-sip-selected { color: #9299a6; font-size: 12px; white-space: nowrap; }
.portal-transfer-actions { display: flex; align-items: center; gap: 8px; margin-left: 6px; padding-left: 14px; border-left: 1px solid #e4e7ed; }
.portal-sip-scope { margin: 0 0 12px; color: #8b929f; font-size: 12px; overflow-wrap: anywhere; }
.portal-table-area { flex: 1; position: relative; overflow: auto; min-height: 280px; }
.portal-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.portal-table th { position: sticky; top: 0; z-index: 1; height: 42px; padding: 0 14px; font-size: 12px; font-weight: 600; color: #797b82; text-align: left; white-space: nowrap; background: #f7f8fa; border-bottom: 1px solid var(--apple-line); }
.portal-table th:last-child { text-align: center; }
.portal-table .portal-check { width: 48px; padding: 0 16px; }
.portal-table td { height: 54px; padding: 10px 14px; font-size: 13px; border-bottom: 1px solid var(--apple-line); }
.portal-empty { min-height: 230px; padding: 50px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; color: #a0a5af; }
.portal-empty svg { width: 42px; height: 42px; color: #c6cbd5; margin-bottom: 5px; stroke-width: 1.1; }
.portal-empty strong { color: #8d929d; font-size: 13px; font-weight: 500; }
.portal-empty span { font-size: 12px; color: #b0b4bd; }
.portal-pagination { flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid #edf0f4; padding: 12px 18px; min-height: 54px; font-size: 11px; color: #969ba5; }
.portal-pagination > div { display: flex; align-items: center; gap: 14px; }
.portal-pagination button { padding: 6px 10px; border: 0; border-radius: 7px; background: #f3f4f7; color: #9297a2; font-size: 11px; }
.portal-call-toolbar { flex-wrap: wrap; }
.portal-call-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.portal-call-filters .apple-control-trigger { min-width: 105px; }
.portal-call-filters .apple-date-trigger { min-width: 125px; }
.portal-modal { padding: 24px; }
.portal-modal .user-modal-dialog { width: min(480px,calc(100vw - 40px)); max-height: calc(100dvh - 48px); display: flex; flex-direction: column; border-radius: 24px; }
.portal-modal .portal-dialog-wide { width: min(720px,calc(100vw - 40px)); }
.portal-modal .portal-confirm-dialog { width: min(360px,calc(100vw - 40px)); }
.portal-confirm-dialog .portal-dialog-body { padding: 26px 24px 20px; text-align: center; }
.portal-confirm-dialog h2 { margin: 0 0 10px; color: #272d38; font-size: 18px; font-weight: 600; }
.portal-confirm-copy { margin: 0; color: #8b929f; font-size: 13px; line-height: 1.6; }
.portal-confirm-actions { display: flex; gap: 10px; margin-top: 24px; }
.portal-confirm-actions button { flex: 1; min-height: 42px; border: 0; border-radius: 11px; background: #f0f2f6; color: #505762; font: inherit; font-size: 13px; cursor: pointer; }
.portal-confirm-actions button.is-danger { background: #ff3b30; color: white; }
.portal-confirm-actions button:disabled { opacity: .5; cursor: default; }
.portal-confirm-dialog .portal-form-error { text-align: left; }
.portal-sip-history-toolbar { display: flex; align-items: center; justify-content: flex-end; align-self: flex-end; gap: 8px; }
.portal-sip-history-toolbar .apple-date-trigger { min-width: 135px; }
.portal-modal .user-modal-dialog:has(.portal-sip-history-window) { width: min(680px,calc(100vw - 40px)); height: min(660px,calc(100dvh - 48px)); }
.portal-modal .user-modal-dialog:has(.portal-sip-history-window) > .portal-dialog-close-only { display: flex; justify-content: space-between; min-height: 68px; padding: 20px 24px 12px; border: 0; background: transparent; }
.portal-modal .user-modal-dialog:has(.portal-sip-history-window) > .portal-dialog-close-only h2 { text-align: left; font-size: 21px; font-weight: 650; }
.portal-modal .user-modal-dialog:has(.portal-sip-history-window) .portal-dialog-close { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; padding: 0; border-radius: 50%; background: #f2f3f6; color: #85878e; }
.portal-modal .user-modal-dialog:has(.portal-sip-history-window) .portal-dialog-close svg { width: 16px; height: 16px; }
.portal-modal .user-modal-dialog:has(.portal-sip-history-window) .portal-dialog-close:focus-visible { outline: 2px solid #007aff; outline-offset: 3px; }
.portal-modal .portal-dialog-body:has(.portal-sip-history-window) { display: flex; flex: 1; overflow: hidden; padding: 0 24px 24px; }
.portal-sip-history-window { display: flex; flex-direction: column; flex: 1; gap: 16px; min-width: 0; min-height: 0; }
.portal-sip-history-table { flex: 1; overflow: auto; min-height: 0; border: 1px solid var(--apple-line); border-radius: 13px; scrollbar-width: thin; }
.portal-sip-history-table .portal-table { min-width: 480px; }
.portal-sip-history-table .portal-table th { height: 40px; padding: 0 8px; font-size: 12px; font-weight: 500; }
.portal-sip-history-table .portal-table td { height: 54px; padding: 10px 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.portal-sip-history-table .portal-table th:last-child,
.portal-sip-history-table .portal-table td:last-child { text-align: right; padding-right: 12px; }
.portal-sip-history-table td small { display: block; margin-top: 3px; color: #a0a5af; font-size: 11px; }
.portal-sip-call-result { display: inline-flex; align-items: center; gap: 6px; color: #d9342b; white-space: nowrap; }
.portal-sip-call-result::before { content: ""; width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: currentColor; }
.portal-sip-call-result[data-tone="connected"] { color: #248a3d; }
.portal-sip-call-result[data-tone="waiting"] { color: #d58a14; }
.portal-sip-history-state { flex-shrink: 0; margin: 0; color: #a0a5af; text-align: center; font-size: 12px; }
.portal-sip-history-window > [data-history-retry] { flex-shrink: 0; align-self: center; }
.portal-sip-history-footer { display: flex; flex-shrink: 0; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 2px; }
.portal-sip-history-footer .portal-pagination { justify-content: flex-start; flex-wrap: wrap; gap: 8px 14px; min-height: 0; padding: 0; border: 0; }
.portal-sip-history-footer .portal-pagination > div { gap: 8px; }
.portal-sip-history-footer .portal-pagination button { padding: 5px 8px; }
.portal-sip-summary { display: flex; gap: 16px; min-width: 0; margin-left: auto; color: #797b82; font-size: 12px; }
.portal-sip-summary > div { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.portal-sip-summary > div + div { border-left: 1px solid var(--apple-line); padding-left: 16px; }
.portal-sip-summary span { white-space: nowrap; }
.portal-sip-summary strong { color: #17181b; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.portal-modal .user-modal-dialog > header { flex-shrink: 0; }
.portal-dialog-body { padding: 18px 20px 20px; overflow: auto; min-height: 0; }
.portal-field { display: grid !important; grid-template-columns: minmax(0,1fr); align-items: start; gap: 7px; margin: 0 0 14px; padding: 0; border: 0; font-size: 13px; color: #55575e; }
.portal-field:last-of-type { border-bottom: 0; }
.portal-field:has(textarea) { align-items: start; }
.portal-field:has(textarea) > span { padding-top: 0; }
.portal-field input,
.portal-field textarea,
.portal-account-select input[type="search"] { width: 100%; min-width: 0; border: 1px solid rgba(60,60,67,.14); border-radius: 12px; padding: 10px 12px; background: #f6f7f9; color: #17181b; font: inherit; outline: none; box-sizing: border-box; }
.portal-field input { min-height: 42px; }
.portal-field textarea { resize: vertical; line-height: 1.65; min-height: 75px; }
.portal-field input:focus,
.portal-field textarea:focus,
.portal-account-select input[type="search"]:focus { border-color: #84b9f5; box-shadow: 0 0 0 3px #007aff0c; background: #fff; }
.portal-field input::placeholder,
.portal-field textarea::placeholder,
.portal-account-select input[type="search"]::placeholder { color: #a4a9b3; }
.portal-field .apple-control-wrap { width: 100%; }
.portal-field .apple-control-trigger { width: 100%; min-height: 42px; }
.portal-field-note { margin: 6px 0 10px; color: #85878e; font-size: 12px; line-height: 1.6; }
.portal-form-error { margin: 14px 0 0; font-size: 12px; color: #b17b30; line-height: 1.5; }
.portal-scope { margin: 0 0 12px; padding: 11px 13px; border-radius: 10px; background: #f3f6fc; color: #778297; font-size: 12px; }
.portal-time-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.portal-time-grid .portal-field { grid-template-columns: minmax(0,1fr); }
.portal-text-button { padding: 3px 0; border: 0; background: none; color: #007aff; font-size: 12px; cursor: pointer; }
.portal-number-count { margin: 5px 0 0; font-size: 11px; color: #85878e; }
.portal-number-count.is-error { color: #d18a35; }
.portal-account-select { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 16px; font-size: 13px; padding: 13px 0; border-bottom: 1px solid #eef0f4; }
.portal-account-select > span { padding-top: 11px; }
.portal-small-empty { padding: 18px 12px; border: 1px solid #e7eaf0; border-radius: 10px; margin-top: 8px; text-align: center; color: #a3a9b3; font-size: 12px; }
.portal-task-form, .portal-task-group { display: grid; min-width: 0; }
.portal-task-form { gap: 16px; }
.portal-task-group { gap: 10px; }
.portal-task-group + .portal-task-group { padding-top: 14px; border-top: 1px solid var(--apple-line); }
.portal-task-group h3 { margin: 0; color: #242630; font-size: 14px; font-weight: 650; }
.portal-task-form .portal-field { min-width: 0; margin: 0; gap: 5px; }
.portal-task-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 10px 14px; }
.portal-task-upload { align-items: end; }
.portal-task-switch, .portal-task-switches, .portal-task-heading { display: flex; align-items: center; }
.portal-task-switch { gap: 8px; min-height: 30px; color: #55575e; font-size: 13px; }
.portal-task-switch input[type=checkbox] { appearance: none; position: relative; width: 42px; min-width: 42px; height: 26px; border: 0; border-radius: 15px; margin: 0; padding: 0; background: #a5a8af; cursor: pointer; }
.portal-task-switch input[type=checkbox]:checked { background: #17834c; }
.portal-task-switch input[type=checkbox]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: white; box-shadow: 0 1px 3px #0002; }
.portal-task-switch input[type=checkbox]:checked::after { margin: 0; border: 0; transform: translateX(16px); }
.portal-task-switch input:focus-visible { outline: 3px solid #5b9de8; outline-offset: 2px; }
.portal-task-switches { gap: 20px; flex-wrap: wrap; }
.portal-task-heading { justify-content: space-between; flex-wrap: wrap; gap: 2px 16px; }
.portal-task-chat { display: flex; align-items: end; gap: 12px; }
.portal-task-chat .portal-field { flex: 1; }
.portal-task-chat button { min-height: 42px; padding: 0 10px; }
.portal-task-form [data-notify-status] { margin-bottom: 0; }
.portal-task-form .portal-time-grid { gap: 10px 14px; }
.portal-task-voice { min-width: 0; }
.portal-voice-preview-status { margin: 6px 0 0; color: #85878e; font-size: 11px; line-height: 1.5; }
.portal-task-form .portal-account-select { display: grid; grid-template-columns: minmax(0,1fr); padding: 0; border: 0; gap: 7px; }
.portal-task-form .portal-account-select > span { padding: 0; color: #55575e; }
.portal-segmented { display: flex; gap: 3px; padding: 3px; border-radius: 11px; background: rgba(118,118,128,.10); }
.portal-segmented button { flex: 1; min-height: 34px; border: 0; border-radius: 8px; background: transparent; color: #797b82; font-size: 13px; cursor: pointer; }
.portal-segmented button[aria-pressed="true"] { color: #17181b; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.10); }
.portal-task-account-count { margin: 6px 0 0; color: #797b82; font-size: 11px; }
.portal-task-account-tools { display: flex; align-items: center; gap: 7px; margin-top: 9px; }
.portal-task-account-tools input { flex: 1; min-width: 0; height: 35px; font-size: 12px; }
.portal-task-account-tools button { flex: 0 0 auto; min-height: 32px; padding: 0 10px; border: 0; border-radius: 9px; background: rgba(118,118,128,.09); color: #0a84ff; font-size: 12px; cursor: pointer; }
.portal-task-form [data-accounts] { max-height: 154px; border: 1px solid var(--apple-line); border-radius: 12px; }
.portal-task-account { cursor: pointer; margin: 0; color: #41434a; font-size: 13px; }
.portal-task-account input[type="checkbox"] { width: 16px; height: 16px; min-width: 16px; padding: 0; border-radius: 4px; }
.portal-task-account small { margin-left: auto; font-size: 11px; }
.portal-task-concurrency { position: relative; }
.portal-task-concurrency .portal-field { margin-bottom: 0; }
.portal-task-concurrency .portal-field > span { padding-right: 75px; }
.portal-task-limit { position: absolute; top: 0; right: 0; margin: 0; color: #85878e; font-size: 11px; line-height: 1.5; }
.portal-task-file-field { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; min-height: 64px; padding: 12px; border-radius: 13px; background: rgba(118,118,128,.07); }
.portal-task-form .portal-task-file-field { display: flex !important; margin: 0; }
.portal-task-file-field > div { min-width: 0; }
.portal-task-file-info { flex: 1; }
.portal-task-file-info .portal-number-count { margin: 0; color: #41434a; font-size: 13px; font-weight: 600; line-height: 1.5; }
.portal-task-file-details { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 4px; color: #85878e; font-size: 11px; overflow-wrap: anywhere; }
.portal-task-file-details > span { min-width: 0; overflow-wrap: anywhere; }
.portal-task-file-details small { margin: 0; font-size: inherit; }
.portal-task-file-field label,
.portal-task-file-field strong { font-size: 13px; font-weight: 600; }
.portal-task-file-field small { display: block; color: #85878e; font-size: 11px; }
.portal-file-picker { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-height: 36px; max-width: 100%; padding: 0 13px; overflow: hidden; border-radius: 10px; background: rgba(10,132,255,.10); color: #0a84ff; cursor: pointer; }
.portal-file-picker input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.portal-file-picker:focus-within { outline: 3px solid rgba(10,132,255,.24); outline-offset: 2px; }
.portal-task-progress { grid-column: 1 / -1; flex: 1 0 100%; margin: 0; font-size: 11px; color: #797b82; overflow-wrap: anywhere; }
.portal-task-file-field .is-error { color: #e9382f; }
/* Tasks share column alignment on desktop and stack their metadata on a phone. */
.portal-task-grid { flex: 1; min-height: 0; overflow: auto; }
.portal-task-card, .task-columns { display: grid; grid-template-columns: minmax(140px,2.2fr) minmax(80px,.8fr) minmax(66px,.6fr) minmax(110px,1fr) minmax(124px,auto); align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--apple-line); }
.task-columns { position: sticky; top: 0; z-index: 1; background: #f7f8fa; color: #666b74; font-size: 12px; }
.task-columns span:last-child { text-align: right; }
.portal-task-card { background: white; font-size: 13px; }
.portal-task-card h2 { margin: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.portal-task-card small { display: block; margin-top: 3px; color: #676d78; font-size: 12px; overflow-wrap: anywhere; }
.task-progress, .task-lines { font-variant-numeric: tabular-nums; }
.portal-task-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.portal-task-actions button { padding: 5px 6px; background: transparent; color: var(--apple-accent); border: 0; border-radius: 7px; cursor: pointer; font-size: 12px; }
.portal-task-actions [data-action="pause"], .portal-task-actions [data-start] { background: #edf4fe; color: #065caf; }
.task-status time { font-variant-numeric: tabular-nums; }
.portal-task-actions button:hover { background: #f1f3f6; }
.portal-task-actions .is-danger { color: #bf322b; }
.portal-task-card [data-task-state] { flex: 0 0 auto; padding: 4px 8px; border-radius: 8px; background: rgba(118,118,128,.08); font-size: 11px; }
.portal-task-card [data-task-state="running"],
.portal-task-card [data-task-state="queued"] { color: #0878e5; background: rgba(10,132,255,.09); }
.portal-task-card [data-task-state="paused"] { color: #b8790c; background: rgba(255,149,0,.09); }
.portal-task-card [data-task-state="completed"] { color: #16863b; background: rgba(52,199,89,.09); }
.template-segments { flex: 0 0 auto; }
.template-segments button { padding-inline: 13px; white-space: nowrap; }
.template-rows { flex: 1; min-height: 0; overflow: auto; margin: 0; padding: 0 18px; list-style: none; }
.template-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 2px; }
.template-row + .template-row { border-top: 1px solid var(--apple-line); }
.template-summary { min-width: 0; }
.template-summary h2 { margin: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.template-summary p { margin: 4px 0 0; color: #6b6d73; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.template-row-actions { display: flex; gap: 8px; flex-shrink: 0; }
.template-row-actions button { padding: 8px 4px; }
@media (max-width: 620px) {
  .template-toolbar .user-search { order: 3; flex: 0 0 100%; max-width: none; }
  .template-rows { padding-inline: 12px; }
  .template-row { gap: 8px; }
}
/* 05. 平板与手机：横向导航、独立内容滚动、单列表单。 */
@media (max-width:1100px) {
.portal-call-toolbar .user-search { width: 100%; }
.portal-call-filters { margin-left: 0; }
.portal-table { min-width: 620px; }
}
@media (max-width:760px) {
.portal-shell { width: 100%; height: 100dvh; margin: 0; border: 0; border-radius: 0; grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); }
.portal-shell .sidebar { display: block; position: relative; padding: 12px 14px 8px; border-right: 0; border-bottom: 1px solid var(--apple-line); }
.portal-shell .brand { padding: 0 2px 10px; min-height: 0; }
.portal-shell .brand strong { font-size: 17px; }
.portal-shell .brand small { display: none; }
.portal-shell .brand img { width: 32px; height: 32px; }
.portal-shell .nav-list { display: flex; gap: 5px; overflow-x: auto; }
.portal-shell .nav-item { display: flex; width: auto; min-width: 68px; flex: 1 0 auto; justify-content: center; min-height: 52px; padding: 5px 7px; flex-direction: column; gap: 4px; font-size: 11px; }
.portal-shell .nav-item svg { width: 27px; height: 27px; padding: 4px; border-radius: 7px; }
.portal-shell .nav-item span { display: block; }
.portal-shell .sidebar-contact { min-height: 28px; width: fit-content; margin: 6px 0 0 auto; padding: 4px 7px; font-size: 11px; }
.portal-content { padding: 14px; }
.portal-header { padding: 0 18px; }
.portal-panel .user-toolbar { flex-direction: row; align-items: center; flex-wrap: wrap; padding: 12px; gap: 10px; }
.portal-panel .user-search { width: 100%; }
.portal-panel .user-toolbar-actions { margin-left: auto; }
.portal-pagination { padding: 12px; }
.portal-pagination > div { gap: 8px; }
.portal-call-filters { gap: 6px; }
.portal-call-filters .apple-control-trigger { min-width: 96px; font-size: 11px; }
}
@media (max-width:520px) {
.portal-header { min-height: 58px; }
.portal-content { padding: 12px; }
.portal-panel { min-height: 420px; }
.portal-pagination button { padding: 5px 7px; }
.portal-modal { padding: 12px; align-items: center; }
.portal-modal .user-modal-dialog,
.portal-modal .portal-dialog-wide { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); border-radius: 21px; }
.portal-modal .portal-confirm-dialog { width: min(360px,calc(100vw - 24px)); }
.portal-dialog-body { padding: 16px; }
.portal-modal .user-modal-dialog:has(.portal-sip-history-window) > .portal-dialog-close-only { padding: 16px 18px 10px; }
.portal-modal .user-modal-dialog:has(.portal-sip-history-window) .portal-dialog-close { flex-basis: 36px; width: 36px; height: 36px; }
.portal-modal .portal-dialog-body:has(.portal-sip-history-window) { padding: 0 18px 18px; }
.portal-sip-history-footer .portal-pagination { width: 100%; justify-content: space-between; }
.portal-sip-summary { width: 100%; }
.portal-sip-summary > div { flex: 1; flex-direction: column; gap: 4px; }
.portal-field,
.portal-account-select { grid-template-columns: minmax(0,1fr); gap: 7px; font-size: 13px; }
.portal-field input,
.portal-field .apple-control-trigger { min-height: 42px; }
.portal-field-note,
.portal-number-count { margin-left: 0; }
.portal-time-grid { grid-template-columns: 1fr; gap: 0; }
.portal-task-pair { gap: 8px 10px; }
.portal-task-upload { grid-template-columns: minmax(0,1fr); }
.portal-task-switches { gap: 12px; }
.portal-task-concurrency .portal-field > span { padding-right: 0; }
.portal-task-concurrency .portal-task-limit { top: 2px; }
.portal-task-form .portal-time-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }

}
.portal-call-recording { margin: 0 0 14px; padding: 11px 12px; border: 1px solid var(--apple-line); border-radius: 12px; background: #f7f8fa; }
.portal-call-recording h3 { margin: 0 0 8px; color: #55575e; font-size: 12px; font-weight: 600; }
.portal-call-recording audio { display: block; width: 100%; height: 36px; }
.portal-recording-state { margin: 6px 0 0; color: #85878e; font-size: 11px; line-height: 1.5; }
.portal-conversation section {padding:14px 0;border-bottom:1px solid var(--border,#e5e7eb)}
.portal-conversation section:last-child {border-bottom:0}
.portal-conversation strong {font-size:12px;color:#7c8494}
.portal-conversation p {margin:6px 0 0;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}

@media (max-width: 1000px) {
  .task-columns { display: none; }
  .portal-task-card { grid-template-columns: minmax(0,1fr) auto; gap: 8px 12px; }
  .task-name { grid-area: 1 / 1; }
  .task-status { grid-area: 1 / 2; text-align: right; }
  .task-progress, .task-lines { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 7px; }
  .task-progress::before { content: "已拨"; }
  .task-progress small, .task-lines small { margin-top: 0; }
  .portal-task-actions { grid-column: 1 / -1; }
}
