/* Shared tokens and compact editing surfaces. */
.record-search { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; grid-column: 1 / -1; margin: 0 0 14px; width: 100%; }
.record-search input { flex: 1 1 240px; min-width: 0; max-width: 480px; }
.record-search > button { min-height: 38px; }
.record-search [data-search-count] { color: var(--muted); font-size: 12px; margin-left: auto; }
.record-search-empty { grid-column: 1 / -1; color: var(--muted); padding: 20px 0; }
.record-search-hidden, .record-search-empty[hidden] { display: none !important; }
html { --agent-busy-bg: #f5c7cd; --agent-busy-ink: #741c2b; }
html[data-theme="dark"] { --agent-busy-bg: #542332; --agent-busy-ink: #ffe3e7; }
#tab-status .compact-agent-row.busy > td,
#tab-status .agent-table .agent-row.busy > td {
  background: var(--agent-busy-bg);
  color: var(--agent-busy-ink);
}
#tab-status .compact-agent-row.busy .compact-agent-name > strong,
#tab-status .compact-agent-row.busy .compact-agent-name > span,
#tab-status .agent-row.busy .agent-identity > strong,
#tab-status .agent-row.busy .agent-identity > span {
  color: var(--agent-busy-ink);
}
.login-background { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
#loginView.login-shell { position:relative; isolation:isolate; overflow:hidden; }
#loginView .login-panel { position:relative; width:min(100%,460px); padding:32px; background:var(--surface); border:1px solid var(--line); border-top:3px solid #991b1b; border-radius:8px; box-shadow:0 20px 70px #00000018; }
#loginView .login-brand { margin-bottom:28px; }
@media(max-width:480px) { #loginView .login-panel { padding:24px; } }
.login-shell { min-height: 100dvh; padding: 32px 20px; background: var(--page); }
.login-shell .login-panel { width: min(100%, 420px); padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.login-panel::before { display: none; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 36px; color: var(--ink); }
.login-brand img { width: 48px; height: 48px; object-fit: contain; }
.login-brand strong { font-size: 26px; }
.login-panel .login-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.login-heading .login-mode-btn { display: flex; gap: 8px; align-items: center; justify-content: center; width: auto; height: 42px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; box-shadow: none; }
.login-heading .login-mode-btn.active { background: var(--surface-elevated); color: var(--ink); box-shadow: inset 0 -2px #991b1b; }
#adminLoginModeBtn::after { content: 'Console'; }
#extensionLoginModeBtn::after { content: 'Ramal'; }
.login-panel h1 { font-size: 26px; line-height: 1.2; margin: 6px 0 14px; color: var(--ink); }
.login-panel .eyebrow { color: var(--muted); }
.login-panel input { min-height: 48px; background: var(--control-bg); color: var(--ink); border-color: var(--line); }
.login-panel .primary-btn { min-height: 48px; margin-top: 8px; }
.signal-motion { display: inline-flex; align-items: center; justify-content: center; gap: 4px; width: 36px; height: 30px; margin-left: auto; color: #b94b50; }
.signal-motion span { width: 3px; height: 22px; border-radius: 2px; background: currentColor; transform: scaleY(.4); animation: pbx-signal 2.4s ease-in-out infinite; }
.signal-motion span:nth-child(2), .signal-motion span:nth-child(4) { animation-delay: -.4s; }
.signal-motion span:nth-child(3) { animation-delay: -.8s; }
.login-shell.hidden .signal-motion span { animation: none; }
.tab-page.active, .login-panel .form-stack:not(.hidden) { animation: pbx-enter 180ms ease-out; }
@keyframes pbx-enter { from { opacity: .3; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pbx-signal { 0%,100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .tab-page.active, .login-panel .form-stack:not(.hidden), .signal-motion span { animation: none; } }
html:not([data-theme="dark"]) {
  --page: #f4f4f5; --surface: #fff; --surface-soft: #fafafa; --surface-elevated: #f0f0f2;
  --control-bg: #fff; --line: #dddddf; --line-strong: #b8b8bf; --ink: #242428;
  --muted: #64646d; --muted-strong: #46464f; --subtle: #73737d; --placeholder: #777780;
  --table-head: #f5f5f6; --sidebar: #fafafa; --sidebar-deep: #f0f0f2;
  --sidebar-ink: #242428; --sidebar-muted: #64646d; --sidebar-line: #dddddf;
  --nav-text: #52525b; --nav-hover-bg: #eeeeef; --neutral-soft: #f0f0f2; --neutral-ink: #52525b;
  --shadow-soft: none;
}
html[data-theme="dark"] {
  --page: #111113; --surface: #1a1a1e; --surface-soft: #202024; --surface-elevated: #27272c;
  --control-bg: #18181c; --line: #38383f; --line-strong: #55555f; --ink: #eeeef0;
  --muted: #ababb5; --muted-strong: #d1d1d7; --subtle: #aaaab4; --placeholder: #94949f;
  --table-head: #232328; --sidebar: #18181b; --sidebar-deep: #202024;
  --sidebar-ink: #eeeef0; --sidebar-muted: #aaaab4; --sidebar-line: #38383f;
  --nav-text: #c2c2ca; --nav-hover-bg: #27272c; --shadow-soft: none;
}
body { line-height: 1.45; letter-spacing: 0; }
button, input, select, textarea { font-weight: 500 !important; }
h1, h2, h3, h4, strong, b, .field-title { font-weight: 600; letter-spacing: 0; }
.topbar h2 { font-size: 20px; }
.panel h3, .compact-card-header h3 { font-size: 15px; }
.panel-header { gap: 12px; flex-wrap: wrap; }
.panel-header p { margin-top: 4px; }
.field-block, .field-grid > *, .inline-form > * { min-width: 0; }
.field-block label, .field-title, .field-grid label { font-weight: 500; font-size: 12px; }
.primary-btn, .call-btn { box-shadow: none !important; }
.primary-btn { background: #991b1b; border-color: #991b1b; color: #fff; }
.primary-btn:hover { background: #7f1d1d; }
.secondary-btn:hover, .icon-btn:hover { border-color: var(--line-strong); background: var(--surface-elevated); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tab-page > .section-grid > .panel:has(.extension-grid),
.tab-page > .section-grid > .panel:has(.trunk-grid) { padding: 0; border: 0; background: transparent; box-shadow: none; }
.extension-grid, .trunk-grid { gap: 12px; }
.extension-card, .trunk-config-card, .queue-config-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: none; }
.compact-card-header { background: transparent; margin-bottom: 12px; }
.compact-card-header .badge { background: var(--surface-elevated); color: var(--muted-strong); }
.trunk-card-statuses { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 6px; }
.trunk-registration-status { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 9px; border-radius: 5px; background: var(--surface-elevated); color: var(--muted-strong); font-size: 11px; font-weight: 700; white-space: nowrap; }
.trunk-registration-status[data-state="registered"] { background: var(--success-soft); color: var(--success-ink); }
.trunk-registration-status[data-state="rejected"] { background: var(--danger-soft); color: var(--danger-ink); }
.trunk-registration-status[data-state="unregistered"] { background: var(--warning-soft); color: var(--warning-ink); }
.compact-field-grid { gap: 12px; grid-template-columns: repeat(4,minmax(0,1fr)); }
.compact-field-grid .wide { grid-column: span 2; }
.compact-field-grid .full { grid-column: 1 / -1; }
.local-save-bar { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 10px; padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--line); }
.local-save-bar button { flex: 0 0 auto; min-height: 34px; }
.local-save-status { flex: 1 1 180px; color: var(--muted); font-size: 12px; }
.local-save-status[data-tone="ok"] { color: var(--success-ink); }
.local-save-status[data-tone="error"] { color: var(--danger-ink); }
.queue-create-form { grid-template-columns: repeat(3,minmax(0,1fr)); }
.queue-create-form > button { align-self: end; }
.report-stat { min-width: 0; }
.recording-row { background: var(--surface); }
.microcopy, .table-meta { background: transparent; color: var(--muted); font-weight: 400; }
.help-icon { opacity: .7; }
@media(max-width:1050px) { .compact-field-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
.entity-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 12px;
}
.entity-list-card,
.trunk-list-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.list-card-meta {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.list-card-meta span { display: grid; gap: 2px; min-width: 0; }
.list-card-meta strong { color: var(--muted-strong); font-size: 11px; }
.entity-editor-shell { display: grid; gap: 16px; }
.entity-editor-header { margin-bottom: 0; align-items: flex-start; }
.entity-editor-header > div { min-width: 0; }
.entity-editor-shell .local-save-bar { margin-top: 0; }
.trunk-list-card .compact-card-actions,
.entity-list-card .compact-card-actions { justify-content: flex-end; }
@media(max-width:620px) {
  .compact-field-grid, .queue-create-form { grid-template-columns: minmax(0,1fr); }
  .compact-field-grid .wide { grid-column: 1; }
  .compact-card-actions { flex-wrap: wrap; }
  .topbar h2 { font-size: 18px; }
}

.tab-page .governance-shell { grid-template-columns: minmax(0, 1fr); }
.tab-page .governance-shell > * { grid-column: 1 / -1; width: 100%; min-width: 0; }
.governance-summary { display: grid; grid-column: 1 / -1; width: 100%; grid-template-columns: repeat(4, minmax(0, 1fr)); }
#tab-security .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#tab-security .field-grid > label { grid-column: auto; }
#tab-security .field-grid > .wide { grid-column: 1 / -1; }
html[data-theme="dark"] .tab-page .eyebrow { color: #d9afb0; }
@media(max-width:620px) {
  .governance-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #tab-security .field-grid { grid-template-columns: minmax(0, 1fr); }
}
.strategy-toolbar { flex-wrap: wrap; gap: 16px; }
.strategy-filter-bar { flex-wrap: wrap; justify-content: flex-end; }
.strategy-filter-bar .command-filter-field { min-width: 210px; flex: 1 1 210px; }
.strategy-filter-bar .command-filter-field:first-child { min-width: 180px; flex-basis: 180px; }
.dialer-result-list > .warning { display: inline-flex; padding: 0; margin: 0; border: 0; background: transparent; box-shadow: none; }
.dialer-result-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; min-width: 0; line-height: 1.35; }
.dialer-result-list > span, .dialer-result-list > .warning { display: block; white-space: normal; overflow-wrap: anywhere; }
.dialer-result-list strong { display: inline-block; min-width: 18px; }
.dialer-trunk-warning { color: #efae76; line-height: 1.4; }
.dialer-report-modal { width: min(1100px, calc(100vw - 32px)); max-height: min(88vh, 900px); display: flex; flex-direction: column; overflow: hidden; }
.dialer-report-modal .dialer-report-content { overflow: auto; min-height: 0; display: grid; gap: 22px; padding: 18px 0; }
.dialer-report-modal footer { display: flex; justify-content: flex-end; padding-top: 14px; border-top: 1px solid var(--line); }
.dialer-report-progress { margin: 0; color: var(--muted-strong); font-size: 13px; }
.dialer-report-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dialer-report-summary span { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 0 0 12px; border-bottom: 1px solid var(--line); font-size: 12px; }
.dialer-report-summary b { font-size: 12px; }
.dialer-report-summary small { color: var(--muted); line-height: 1.4; }
.dialer-report-summary strong { font-size: 20px; }
.dialer-report-summary .success strong { color: #62c99a; }
.dialer-report-summary .danger strong { color: #e4787d; }
.dialer-report-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dialer-report-modal h4 { margin: 0 0 10px; font-size: 14px; }
.dialer-report-modal h4 small { margin-left: 8px; color: var(--muted); font-weight: 400; }
.dialer-report-table-wrap { overflow: auto; max-height: 250px; border: 1px solid var(--line); border-radius: 6px; }
.dialer-report-numbers { max-height: 310px; }
.dialer-report-modal table { width: 100%; border-collapse: collapse; font-size: 12px; }
.dialer-report-sections > section { min-width: 0; }
.dialer-report-sections table { min-width: 0; table-layout: fixed; }
.dialer-report-sections td { overflow-wrap: anywhere; }
.dialer-report-sections section:first-child th:last-child { width: 96px; }
.dialer-report-sections section:last-child th:first-child { width: 34%; }
.dialer-report-sections section:last-child th:last-child { width: 96px; }
.dialer-report-modal th, .dialer-report-modal td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.dialer-report-modal th { position: sticky; top: 0; background: var(--surface); white-space: nowrap; }
@media (max-width: 760px) { .dialer-report-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dialer-report-sections { grid-template-columns: minmax(0, 1fr); } }
@media(min-width:1400px) { .audit-filter-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.audio-picker { display: flex; align-items: center; gap: 8px; min-width: 0; }
.audio-picker select { flex: 1; min-width: 0; }
.audio-picker .icon-btn { flex: 0 0 40px; width: 40px; height: 40px; }
.command-filter-field > input, .command-filter-field > select, .command-search > input { flex: 1; min-width: 0; width: 100%; }
.command-filter-field > .help-icon, .command-search > .help-icon { flex: 0 0 22px; }
html .command-queue-card .compact-agent-row.paused,
html[data-theme="dark"] .command-queue-card .compact-agent-row.paused { background: #44351e; box-shadow: inset 4px 0 #e9b64a; }
html:not([data-theme="dark"]) .command-queue-card .compact-agent-row.paused { background: #fff0c9; box-shadow: inset 4px 0 #9b6500; }
html .command-queue-card .compact-agent-row.paused .pause-value { color: #f6cf74; font-weight: 700; }
html:not([data-theme="dark"]) .command-queue-card .compact-agent-row.paused .pause-value { color: #765000; }
/* Repeated records belong to their own grid, not the twelve-column page grid. */
.entity-list-grid > .panel,
.ivr-list-grid > .panel,
.extension-grid > .entity-list-card,
.trunk-grid > .trunk-list-card { grid-column: auto; min-width: 0; width: auto; margin: 0; }
.ivr-list-grid, .extension-grid, .trunk-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.section-grid > .ivr-list-grid { grid-column: 1 / -1; }
.tab-page .entity-list-card, .tab-page .trunk-list-card, .tab-page .ivr-list-card {
  padding: 18px; gap: 14px; box-shadow: none; align-content: start;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
}
.tab-page .entity-list-card, .tab-page .trunk-list-card, .tab-page .ivr-list-card { display: flex; flex-direction: column; }
.entity-list-card .compact-card-actions, .trunk-list-card .compact-card-actions, .ivr-list-card .compact-card-actions { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.entity-list-card h3, .trunk-list-card h3, .ivr-list-card h3 { font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.entity-list-card .list-card-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.list-card-meta span, .ivr-list-meta span { overflow-wrap: anywhere; }
.entity-list-card .panel-header { margin: 0; padding: 0; border: 0; }
.tab-page > .section-grid > .panel:has(> .entity-list-grid),
.tab-page > .section-grid > .panel:has(> .ivr-list-grid) { border: 0; padding: 0; background: transparent; box-shadow: none; }
.tab-page > .section-grid > .entity-editor-shell { border: 0; padding: 0; background: transparent; box-shadow: none; }
.entity-editor-shell > .panel { border: 0; padding: 0; box-shadow: none; background: transparent; }
.entity-editor-header { padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.tab-page .entity-editor-shell { grid-template-columns: minmax(0, 1fr); max-width: none; width: 100%; min-width: 0; }
.tab-page .entity-editor-shell > * { grid-column: 1 / -1; min-width: 0; }
/* Compact forms must not inherit the old twelve-column field spans. */
.tab-page .entity-editor-shell .field-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.tab-page .compact-field-grid > label,
.tab-page .entity-editor-shell .field-grid > label { grid-column: auto; }
.tab-page .compact-field-grid > .wide,
.tab-page .entity-editor-shell .field-grid > .wide { grid-column: span 2; }
.tab-page .compact-field-grid > .full,
.tab-page .entity-editor-shell .field-grid > .full { grid-column: 1 / -1; }
.tab-page .entity-editor-shell > .extension-card,
.tab-page .entity-editor-shell > .trunk-config-card { border: 0; padding: 0; background: transparent; }
.tab-page .queue-config-card .field-grid:first-child { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tab-page .queue-config-card .field-grid:first-child > .wide { grid-column: 1 / -1; }
.user-permission-option { grid-template-columns: 18px minmax(0, 1fr) 22px; }
.user-permission-option .help-icon { margin: 0; }
.entity-editor-shell .local-save-bar { padding: 16px 0 0; }
.tab-page:not(#tab-security):not(#tab-logs):not(#tab-audit) .panel-header :is(.hint, .microcopy),
.tab-page:not(#tab-security):not(#tab-logs):not(#tab-audit) .entity-editor-header .microcopy { display: none; }
.tab-page .panel-header .eyebrow { color: var(--muted); font-size: 10px; }
.field-title { display: flex; align-items: center; gap: 6px; }
.help-icon { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; width: 22px; height: 22px; min-width: 22px; padding: 3px; margin: 0 4px; border: 0; border-radius: 50%; color: var(--muted); background: transparent; cursor: help; opacity: 1; }
.help-icon svg { width: 15px; height: 15px; pointer-events: none; }
.help-icon:hover, .help-icon:focus-visible, .help-icon[aria-expanded="true"] { color: var(--ink); background: var(--surface-elevated); }
.field-help-tooltip { position: fixed; z-index: 100000; max-width: min(320px, calc(100vw - 24px)); padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); box-shadow: 0 6px 24px #00000026; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; pointer-events: none; }
.field-help-tooltip[hidden] { display: none; }
.field-grid label > input:not([type="checkbox"]), .field-grid label > select, .field-grid label > textarea { margin-top: 6px; }
.tab-page table th { font-size: 11px; font-weight: 600; }
.tab-page .table-wrap { border-radius: 6px; }
.tab-page .entity-list-card:hover, .tab-page .trunk-list-card:hover, .tab-page .ivr-list-card:hover { border-color: var(--line-strong); }
.compact-card-actions > button { min-height: 34px; }
.routing-advanced > summary { cursor: pointer; color: var(--ink); font-size: 14px; font-weight: 600; }
.routing-advanced[open] > summary { margin-bottom: 20px; }
.routing-advanced > .section-grid > .panel { border: 0; padding: 0; box-shadow: none; background: transparent; }
.tab-page .user-permission-option { display: flex; gap: 8px; }
.user-permission-option > span { flex: 1; }
@media(max-width:1100px) {
  .tab-page .entity-editor-shell .field-grid,
  .tab-page .queue-config-card .field-grid:first-child { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media(max-width:620px) {
  .entity-list-grid, .ivr-list-grid, .extension-grid, .trunk-grid { grid-template-columns: minmax(0, 1fr); }
  .entity-editor-header .compact-card-actions { width: 100%; justify-content: flex-start; }
  .tab-page .entity-editor-shell .field-grid,
  .tab-page .queue-config-card .field-grid:first-child { grid-template-columns: minmax(0, 1fr); }
  .tab-page .compact-field-grid > label,
  .tab-page .compact-field-grid > .wide,
  .tab-page .entity-editor-shell .field-grid > label,
  .tab-page .entity-editor-shell .field-grid > .wide { grid-column: 1 / -1; }
  .tab-page .entity-list-card, .tab-page .trunk-list-card { padding: 16px; }
}
:root .dialer-trunk-picker { min-width: 0; margin: 0; padding: 0; border: 0; }
.dialer-trunk-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 8px; margin-top: 10px; }
.dialer-form .dialer-trunk-choice { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid #62626b; border-radius: 6px; cursor: pointer; min-width: 0; }
.dialer-form .dialer-trunk-choice input { width: 18px; height: 18px; min-height: 0; margin: 0; flex: 0 0 18px; accent-color: #c93b47; }
.dialer-trunk-choice > span { overflow-wrap: anywhere; }
.dialer-trunk-choice:has(input:checked) { border-color: #db6470; background: rgba(201, 59, 71, .12); }
.dialer-trunk-choice:focus-within { outline: 2px solid #db6470; outline-offset: 2px; }
.dialer-trunk-selected { margin-left: auto; visibility: hidden; font-size: 11px; }
.dialer-trunk-choice:has(input:checked) .dialer-trunk-selected { visibility: visible; }

/* The campaign editor has its own rhythm; generic entity spans made it look fragmented. */
.tab-page .entity-editor-shell .dialer-form { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px 20px; }
.dialer-form-section-title { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.dialer-form-section-title::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.tab-page .entity-editor-shell .dialer-form > .dialer-field-name { grid-column: span 3; }
.tab-page .entity-editor-shell .dialer-form > .dialer-field-audio { grid-column: span 4; }
.tab-page .entity-editor-shell .dialer-form > .dialer-field-digit { grid-column: span 2; }
.tab-page .entity-editor-shell .dialer-form > .dialer-field-caller { grid-column: span 3; }
.tab-page .entity-editor-shell .dialer-form > .dialer-field-destination,
.tab-page .entity-editor-shell .dialer-form > .dialer-trunk-picker { grid-column: span 6; }
.tab-page .entity-editor-shell .dialer-form > .dialer-field-metric { grid-column: span 3; }
.tab-page .entity-editor-shell .dialer-form > .dialer-field-description { grid-column: span 4; }
.tab-page .entity-editor-shell .dialer-form > .dialer-field-numbers { grid-column: span 8; }
.dialer-form .dialer-trunk-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dialer-form textarea { min-height: 122px; resize: vertical; }
.dialer-form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; padding-top: 2px; border-top: 0; }

@media(max-width:1100px) {
  .tab-page .entity-editor-shell .dialer-form > label,
  .tab-page .entity-editor-shell .dialer-form > .dialer-trunk-picker { grid-column: span 6; }
  .tab-page .entity-editor-shell .dialer-form > .dialer-field-numbers { grid-column: 1 / -1; }
}

@media(max-width:700px) {
  .tab-page .entity-editor-shell .dialer-form > label,
  .tab-page .entity-editor-shell .dialer-form > .dialer-trunk-picker { grid-column: 1 / -1; }
  .dialer-form .dialer-trunk-options { grid-template-columns: minmax(0, 1fr); }
  .dialer-form-actions .primary-btn { width: 100%; justify-content: center; }
}

.webphone-number-row { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 8px; }
.webphone-number-row input { min-width: 0; }
.webphone-number-row .icon-btn { width: 48px; min-height: 56px; }
.webphone-audio-bar { display: grid; grid-template-columns: 20px minmax(0, 1fr) 40px; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--soft); }
.webphone-audio-bar > svg { width: 18px; height: 18px; color: var(--muted); }
.webphone-audio-bar input[type="range"] { min-height: 28px; padding: 0; }
.webphone-audio-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--soft); }
.webphone-audio-settings label { display: grid; gap: 6px; min-width: 0; font-size: 12px; color: var(--muted); }
.webphone-audio-settings .secondary-btn { grid-column: 1 / -1; justify-self: end; }
@media(max-width:620px) { .webphone-audio-settings { grid-template-columns: minmax(0, 1fr); } }
