/* Operational screens inherit the existing palette, cards and keyboard controls. */
.operations-view, .ops-results, .ops-case-editor { display: grid; gap: 18px; min-width: 0; }
.ops-toolbar { display: flex; justify-content: flex-end; flex-wrap: wrap; align-items: center; gap: 9px; }
#panel-view:has([data-view="clients"][aria-current="page"]) .page-heading {
  display: flex; flex-wrap: wrap; align-items: center;
}
#panel-view:has([data-view="clients"][aria-current="page"]) #page-description { display: none; }
.ops-filters { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,180px),1fr)); gap: 13px; align-items: end; }
.ops-field { display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 0; margin: 0; color: var(--ink); font-size: .82rem; font-weight: 600; }
.ops-field > span { line-height: 1.4; }
.ops-field > small { font-size: .76rem; color: var(--muted); font-weight: 400; line-height: 1.5; }
.ops-field input, .ops-field textarea, .ops-field select { min-width: 0; width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid #cbd8cb; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-weight: 400; }
.ops-field textarea { resize: vertical; min-height: 86px; }
.ops-field input:disabled, .ops-field textarea:disabled { color: #68796b; background: #f1f4ef; }
.ops-field .cas-select { display: grid; width: 100%; }
/* Pagination uses a horizontal label: its select flex-basis must size width, not height. */
.ops-pagination > .ops-field { flex-direction: row; align-items: center; gap: 8px; }
.ops-pagination > .ops-field > .cas-select { width: 85px; }
.ops-checkbox { flex-direction: row; align-items: center; justify-content: flex-start; gap: 9px; font-weight: 500; }
.ops-checkbox > input { order: -1; width: 18px; height: 18px; min-height: 18px; flex: 0 0 18px; accent-color: #548444; }
.ops-form { display: grid; gap: 18px; min-width: 0; }
.ops-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; min-width: 0; padding: 0; margin: 0; border: 0; }
.ops-form-message:empty, .ops-list-status:empty { display: none; }
.ops-form-message .form-error, .ops-list-status .form-error { margin: 0; }
.ops-form-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.ops-error { display: grid; gap: 10px; }
.ops-error > .button { justify-self: start; white-space: normal; }
.ops-notice { color: var(--muted); font-size: .83rem; line-height: 1.55; overflow-wrap: anywhere; }
.ops-card { display: grid; gap: 16px; padding: 21px; }
.ops-card > h2 { font-size: 1.08rem; line-height: 1.3; }
#account-password-panel > form { margin-top:18px; }
.ops-card > .button { justify-self: start; }
.ops-handling-head { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px 18px; min-width:0; }
.ops-handling-head > h2 { margin:0; min-width:0; font-size:1.08rem; line-height:1.3; text-align:left; overflow-wrap:anywhere; }
.ops-handling-head > .button { justify-self:end; min-height:44px; max-width:170px; white-space:normal; }
.ops-case-client-head > .button { min-height:35px; max-width:100%; white-space:nowrap; }
@media(max-width:480px) { .ops-case-client-head { grid-template-columns:minmax(0,1fr); } .ops-case-client-head > .button { white-space:normal; } }
.ops-handling-card .ops-form-actions { display:grid; grid-template-columns:auto minmax(0,auto); justify-content:end; align-items:stretch; gap:10px; }
.ops-handling-card .ops-form-actions > .button { min-width:0; min-height:44px; white-space:normal; }
.ops-handling-card .ops-form-actions > .cw-save-next { width:auto; max-width:100%; }
.ops-table-scroll { border: 1px solid var(--line); border-radius: 16px; overflow: auto; min-width: 0; }
.ops-table { width: 100%; min-width: 650px; border-collapse: collapse; text-align: left; font-size: .8rem; }
.ops-table th { background: #f0f5eb; color: #43594a; font-size: .73rem; font-weight: 700; white-space: nowrap; }
.ops-table th, .ops-table td { border-bottom: 1px solid var(--line); padding: 11px 12px; vertical-align: middle; overflow-wrap: anywhere; max-width: 330px; }
.ops-table tbody tr:last-child td { border-bottom: 0; }
.ops-table tbody tr:hover { background: #f7faf4; }
.ops-table td > small { display: block; margin-top: 3px; font-size: .72rem; color: var(--muted); }
.ops-table th:last-child, .ops-table td:last-child { text-align: center; }
.ops-table .button { white-space: normal; }
.ops-table .button.button-details { width: 32px; height: 32px; min-height: 32px; padding: 5px; border-radius: 50%; }
.ops-table .button.button-details svg { width: 20px; height: 20px; }
.ops-metrics, .ops-overview { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,175px),1fr)); gap: 12px; }
.ops-overview { margin: 0 0 18px; }
.ops-queue-card { color: var(--ink); border-color: var(--stat-border, #cbdcc3); background: var(--stat-bg, #f9fcf5); }
.ops-queue-card:hover, .ops-queue-card:focus-visible { background: var(--stat-bg, #eaf4e2); border-color: var(--stat-accent, #83a971); }
.ops-metrics .stat-value { font-size: clamp(1.25rem,2vw,1.8rem); overflow-wrap: anywhere; }
.ops-metrics .stat-value.is-text-value { font-size:1rem; font-weight:600; line-height:1.45; max-width:28ch; margin-inline:auto; }
.ops-metrics .stat-caption { display: block; margin-top: 7px; font-size: .76rem; line-height: 1.5; }
.ops-dialog { width: min(920px,calc(100% - 24px)); max-height: 92dvh; margin: auto; padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 24px; background: #fbfdf9; color: var(--ink); box-shadow: 0 24px 74px #10201a45; }
.ops-dialog::backdrop { background: #1021199c; }
.ops-dialog .dialog-body { display: grid; gap: 18px; padding: 21px; }
.ops-company-grants { display: grid; align-content: start; align-self: start; gap: 9px; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.ops-company-grants legend { padding: 0 4px; font-size: .82rem; }
.ops-company-grants label { display: flex; align-items: center; gap: 8px; font-size: .82rem; }
.ops-company-grants input { width: 18px; height: 18px; min-height: 18px; accent-color: #548444; }
.ops-rate-list { display: grid; gap: 12px; }
.ops-rate-row { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 10px; align-items: end; }
.ops-note-list { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.ops-note { padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: #f7faf4; }
.ops-note strong { display: block; margin-bottom: 4px; color: var(--muted); font-size: .75rem; font-weight: 600; }
.ops-note p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .86rem; }
.ops-staff-notes { gap:12px; }
.ops-staff-notes > .ops-note-list:empty, .ops-staff-notes > .ops-note-status:empty, .ops-staff-notes > .ops-note-pagination:empty { display:none; }
.ops-staff-notes > .ops-form, .ops-staff-notes > .ops-form > .ops-form-grid { gap:12px; }
.ops-staff-notes > .ops-form > .ops-form-grid { grid-template-columns:minmax(0,1fr); }
.ops-staff-notes > .ops-form .ops-field > textarea { min-height:120px; }
#account-password-panel { margin: 0 20px 24px; }
body[data-density='compact'] .ops-table th, body[data-density='compact'] .ops-table td { padding-block: 7px; }
@media (max-width:650px) {
  .ops-form-grid { grid-template-columns: minmax(0,1fr); }
  .ops-card, .ops-dialog .dialog-body { padding: 16px; }
  .ops-filters { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .ops-filters > :first-child { grid-column: 1 / -1; }
  .ops-toolbar { justify-content: flex-start; }
  .ops-rate-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
  .ops-overview { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .ops-table { min-width: 590px; }
  .ops-form-actions > .button { min-height: 40px; }
  #account-password-panel { margin-inline: 14px; }
}
@media (max-width:360px) { .ops-filters { grid-template-columns: minmax(0,1fr); } }

/* Longer navigation scrolls independently; language and sign-out remain at the bottom. */
.sidebar { overflow: hidden; }
.sidebar > .nav-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; align-content: start; scrollbar-width: thin; scrollbar-color: #5a765f transparent; padding-right: 3px; }
.sidebar > .sidebar-heading, .sidebar > .workspace-label, .sidebar > .sidebar-footer { flex-shrink: 0; }

.login-message { padding: 10px 12px; border: 1px solid #bdd4af; border-radius: 10px; background: #edf7e6; color: #315a31; font-size: .84rem; line-height: 1.5; text-align: center; }

/* Shared account controls: scoped so the existing sign-in fields keep their layout. */
.ops-password-field { display: grid; gap: 8px; min-width: 0; text-align: left; }
.ops-password-field > label { margin: 0; font-size: .82rem; font-weight: 600; }
.account-password-control { position: relative; min-width: 0; }
.ops-password-field .account-password-control > input { display: block; width: 100%; min-height: 48px; margin: 0; padding-inline: 12px 52px; text-align: left; }
#account-password-panel .ops-form-grid { align-items:start; }
#account-password-panel .ops-password-field > label { line-height:1.4; }
.account-password-control > input::-ms-reveal { display: none; }
.account-password-toggle { position: absolute; inset-block-start: 2px; inset-inline-end: 2px; display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #526458; }
.account-password-toggle:hover, .account-password-toggle[aria-pressed='true'] { background: #edf4e6; color: #315c42; }
.account-password-toggle:focus-visible { border-color: #4f7e45; }
.account-password-toggle svg { width: 20px; height: 20px; pointer-events: none; }
.password-strength { --strength-color: #a64b3a; display: grid; gap: 6px; min-width: 0; }
.password-strength[data-strength='2'] { --strength-color: #996714; }
.password-strength[data-strength='3'] { --strength-color: #578046; }
.password-strength[data-strength='4'] { --strength-color: #315c42; }
.password-strength-label { color: var(--muted); font-size: .75rem; font-weight: 600; line-height: 1.4; }
.password-strength-bar { display: block; width: 100%; height: 7px; margin: 0; appearance: none; border: 0; border-radius: 999px; background: #e8eee3; overflow: hidden; }
.password-strength-bar::-webkit-meter-bar { height: 7px; border: 0; border-radius: 999px; background: #e8eee3; box-shadow: none; }
.password-strength-bar::-webkit-meter-optimum-value, .password-strength-bar::-webkit-meter-suboptimum-value, .password-strength-bar::-webkit-meter-even-less-good-value { border-radius: 999px; background: var(--strength-color); }
.password-strength-bar::-moz-meter-bar { border-radius: 999px; background: var(--strength-color); }
.password-rules { display: grid; gap: 5px; padding: 0; margin: 0; list-style: none; font-size: .74rem; font-weight: 400; line-height: 1.5; }
.password-rules > li { display: flex; align-items: baseline; gap: 7px; min-width: 0; color: #677367; }
.password-rules > li::before { content: '\25CB'; flex: 0 0 12px; text-align: center; font-weight: 700; }
.password-rules > .is-met { color: #315c42; }
.password-rules > .is-met::before { content: '\2713'; }
.password-policy-note { margin: 0; color: var(--muted); font-size: .74rem; font-weight: 400; line-height: 1.5; overflow-wrap: anywhere; }

/* Staff profiles use the same circular image or initials fallback in lists and editors. */
.ops-user-profile { display: flex; align-items: center; gap: 10px; min-width: 0; text-align: left; }
.ops-user-avatar, .ops-avatar-preview, .user-profile-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 48px; height: 48px; border: 1px solid #cbdcc3; border-radius: 50%; object-fit: cover; overflow: hidden; background: #edf5e5; color: #315c42; font-size: .91rem; font-weight: 700; line-height: 1; }
.ops-user-avatar > img, .ops-avatar-preview > img, .user-profile-avatar > img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.staff-identity { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; vertical-align: middle; }
.staff-identity .staff-identity-avatar { width: 24px; height: 24px; flex: 0 0 24px; font-size: .6rem; font-weight: 650; }
.staff-identity-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Column keys keep assignee alignment stable when users reorder their tables. */
:is(.call-table,.ops-table) :is(th,td):is([data-column-key='assignedUserName'],[data-column-key='assignedTo']) { text-align:left; }
:is(.call-table,.ops-table) td:is([data-column-key='assignedUserName'],[data-column-key='assignedTo']) .staff-identity { justify-content:flex-start; text-align:left; }
.ops-user-profile-text { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.ops-user-profile-text > small { color: var(--muted); font-size: .74rem; font-weight: 400; }
.ops-team-account-actions { display:flex; align-items:center; justify-content:flex-end; gap:7px; white-space:nowrap; }
.ops-team-account-actions > .button { padding:8px 10px; font-size:.75rem; min-height:36px; }
.ops-team-account-actions > .button[data-action-icon] { white-space:nowrap; }
.ops-account-dialog { display:grid; gap:18px; }
.ops-account-identity { display:flex; align-items:center; gap:12px; min-width:0; padding:12px; border:1px solid var(--line); border-radius:12px; background:#f7faf3; text-align:left; }
.ops-account-identity > div { display:grid; gap:4px; min-width:0; overflow-wrap:anywhere; }
.ops-account-identity span, .ops-account-identity small { color:var(--muted); font-size:.8rem; }
.ops-account-actions { display:flex; flex-wrap:wrap; align-items:center; gap:9px; }
.ops-account-actions > .button, .ops-account-actions > .button[data-action-icon] { white-space:nowrap; }
.ops-account-form > .ops-form-grid { grid-template-columns:minmax(0,1fr); }
.ops-account-form > .ops-notice, .ops-account-preview > .ops-notice { margin:0; }
.ops-account-preview { display:grid; gap:10px; padding:14px; border:1px solid var(--line); border-radius:12px; }
.ops-account-preview h3 { margin:0; font-size:.92rem; text-align:left; }
.ops-account-counts { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px 18px; margin:0; font-size:.84rem; }
.ops-account-counts dt, .ops-account-counts dd { margin:0; }
.ops-account-counts dd { text-align:right; font-weight:650; }
.button.ops-button-danger { border-color:#c96c62; color:#8a3028; background:#fff2ef; }
.button.ops-button-danger:not(:disabled):hover { border-color:#a3453a; background:#fbe3de; }
.button.ops-button-warning { border-color:#c39c56; color:#76541c; background:#fff7e7; }
.button.ops-button-warning:not(:disabled):hover { border-color:#a98643; background:#ffefd0; }
.ops-avatar-editor { display: flex; align-items: center; gap: 16px; grid-column: 1 / -1; min-width: 0; }
.ops-avatar-editor > :not(.ops-avatar-preview) { min-width: 0; }
.ops-avatar-fields { display: grid; flex: 1 1 0; gap: 9px; min-width: 0; }
.ops-avatar-fields > .button { justify-self: start; }
.ops-avatar-preview { width: 80px; height: 80px; font-size: 1.35rem; }
.ops-avatar-editor input[type='file'] { width: 100%; min-width: 0; max-width: 100%; white-space: normal; font-size: .78rem; }
.ops-avatar-editor input[type='file']::file-selector-button { margin-inline-end: 8px; padding: 7px 9px; border: 1px solid #cbdcc3; border-radius: 8px; background: #edf5e5; color: #315c42; font: inherit; cursor: pointer; }
.ops-avatar-editor input[type='file']::file-selector-button:hover { background: #dceccd; }

/* Account recovery stays centred, while data entry remains left aligned. */
.login-recovery { display: flex; justify-content: center; width: 100%; margin-top: 8px; }
.login-recovery > button { min-height: 40px; white-space: normal; }
.recovery-card { min-width: 0; }
.recovery-form { display: grid; gap: 16px; min-width: 0; margin-top: 28px; text-align: left; }
.recovery-form > .button { min-height: 45px; white-space: normal; }
.recovery-form input { width: 100%; text-align: left; }
.recovery-form > label { display: grid; gap: 7px; font-size: .82rem; font-weight: 600; }
.recovery-card .recovery-form > input { min-height: 46px; margin: 0; }
.recovery-form .account-password-control > input { min-height: 48px; }
.recovery-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 9px; }
.recovery-actions > .button { min-height: 42px; white-space: normal; }
.recovery-card .language-switch { margin: 28px auto 0; }

/* The desktop greeting and compact mobile avatar both open the same profile. */
.user-profile-chip { display: inline-flex; align-items: center; gap: 10px; min-width: 0; max-width: 320px; min-height: 44px; padding: 4px 18px 4px 4px; border: 1px solid #d3dfce; border-radius: 999px; background: #f7faf3; color: var(--ink); text-align: left; }
.user-profile-chip:hover { border-color: #91ac83; background: #edf5e5; }
.user-profile-avatar { width: 36px; height: 36px; font-size: .76rem; }
.user-profile-copy { display: grid; gap: 2px; min-width: 0; line-height: 1.3; }
.user-profile-greeting { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; font-weight: 650; }
.user-profile-role { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .7rem; }
.user-profile-chip-mobile { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; padding: 4px; border: 1px solid #536e5c; border-radius: 50%; background: #20392a; color: var(--rail-text); }
.user-profile-chip-mobile:hover { border-color: #8aa779; background: #294b35; }
.user-profile-chip-mobile .user-profile-avatar { width: 32px; height: 32px; }
.user-profile-chip-mobile .user-profile-copy { display: none; }
@media (max-width:650px) {
  .top-actions > .user-profile-chip { display: none; }
  .mobile-header { gap: 10px; }
  .mobile-header .brand { min-width: 0; margin-right: auto; }
  .mobile-header .brand img { max-width: 100%; }
  .ops-avatar-editor { align-items: flex-start; gap: 12px; }
  .ops-avatar-preview { width: 64px; height: 64px; }
  .recovery-actions { align-items: stretch; }
  .recovery-actions > .button { flex: 1 1 150px; }
}
@media (max-width:400px) { .ops-avatar-editor { flex-direction: column; } .ops-avatar-fields { width: 100%; } }

/* Unresolved-company imports remain private until the owner explicitly routes them. */
.ops-pending-controls { display: grid; grid-template-columns: minmax(180px,2fr) minmax(120px,1fr) 100px auto; gap: 12px; align-items: end; }
.ops-pending-notice { display:flex; align-items:center; justify-content:space-between; gap:18px 24px; min-width:0; margin:0 0 24px; padding:20px 22px; border:1px solid #edc77b; border-radius:16px; background:#fff7e6; color:var(--ink); }
.ops-pending-notice[hidden] { display:none; }
.content:has(> #pending-call-notice:not([hidden]) + #stats-grid:not([hidden])) > .page-heading { margin-bottom:24px; }
.ops-pending-notice-copy { flex:1 1 420px; min-width:0; }
.ops-pending-notice h2 { margin:0 0 8px; font-size:1rem; line-height:1.5; overflow-wrap:anywhere; }
.ops-pending-notice p { margin:0; font-size:.83rem; line-height:1.6; overflow-wrap:anywhere; white-space:pre-line; }
.ops-pending-notice-actions { display:flex; flex-wrap:wrap; gap:10px; flex:0 1 auto; }
.ops-pending-notice-actions > .button { white-space:normal; max-width:100%; }
@media(max-width:1000px) { .ops-pending-notice { flex-direction:column; align-items:stretch; } .ops-pending-notice-copy { flex-basis:auto; } }
@media(max-width:560px) { .ops-pending-notice { padding:16px; } .ops-pending-notice-actions { flex-direction:column; } .ops-pending-notice-actions > .button { width:100%; } }
.ops-pending-results { min-width: 0; }
.ops-pending-calls-view { min-width:0; margin:24px 0 0; }
.ops-pending-calls-view[hidden] { display:none; }
.ops-pending-calls-view .ops-card { border-color:#edc77b; }
.ops-pending-calls-view .ops-card { scroll-margin-block-start:88px; }
@media(max-width:650px) { .ops-pending-calls-view .ops-card { scroll-margin-block-start:156px; } }
#elevenlabs-pending-imports { gap:0; }
#elevenlabs-pending-imports > :is(h2,.tp-title-row) { margin-bottom:8px; }
.ops-pending-intro { margin-bottom:16px; }
.ops-pending-intro > .ops-notice { margin:0; }
#elevenlabs-pending-imports > .ops-pending-controls,
#elevenlabs-pending-imports > .ops-list-status:not(:empty),
#elevenlabs-pending-imports > .ops-pending-results:not(:empty) { margin-bottom:16px; }
.ops-pending-conversation-id { display:block; margin-top:5px; font-size:.72rem; line-height:1.5; color:var(--muted); overflow-wrap:anywhere; }
.ops-pending-results .ops-table { min-width:1100px; }
.ops-pending-email-cell { min-width:180px; }
.ops-pending-country-cell .call-number-country { margin-top:0; }
.ops-pending-meta { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 0; }
.ops-pending-meta-item { display: grid; align-content: start; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #f4f8ef; text-align: center; min-width: 0; }
.ops-pending-meta dt { color: var(--muted); font-size: .74rem; }
.ops-pending-meta dd { margin: 0; font-size: .86rem; font-weight: 600; overflow-wrap: anywhere; }
.ops-pending-summary { min-width:0; overflow-wrap:anywhere; font-size:.88rem; line-height:1.6; }
.ops-pending-summary .case-summary-text { white-space:pre-wrap; }
.ops-pending-summary .case-summary-heading { margin:0 0 2px; font-size:.88rem; font-weight:700; }
.ops-pending-meta .call-number-country { align-items:center; text-align:center; }
.ops-pending-meta .call-number-country-line { justify-content:center; }
.ops-pending-meta .call-number-country.is-compact .call-number-country-name { font-size:inherit; }
.ops-pending-transcript { border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.ops-pending-transcript > summary { cursor: pointer; font-size: .88rem; font-weight: 650; padding: 2px; }
.ops-pending-transcript[open] > summary { margin-bottom: 14px; }
.ops-pending-route { grid-template-columns: minmax(0,1fr); }
.ops-pending-case-id { overflow-wrap: anywhere; color: var(--muted); }
@media (max-width:1000px) { .ops-pending-controls { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } .ops-pending-controls > :first-child { grid-column: 1 / -1; } .ops-pending-controls > .button { grid-column: 1 / -1; justify-self: start; } }
@media (max-width:500px) { .ops-pending-meta { grid-template-columns: minmax(0,1fr); } .ops-pending-controls { gap: 10px; } }
/* Compact integration cards disclose operational metadata on their icon. */
#integrations-view { display:grid; gap:14px; min-width:0; }
#integrations-view > .ops-filters:empty, #integrations-view > .ops-pagination:empty { display:none; }
.ops-integration-toolbar { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px 18px; align-items:center; }
.ops-integration-toolbar > .ops-notice { margin:0; }
.ops-integration-toolbar > .button { justify-self:end; }
.ops-integration-section-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px 16px; min-width:0; }
.ops-integration-section-heading > h2 { margin:0; font-size:1.08rem; line-height:1.3; }
.ops-integration-outbox { position:relative; }
@media(max-width:650px) { .ops-integration-toolbar { grid-template-columns:minmax(0,1fr); } }
.integration-card { gap:11px; padding:20px 16px; overflow:visible; }
.integration-card-heading { gap:9px; min-height:81px; }
.integration-card-heading h2 { min-height:0; font-size:1rem; }
.integration-card-state { min-height:25px; }
.integration-card-footer { min-height:0; padding-top:2px; }
.integration-card-footer:empty { display:none; }
.integration-info { position:relative; display:flex; justify-content:center; width:48px; margin-inline:auto; }
.integration-info-trigger { width:48px; height:48px; display:flex; align-items:center; justify-content:center; padding:0; border:1px solid transparent; border-radius:15px; background:transparent; cursor:help; }
.integration-info-trigger .integration-mark { width:44px; height:44px; margin:0; pointer-events:none; }
.integration-info-trigger .integration-mark svg { width:27px; height:27px; }
.integration-info-trigger:hover,.integration-info-trigger:focus-visible,.integration-info-trigger[aria-expanded='true'] { border-color:#789b65; outline:none; background:#f3f8ed; }
.integration-info-popover { position:absolute; z-index:60; top:auto; bottom:calc(100% + 12px); left:50%; transform:none; width:min(350px,calc(100vw - 24px)); padding:17px; background:#fff; border:1px solid #c5d1bc; box-shadow:0 10px 28px #20371725; border-radius:16px; color:var(--ink); text-align:center; overflow-wrap:anywhere; font-size:.8rem; line-height:1.5; cursor:default; }
.integration-info-popover .integration-card-details { margin:13px 0 0; min-height:0; gap:12px; }
.integration-info-popover p { margin:12px 0 0; color:var(--muted); font-size:.78rem; }
.integration-info-popover[hidden] { display:none; }
.profile-title-actions { display:flex; flex:1; flex-wrap:wrap; align-items:center; gap:10px 14px; min-width:0; }
.profile-title-actions>h2 { flex:0 0 auto; margin:0; }
.profile-title-actions .profile-password-shortcut { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:36px; max-width:100%; padding:7px 12px; margin:0; border:1px solid #91b277; border-radius:999px; background:#f2f8e9; color:#294b24; font-size:.78rem; line-height:1.25; font-weight:700; }
.profile-title-actions .profile-password-shortcut svg { flex:none; }
.profile-title-actions .profile-password-shortcut:hover,.profile-title-actions .profile-password-shortcut:focus-visible { background:#e6f2d5; border-color:#577e3e; color:#1f3d19; }
@media(max-width:650px) { .profile-title-actions { gap:9px; } .profile-title-actions .profile-password-shortcut { min-height:40px; padding-inline:11px; } }
.profile-password-confirm { display:flex; flex-wrap:wrap; gap:9px; margin-top:12px; }
.profile-password-confirm:empty { display:none; }
.profile-password-confirm p { flex-basis:100%; margin:0; }
#account-password-panel { scroll-margin-top:84px; }
@media(max-width:650px) { #account-password-panel { scroll-margin-top:138px; } }

.integration-info-popover::after { content:''; position:absolute; width:10px; height:10px; left:calc(var(--arrow-x,50%) - 5px); bottom:-6px; transform:rotate(45deg); border-right:1px solid #c5d1bc; border-bottom:1px solid #c5d1bc; background:#fff; pointer-events:none; }
.integration-info-popover.is-below { top:calc(100% + 12px); bottom:auto; }
.integration-info-popover.is-below::after { top:-6px; bottom:auto; transform:rotate(225deg); }
.integration-info-popover .integration-info-note { font-size:.75rem; white-space:nowrap; }
@media(max-width:650px) { .integration-info-popover { width:min(300px,calc(100vw - 24px)); } .integration-info-popover .integration-info-note { white-space:normal; } }

/* Cases give search the spare width; compact selects share one row when space permits. */
#operations-view { container-type: inline-size; container-name: operations; }
.ops-task-filters { gap: 10px; }
.ops-task-filters .cas-select-trigger { gap: 7px; padding-inline: 9px; font-size: .82rem; min-height: 40px; }
.ops-verification-hint { white-space: pre-line; }
@container operations (min-width:370px) {
  .ops-task-filters > [data-filter='q'] { grid-column: span 2; }
}
@container operations (min-width:1360px) {
  .ops-task-filters { grid-template-columns: minmax(210px, 1fr) 148px 130px 158px 166px 152px 164px 134px; }
  .ops-task-filters > [data-filter='q'] { grid-column: auto; }
}

#operations-view .ops-task-filters input { min-height:40px; height:40px; }
.ops-table .ops-country-cell { width:1%; text-align:center; white-space:nowrap; }
.ops-country-cell > .call-number-country-flag { margin-inline:auto; }
.ops-country-line,.ops-client-phone-line { min-height:1.75rem; display:flex; align-items:center; justify-content:center; }
.ops-table.ops-client-directory [data-column-key] { text-align:center; }

/* Keep short case labels intact; narrow screens scroll inside the table wrapper. */
.ops-table .badge { white-space:nowrap; overflow-wrap:normal; word-break:normal; }
.ops-task-filters ~ .ops-results .ops-table { min-width:1060px; }
.ops-task-filters ~ .ops-results .ops-table td:nth-child(5) { min-width:100px; overflow-wrap:break-word; }
.ops-task-filters ~ .ops-results .ops-table td:nth-child(6) { min-width:110px; overflow-wrap:break-word; word-break:normal; }
.ops-task-filters ~ .ops-results .ops-table td:nth-child(8) { min-width:145px; }

/* A client summary owns the entire dialog width; its history scrolls locally. */
.ops-dialog[data-client-history] { width:min(1440px,calc(100% - 24px)); }
.ops-dialog[data-client-history] > .dialog-body { grid-template-columns:minmax(0,1fr); min-width:0; }
.ops-client-summary { width:100%; min-width:0; }
.ops-client-summary > h2,.ops-client-summary > .ops-notice { margin:0; text-align:center; }
.ops-client-summary-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px 24px; min-width:0; margin:0; }
.ops-client-summary-field { display:flex; flex-direction:column; align-items:center; gap:8px; min-width:0; padding:14px 12px; border:1px solid var(--line); border-radius:12px; background:#f7faf4; text-align:center; }
.ops-client-summary-field > dt { margin:0; color:var(--muted); font-size:.78rem; font-weight:500; line-height:1.5; }
.ops-client-summary-field > dd { min-width:0; max-width:100%; margin:0; color:var(--ink); font-size:.9rem; line-height:1.5; overflow-wrap:anywhere; }
.ops-client-summary-list { display:grid; gap:7px; min-width:0; max-width:100%; padding:0; margin:0; list-style:none; }
.ops-client-summary-list > li { min-width:0; max-width:100%; overflow-wrap:anywhere; }
.ops-client-summary-list .panel-contact-link { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.ops-client-summary-phone { display:inline-flex; align-items:center; justify-content:center; gap:8px; max-width:100%; font-size:1.08rem; font-weight:600; }
.ops-client-summary-phone > .panel-contact-link { min-width:0; }
@media(min-width:561px) { .ops-client-summary-field[data-client-field="clientBusinessNames"] { grid-column:span 2; } }
.ops-client-history { min-width:0; }
.ops-client-history-head { min-width:0; min-height:44px; padding:0; }
.ops-client-history-head > h2 { min-width:0; margin:0; font-size:1.08rem; overflow-wrap:anywhere; }
.ops-client-history-intro { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px 18px; min-width:0; }
.ops-client-history-intro > .ops-notice { flex:1 1 240px; margin:0; }
.ops-client-history-intro > .button { max-width:100%; white-space:normal; }
.ops-client-history .ops-table-scroll { max-width:100%; }
.ops-client-history-table { min-width:880px; }
.ops-client-history-table :is(th,td) { padding-inline:8px; min-width:0; max-width:none; }
.ops-client-history-table th { white-space:normal; }
.ops-client-history-table th[data-column-key='call'] { --history-column-width:16%; }
.ops-client-history-table th[data-column-key='phone'] { --history-column-width:12%; }
.ops-client-history-table th[data-column-key='email'] { --history-column-width:18%; }
.ops-client-history-table th[data-column-key='company'] { --history-column-width:15%; }
.ops-client-history-table th[data-column-key='assignedTo'] { --history-column-width:12%; }
.ops-client-history-table th[data-column-key='priority'] { --history-column-width:7%; }
.ops-client-history-table th[data-column-key='dueAt'] { --history-column-width:11%; }
.ops-client-history-table th[data-column-key='caseStatus'] { --history-column-width:9%; }
/* Default history fits the modal; extra columns may use the existing horizontal scroll.
   Explicit account widths remain inline and take precedence over these defaults. */
.ops-client-history-table:not(:has(thead th[data-column-default-hidden='true']:not([hidden]))) { table-layout:fixed; }
.ops-client-history-table:not(:has(thead th[data-column-default-hidden='true']:not([hidden]))) th { width:var(--history-column-width,auto); }
.ops-client-history-table td[data-column-key='phone'] { font-size:.75rem; }
.ops-client-history-table td[data-column-key='dueAt'],.ops-client-history-table td[data-column-key='call'] > small { font-size:.69rem; }
.ops-client-history-table .badge { max-width:100%; padding-inline:6px; font-size:.68rem; }
.ops-history-phone-number + .ops-history-phone-number { margin-top:8px; }
.ops-history-phone-label { display:block; color:var(--muted); font-size:.7rem; font-weight:400; line-height:1.4; margin-bottom:2px; }
.ops-history-phone-pair .ops-profile-source { font-size:.68rem; }
@media(max-width:1000px) { .ops-client-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; } }
@media(max-width:560px) { .ops-client-summary-grid { grid-template-columns:minmax(0,1fr); gap:12px; } .ops-client-summary-field { padding:12px; } .ops-client-history-intro > .button { width:100%; } }

/* Client editing shares the existing form controls and keeps each contact explicit. */
.ops-client-secondary-grid { display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); gap:20px; align-items:start; min-width:0; }
.ops-client-secondary-grid.ops-client-secondary-single { grid-template-columns:minmax(0,1fr); }
.ops-client-profile-card,.ops-client-frequency { min-width:0; }
.ops-client-profile-header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; min-width:0; }
.ops-client-profile-header > h2 { margin:0; min-width:0; font-size:1.08rem; overflow-wrap:anywhere; }
.ops-client-profile-header > .button { max-width:100%; white-space:normal; }
.ops-client-frequency { display:grid; gap:12px; width:100%; margin:0; }
.ops-client-frequency > h2 { margin:0; font-size:1.08rem; text-align:center; }
.ops-client-frequency-table { width:100%; border-collapse:collapse; table-layout:fixed; font-size:.86rem; }
.ops-client-frequency-table :is(th,td) { padding:10px 12px; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.ops-client-frequency-table th { text-align:left; }
.ops-client-frequency-table thead th { background:#f0f5eb; font-size:.78rem; }
.ops-client-frequency-table th:last-child,.ops-client-frequency-table td { text-align:center; }
.ops-client-frequency-table td { font-variant-numeric:tabular-nums; font-weight:650; }
.ops-client-frequency > .ops-notice { margin:0; font-size:.77rem; line-height:1.6; }
.ops-client-frequency > small { color:var(--muted); font-size:.73rem; line-height:1.5; }
.ops-client-preferences { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 20px; margin:0; min-width:0; }
.ops-client-preferences > div { display:grid; align-content:start; gap:6px; min-width:0; }
.ops-client-preferences dt { color:var(--muted); font-size:.78rem; line-height:1.5; }
.ops-client-preferences dd { margin:0; font-size:.87rem; overflow-wrap:anywhere; line-height:1.5; }
.ops-client-notes { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; font-size:.87rem; line-height:1.6; }
.ops-client-full-row { grid-column:1/-1; margin:0; }
.ops-client-contact-section,.ops-client-contact-list,.ops-client-settings-region { display:grid; gap:16px; min-width:0; }
.ops-client-contact-section > .ops-notice { margin:0; }
.ops-client-contact-editor { margin:0; padding:16px; display:grid; gap:14px; min-width:0; border:1px solid var(--line); border-radius:14px; }
.ops-client-contact-editor > legend,.ops-client-languages > legend { padding:0 6px; color:var(--ink); font-size:.9rem; font-weight:700; }
.ops-client-contact-editor > .button { justify-self:start; }
.ops-client-contact-row { display:grid; grid-template-columns:minmax(180px,1.5fr) minmax(120px,1fr) minmax(115px,auto) auto; align-items:end; gap:12px; min-width:0; }
.ops-client-contact-row > .button { min-height:44px; white-space:normal; }
.ops-client-contact-flags { display:grid; align-self:center; gap:9px; min-width:0; padding-top:20px; }
.ops-client-contact-flags .ops-checkbox { font-size:.78rem; }
.ops-client-contact-source,.ops-profile-source { display:block; color:var(--muted); font-size:.73rem; font-weight:400; line-height:1.5; overflow-wrap:anywhere; }
.ops-client-contact-row > .ops-client-contact-source { grid-column:1/-1; margin-top:-5px; }
.ops-client-contact-row .contact-field-action { display:none; }
.ops-client-reported { display:grid; gap:12px; }
.ops-client-reported > :is(h3,.ops-notice) { margin:0; }
.ops-client-reported-row { display:flex; flex-wrap:wrap; gap:10px 14px; align-items:center; padding:12px; border:1px solid var(--line); border-radius:12px; }
.ops-client-reported-row > span { flex:1 1 200px; min-width:0; overflow-wrap:anywhere; }
.ops-client-reported-row > small { color:var(--muted); }
.ops-client-edit-preferences { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:16px 20px; min-width:0; }
.ops-client-edit-preferences > :is(.ops-notice,.ops-field:last-child) { grid-column:1/-1; margin:0; }
.ops-client-languages { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 14px; min-width:0; padding:12px; margin:0; border:1px solid var(--line); border-radius:12px; }
.ops-client-languages .ops-checkbox { min-width:0; overflow-wrap:anywhere; }
.ops-client-settings-grid { grid-template-columns:minmax(0,1fr); }
.ops-client-link-results { display:grid; gap:8px; min-width:0; }
.ops-client-link-option { display:grid; justify-items:start; gap:5px; padding:12px; min-width:0; text-align:left; white-space:normal; }
.ops-client-link-option small { color:var(--muted); font-weight:400; overflow-wrap:anywhere; }
.ops-client-link-option[aria-pressed='true'] { background:#eaf4e2; border-color:#83a971; }
.ops-client-link-pager { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; }
@media(max-width:1000px) { .ops-client-contact-row { grid-template-columns:minmax(0,1.5fr) minmax(0,1fr); } .ops-client-contact-flags { display:flex; flex-wrap:wrap; padding-top:0; } .ops-client-contact-row > .button { justify-self:end; } }
@media(max-width:650px) { .ops-client-edit-preferences,.ops-client-preferences { grid-template-columns:minmax(0,1fr); } .ops-client-contact-editor { padding:12px; } .ops-client-contact-row { padding-block:12px; border-bottom:1px solid var(--line); } .ops-client-contact-row:last-child { border-bottom:0; } }
@media(max-width:1000px) { .ops-client-secondary-grid { grid-template-columns:minmax(0,1fr); } }
@media(max-width:420px) { .ops-client-contact-row { grid-template-columns:minmax(0,1fr); } .ops-client-contact-row > .button { justify-self:start; } .ops-client-languages { grid-template-columns:minmax(0,1fr); } .ops-client-profile-header > .button { width:100%; } }
