/* v1.7.06 — Ícone de Funcionários separado entre modo normal e compatibilidade */
    .status-DESISTIU { background:#fff0d8 !important; color:#8a5700 !important; }
    .report-result.DESISTIU { color:#8a5700; background:#fff0d8; }
    .calendar-event.calendar-status-DESISTIU { background:#fff7e8; border-color:#e4b86f; }
    .queue-item.queue-withdrawn { background:#fff8ec; border-color:#e3bb78; box-shadow:inset 4px 0 0 #c78318, 0 7px 20px rgba(199,131,24,.09); }
    .queue-item.queue-withdrawn:hover { border-color:#cc9440; box-shadow:inset 4px 0 0 #c78318, 0 6px 18px rgba(199,131,24,.13); }
    .queue-item.queue-withdrawn .queue-order,
    .queue-item.queue-withdrawn .queue-created-by,
    .queue-item.queue-withdrawn .lawyer-badge,
    .queue-item.queue-withdrawn .status-pill { border:1px solid rgba(138,87,0,.20); }
    html[data-theme="dark"] .status-DESISTIU { background:#4a3514 !important; color:#f0c36d !important; }
    html[data-theme="dark"] .report-result.DESISTIU { background:#4a3514; color:#f0c36d; }
    #reportTableWrap .report-result { white-space:nowrap; word-break:normal; overflow-wrap:normal; }
    #reportTableWrap th:first-child,
    #reportTableWrap .report-date-cell { min-width:104px; }
    #reportTableWrap .report-date-cell > strong,
    #reportTableWrap .report-date-cell > .queue-meta { white-space:nowrap; word-break:normal; overflow-wrap:normal; }
    #reportTableWrap th:nth-child(4), #reportTableWrap td:nth-child(4) { min-width:132px; }
    #reportTableWrap th:nth-child(6) { min-width:76px; white-space:nowrap; word-break:normal; overflow-wrap:normal; }
    html[data-theme="dark"] .calendar-event.calendar-status-DESISTIU { background:#443116; border-color:#8b6429; }
    html[data-theme="dark"] .queue-item.queue-withdrawn { background:#3b2b15; border-color:#8f692e; box-shadow:inset 4px 0 0 #d29a3a; }
    .status-EXCLUIDO { background:#eceff1 !important; color:#59636a !important; }
    .queue-item.queue-deleted { background:repeating-linear-gradient(135deg,#f4f5f6,#f4f5f6 12px,#eceff1 12px,#eceff1 24px); border-color:#aeb7bc; box-shadow:inset 4px 0 0 #758189; opacity:.92; }
    .queue-item.queue-deleted .queue-actions:empty::before { content:'Somente consulta'; color:var(--muted); font-size:11px; font-weight:850; }
    .queue-deleted-filter .provider-type-option { min-height:35px; white-space:nowrap; }
    .queue-status-filter { position:relative; min-width:0; }
    .queue-status-filter-button { width:100%; min-height:47px; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; border:1px solid var(--border); border-radius:11px; background:var(--field-bg); color:var(--text); font:inherit; font-size:14px; font-weight:750; text-align:left; cursor:pointer; }
    #queueStatusSummary { flex:1 1 auto; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .queue-status-filter-button:hover,.queue-status-filter-button[aria-expanded="true"] { border-color:var(--primary); box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 12%,transparent); }
    .queue-status-filter-button:disabled { opacity:.62; cursor:not-allowed; box-shadow:none; }
    .queue-status-filter-arrow { color:var(--muted); font-size:11px; transition:transform .16s ease; }
    .queue-status-filter-button[aria-expanded="true"] .queue-status-filter-arrow { transform:rotate(180deg); }
    .queue-status-filter-menu { position:absolute; z-index:80; top:calc(100% + 6px); right:0; min-width:230px; max-height:340px; overflow:auto; padding:7px; border:1px solid var(--border); border-radius:12px; background:var(--surface); box-shadow:0 18px 42px rgba(18,42,47,.20); }
    .queue-status-filter-menu.hidden { display:none; }
    .queue-status-option { display:flex; align-items:center; gap:9px; min-height:34px; padding:7px 8px; border-radius:8px; color:var(--text); font-size:11px; font-weight:850; cursor:pointer; }
    .queue-status-option:hover { background:var(--surface-2); }
    .queue-status-option input { width:16px; height:16px; margin:0; accent-color:var(--primary); }
    .queue-status-filter-divider { height:1px; margin:5px 3px; background:var(--border); }
    html[data-theme="dark"] .status-EXCLUIDO { background:#30383d !important; color:#c5cbd0 !important; }
    html[data-theme="dark"] .queue-item.queue-deleted { background:repeating-linear-gradient(135deg,#222a2f,#222a2f 12px,#293238 12px,#293238 24px); border-color:#5c6870; box-shadow:inset 4px 0 0 #839099; }

  
    /* Ajuste compacto dos filtros da Agenda e fila - v1.7.10 */
    .filters .queue-provider-type-filter {
      min-height: 47px;
      height: 47px;
      padding: 5px 6px;
      flex-wrap: nowrap;
      align-content: center;
    }
    .filters .queue-provider-type-filter .provider-type-option {
      min-height: 35px;
      padding: 6px 8px;
    }
    @media (min-width: 1201px) {
      #page-queue .filters {
        grid-template-columns: 170px max-content minmax(190px, .6fr) minmax(250px, 1.2fr) 172px max-content !important;
        column-gap: 16px;
        row-gap: 8px;
      }
      #page-queue .filters > .field:first-child {
        min-width: 170px;
      }
      #page-queue .queue-provider-type-field {
        width: max-content;
        margin-left: 0;
      }
      #page-queue .queue-provider-type-filter {
        width: max-content;
      }
    }

    .status-AGUARDANDO { background:#DDEEFF !important; color:#205F91 !important; }
    html[data-theme="dark"] .status-AGUARDANDO { background:#1D3B55 !important; color:#9FD0FF !important; }
    .calendar-event.calendar-status-AGUARDANDO { background:#E8F3FF; border-color:#9FC8EE; }
    html[data-theme="dark"] .calendar-event.calendar-status-AGUARDANDO { background:#203B52; border-color:#4C7CA6; }
    

    /* v1.7.18 — indicadores em uma linha e visualização ampliada dos pop-ups */
    #statsGrid {
      grid-template-columns: repeat(7, minmax(132px, 1fr));
      grid-auto-flow: column;
      grid-auto-columns: minmax(132px, 1fr);
      overflow-x: auto;
      overscroll-behavior-inline: contain;
      scroll-snap-type: inline proximity;
      scrollbar-width: thin;
      padding-bottom: 7px;
    }
    #statsGrid .stat-card { height: 100%; min-width: 0; scroll-snap-align: start; }
    .popup-template-preview-toolbar { display:flex; align-items:center; justify-content:space-between; gap:9px; margin-top:12px; flex-wrap:wrap; }
    .popup-template-preview-toolbar strong { color:var(--muted); font-size:11px; font-weight:900; letter-spacing:.07em; text-transform:uppercase; }
    .popup-template-preview-toolbar .btn { margin-left:auto; }
    .modal.modal-popup-visual { width:min(820px,calc(100vw - 24px)); }
    .modal-popup-visual .modal-body { padding:0; background:var(--surface-2); }
    .popup-full-preview-note { padding:13px 18px; border-bottom:1px solid var(--border); background:var(--surface); color:var(--muted); font-size:12px; line-height:1.5; text-align:center; }
    .popup-full-preview-stage { padding:28px; background:radial-gradient(circle at top,#2c5961 0,#123a42 52%,#08282f 100%); }
    .popup-full-preview-stage .call-popup { margin:0 auto; animation:none; }
    .popup-full-preview-stage .call-popup-bell { animation:none; }
    .popup-full-preview-stage .call-popup-actions .btn { pointer-events:none; }
    

    /* v1.7.19 — ações organizadas, mensagens semafóricas e status distintos */
    .modal.modal-appointment-details.modal-details-two-rows .modal-foot { display:grid; grid-template-columns:minmax(0,1fr); justify-content:stretch; gap:9px; align-items:stretch; }
    .modal-details-two-rows .modal-foot-row { display:grid; gap:8px; min-width:0; }
    .modal-details-two-rows .modal-foot-row[data-modal-count="1"] { grid-template-columns:minmax(0,1fr); }
    .modal-details-two-rows .modal-foot-row[data-modal-count="2"] { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .modal-details-two-rows .modal-foot-row[data-modal-count="3"] { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .modal-details-two-rows .modal-foot-row[data-modal-count="4"] { grid-template-columns:repeat(4,minmax(0,1fr)); }
    .modal-details-two-rows .modal-foot-row[data-modal-count="5"] { grid-template-columns:repeat(5,minmax(0,1fr)); }
    .modal-details-two-rows .modal-foot-row[data-modal-count="6"] { grid-template-columns:repeat(6,minmax(0,1fr)); }
    .modal.modal-appointment-details { display:flex; flex-direction:column; overflow:hidden; }
    .modal.modal-appointment-details .modal-head,
    .modal.modal-appointment-details .modal-foot { flex:0 0 auto; max-width:100%; overflow:hidden; }
    .modal.modal-appointment-details .modal-body { min-height:0; overflow-x:hidden; overflow-y:auto; scrollbar-width:none; }
    .modal.modal-appointment-details .modal-body::-webkit-scrollbar { width:0; height:0; display:none; }
    .modal-details-two-rows .modal-foot-row { width:100%; max-width:100%; overflow:hidden; }
    .modal-details-two-rows .modal-foot-row .btn { width:100%; min-width:0; max-width:100%; min-height:44px; padding-left:8px; padding-right:8px; white-space:normal; overflow-wrap:anywhere; word-break:break-word; line-height:1.2; }
    .modal.modal-appointment-details:not(.modal-details-two-rows) .modal-foot { display:flex; flex-wrap:nowrap; align-items:stretch; }
    .modal.modal-appointment-details:not(.modal-details-two-rows) .modal-foot > .btn { flex:1 1 0; min-width:0; max-width:100%; min-height:44px; padding-left:8px; padding-right:8px; white-space:normal; overflow-wrap:anywhere; word-break:break-word; line-height:1.2; }

    .call-popup-message { border:2px solid transparent; font-size:18px; font-weight:950; letter-spacing:.01em; }
    .call-popup-message.signal-call { background:#FFE3E6 !important; border-color:#D94A57 !important; color:#94232E !important; box-shadow:0 8px 20px rgba(217,74,87,.13); }
    .call-popup-message.signal-wait { background:#FFF0B8 !important; border-color:#D29A18 !important; color:#755000 !important; box-shadow:0 8px 20px rgba(210,154,24,.14); }
    .call-popup-message.signal-go { background:#DDF5E7 !important; border-color:#2E9B60 !important; color:#17683C !important; box-shadow:0 8px 20px rgba(46,155,96,.13); }
    html[data-theme="dark"] .call-popup-message.signal-call { background:#4A2027 !important; border-color:#E16D78 !important; color:#FFB5BC !important; }
    html[data-theme="dark"] .call-popup-message.signal-wait { background:#493913 !important; border-color:#D6A83F !important; color:#FFE092 !important; }
    html[data-theme="dark"] .call-popup-message.signal-go { background:#173E2B !important; border-color:#4BB77A !important; color:#A5E9C3 !important; }
    .appointment-companion-add.is-disabled {
      position:relative;
      overflow:visible;
      background:#d9dde2 !important;
      border-color:#c7ccd2 !important;
      color:#747b84 !important;
      box-shadow:none !important;
      cursor:not-allowed;
      opacity:1;
      transform:none !important;
    }
    html[data-theme="dark"] .appointment-companion-add.is-disabled {
      background:#333940 !important;
      border-color:#4a515a !important;
      color:#a5abb3 !important;
    }
    .appointment-companion-add.status-hover-tooltip::after {
      content:attr(data-tooltip);
      position:absolute;
      z-index:120;
      right:0;
      bottom:calc(100% + 10px);
      width:max-content;
      max-width:min(320px,80vw);
      padding:9px 11px;
      border:1px solid var(--line);
      border-radius:10px;
      background:var(--surface);
      color:var(--text);
      box-shadow:var(--shadow);
      font-size:12px;
      font-weight:700;
      line-height:1.35;
      white-space:normal;
      pointer-events:none;
      opacity:0;
      transform:translateY(4px);
      transition:opacity .16s ease,transform .16s ease;
    }
    .appointment-companion-add.status-hover-tooltip:hover::after,
    .appointment-companion-add.status-hover-tooltip:focus-visible::after {
      opacity:1;
      transform:translateY(0);
    }

    .queue-item.queue-in-service { background:#E5F0FF !important; border-color:#6598D0 !important; box-shadow:inset 4px 0 0 #2865A5 !important; }
    .queue-item.queue-completed { background:#E2F7E9 !important; border-color:#5EAD7D !important; box-shadow:inset 4px 0 0 #237346 !important; }
    .status-EM_ATENDIMENTO { background:#D6E8FF !important; color:#174F8C !important; }
    .status-CONCLUIDO { background:#D6F2E0 !important; color:#17653B !important; }
    .calendar-event.calendar-status-EM_ATENDIMENTO { background:#E2EEFF !important; border-color:#83AEE0 !important; }
    .calendar-event.calendar-status-CONCLUIDO { background:#E1F6E8 !important; border-color:#7DBA91 !important; }
    html[data-theme="dark"] .queue-item.queue-in-service { background:#173653 !important; border-color:#578DC2 !important; box-shadow:inset 4px 0 0 #79B6F0 !important; }
    html[data-theme="dark"] .queue-item.queue-completed { background:#173B29 !important; border-color:#4E9B6B !important; box-shadow:inset 4px 0 0 #75C995 !important; }
    html[data-theme="dark"] .status-EM_ATENDIMENTO { background:#234B73 !important; color:#A9D4FF !important; }
    html[data-theme="dark"] .status-CONCLUIDO { background:#214A31 !important; color:#9BE0B5 !important; }
    html[data-theme="dark"] .calendar-event.calendar-status-EM_ATENDIMENTO { background:#203C5D !important; border-color:#4E79AA !important; }
    html[data-theme="dark"] .calendar-event.calendar-status-CONCLUIDO { background:#203E2C !important; border-color:#4D8C65 !important; }

    /* v1.7.20 — Concluído em roxo para não confundir com Presente */
    .queue-item.queue-completed { background:#F1E8FF !important; border-color:#9A72D6 !important; box-shadow:inset 4px 0 0 #6F42B5 !important; }
    .status-CONCLUIDO { background:#E8DCFF !important; color:#5B2F96 !important; }
    .calendar-event.calendar-status-CONCLUIDO { background:#F0E8FF !important; border-color:#A98AD4 !important; }
    html[data-theme="dark"] .queue-item.queue-completed { background:#302447 !important; border-color:#8B6EB7 !important; box-shadow:inset 4px 0 0 #B08AE5 !important; }
    html[data-theme="dark"] .status-CONCLUIDO { background:#4A3568 !important; color:#DFC4FF !important; }
    html[data-theme="dark"] .calendar-event.calendar-status-CONCLUIDO { background:#33264A !important; border-color:#735A99 !important; }

    /* v1.8.8 — painel ocupa a altura útil; somente as listas excedentes rolam */
    .monitor-page {
      box-sizing: border-box;
      height: 100vh;
      height: 100dvh;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      overscroll-behavior: contain;
    }
    .monitor-page .monitor-top,
    .monitor-page .monitor-summary,
    .monitor-page .monitor-footer { flex: 0 0 auto; }
    .monitor-page .monitor-grid {
      flex: 1 1 0;
      height: auto;
      min-height: 0;
      grid-auto-rows: minmax(0, 1fr);
      align-items: stretch;
    }
    .monitor-page .monitor-grid .monitor-call,
    .monitor-page .monitor-grid .monitor-list-card {
      height: 100% !important;
      min-height: 0 !important;
      max-height: none !important;
      align-self: stretch;
    }
    .monitor-page .monitor-footer {
      position: static;
      bottom: auto;
    }
    @media (min-width: 1280px) {
      .monitor-page .monitor-grid {
        grid-template-rows: minmax(0, 1fr);
      }
    }
    @media (min-width: 761px) and (max-width: 1279px) {
      .monitor-page .monitor-grid {
        grid-template-rows: repeat(2, minmax(0, 1fr));
      }
    }
    @media (min-width: 651px) and (max-width: 760px) {
      .monitor-page {
        display: block;
        overflow-y: auto;
        overscroll-behavior-y: contain;
      }
      .monitor-page .monitor-grid {
        display: grid;
        height: auto;
        min-height: 0;
        grid-template-rows: none;
        grid-auto-rows: auto;
      }
      .monitor-page .monitor-grid .monitor-call,
      .monitor-page .monitor-grid .monitor-list-card {
        height: clamp(240px, 55vh, 460px) !important;
        height: clamp(240px, 55dvh, 460px) !important;
      }
      .monitor-page .monitor-footer {
        position: sticky;
        bottom: -8px;
      }
    }

    /* ==== v1.9.21 — redução de ruído visual ====
       Sombra apenas no que realmente flutua. Blocos internos usam borda. */
    .card { box-shadow: none; }
    .main .card { box-shadow: none; }
    .card:hover { box-shadow: none; }
    .modal, .admin-menu-popover, .call-popup, .login-card, .queue-status-filter-menu { box-shadow: var(--shadow); }
    .card .card { border-radius: 12px; background: var(--surface-2); }
    .sticky-filter-card, .calendar-header-card, .protocol-reminder-card { border-radius: 12px; }
    .stat-card, .report-kpi, .protocol-kpi { border-radius: 12px; }
    html[data-theme="dark"] .card { border-color: color-mix(in srgb, var(--border) 78%, transparent); }

    /* Meus atendimentos: os cinco indicadores permanecem na mesma linha no desktop. */
    .my-history-summary {
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 11px;
    }
    .my-history-summary .report-kpi {
      min-width: 0;
      padding: 14px 15px;
    }
    .my-history-summary .report-kpi .kpi-icon {
      width: 34px;
      height: 34px;
      margin-bottom: 9px;
      border-radius: 10px;
      font-size: 17px;
    }
    .my-history-summary .report-kpi .kpi-value {
      font-size: 27px;
      line-height: 1.05;
    }
    .my-history-summary .report-kpi .kpi-label {
      margin-top: 4px;
      font-size: 10px;
      line-height: 1.25;
      overflow-wrap: anywhere;
    }
    @media (min-width: 651px) and (max-width: 920px) {
      .my-history-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    

    /* ==== v1.9.21 — autocompletar de clientes ==== */
    .client-suggestions {
      position: absolute; z-index: 60; left: 0; right: 0; top: 100%; margin-top: 4px;
      max-height: 280px; overflow-y: auto; display: grid;
      background: var(--surface-elevated); border: 1px solid var(--border);
      border-radius: 12px; box-shadow: var(--shadow); padding: 4px;
    }
    .client-suggestions.hidden { display: none; }
    .client-suggestion {
      display: grid; gap: 1px; text-align: left; padding: 8px 10px; border: 0;
      border-radius: 9px; background: transparent; color: var(--text); cursor: pointer; font: inherit;
    }
    .client-suggestion:hover, .client-suggestion:focus-visible { background: var(--surface-hover); }
    .client-suggestion-name { font-weight: 700; font-size: 14px; }
    .client-suggestion-meta { font-size: 12px; color: var(--muted); }

    /* ==== v1.9.21 — ficha do cliente ==== */
    .client-profile { display: grid; gap: 15px; }
    .client-profile-name { font-size: 21px; font-weight: 800; }
    .client-profile-kpis { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
    .client-profile-kpi {
      display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px;
      border: 1px solid var(--border); background: var(--surface-2);
    }
    .client-profile-kpi span { font-size: 11.5px; color: var(--muted); font-weight: 700; }
    .client-profile-kpi strong { font-size: 22px; font-variant-numeric: tabular-nums; }
    .client-profile-kpi.is-good strong { color: var(--success); }
    .client-profile-kpi.is-bad strong { color: var(--danger); }

    /* v1.9.44 */
    .client-profile-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
    .client-profile-actions { display: flex; flex-wrap: wrap; gap: 8px; }

    /* v1.9.48 — "Próximos atendimentos", "Histórico completo" e "Protocolos"
       usam linhas flexíveis (não <table>, que tem min-width fixo no projeto
       e força rolagem lateral). Cada campo (Data, Responsável, Situação...)
       é um item flex independente: fica lado a lado quando cabe, e quebra
       para a linha seguinte sozinho quando não cabe — em qualquer largura de
       tela ou de modal, sem depender de um ponto de corte fixo. */
    .client-profile-list { display: flex; flex-direction: column; gap: 10px; margin: 10px 0 4px; width: 100%; max-width: 100%; }
    .client-profile-row {
      display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px;
      width: 100%; max-width: 100%; box-sizing: border-box;
      padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px;
      background: var(--surface); cursor: pointer; text-align: left; font: inherit; color: inherit;
    }
    .client-profile-row:hover { background: var(--surface-hover); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
    .client-profile-row:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
    .client-profile-row-static { cursor: default; }
    .client-profile-row-static:hover { background: var(--surface); border-color: var(--border); }
    .client-profile-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; max-width: 100%; flex: 0 1 auto; }
    .client-profile-field-grow { flex: 1 1 220px; }
    .client-profile-field-label { font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
    .client-profile-field, .client-profile-field * { overflow-wrap: anywhere; white-space: normal; }
    .client-profile-field .lawyer-badge { max-width: 100%; }
    .client-profile-field .lawyer-badge-name { white-space: normal; overflow: visible; text-overflow: clip; }
    .client-profile-empty { padding: 20px 12px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: 14px; }
    .modal.modal-client-profile { width:min(1080px,94vw); max-width:min(1080px,94vw); }
    .modal-client-profile .client-profile-kpis { grid-template-columns:repeat(4,minmax(0,1fr)); }
    .modal-client-profile .client-profile-kpis.has-five-items { grid-template-columns:repeat(5,minmax(0,1fr)); }
    .modal-client-profile .client-profile-appointment-row {
      display:grid; grid-template-columns:minmax(125px,.55fr) minmax(260px,1.15fr) minmax(210px,.9fr);
      align-items:center; column-gap:24px;
    }
    .modal-client-profile .client-profile-protocol-row { display:grid; grid-template-columns:minmax(140px,.6fr) minmax(280px,1.5fr) minmax(190px,.8fr); align-items:center; column-gap:24px; }
    .modal-client-profile .client-profile-date-field,.modal-client-profile .client-profile-provider-field,.modal-client-profile .client-profile-status-field { width:100%; }
    .modal-client-profile .client-profile-status-field .status-pill { align-self:flex-start; max-width:100%; }

    @media (min-width:651px) and (max-width:820px) {
      .modal-client-profile .client-profile-appointment-row { grid-template-columns:minmax(105px,.5fr) minmax(210px,1fr) minmax(180px,.85fr); column-gap:14px; }
      .modal-client-profile .client-profile-protocol-row { grid-template-columns:minmax(120px,.55fr) minmax(210px,1.25fr) minmax(170px,.8fr); column-gap:14px; }
      .modal-client-profile .client-profile-kpis { gap:7px; }
      .modal-client-profile .client-profile-kpi { padding:9px; }
    }

    /* ==== v1.9.21 — busca global ==== */
    .global-search { display: grid; gap: 12px; }
    .global-search-results { display: grid; gap: 6px; max-height: 52vh; overflow-y: auto; }
    .global-search-item {
      display: flex; align-items: center; justify-content: space-between; gap: 12px;
      width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--border);
      border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer; font: inherit;
    }
    .global-search-item:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); background: var(--surface-hover); }
    .global-search-main { display: grid; gap: 1px; min-width: 0; }
    .global-search-main strong { font-size: 15px; }
    .global-search-side { display: grid; gap: 2px; justify-items: end; text-align: right; flex: 0 0 auto; }

    /* ==== v1.9.21 — indicadores do período ==== */
    .period-indicators { display: grid; gap: 16px; }
    .period-kpis { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
    .period-kpi { display: grid; gap: 2px; padding: 12px 14px; }
    .period-kpi span { font-size: 11.5px; color: var(--muted); font-weight: 700; }
    .period-kpi strong { font-size: 23px; }
    .period-kpi small { font-size: 11px; color: var(--muted); }
    .period-providers { display: grid; gap: 12px; }
    .period-provider { display: grid; gap: 5px; }
    .period-provider-head { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
    .period-provider-head span { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
    .period-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
    .period-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--primary); }
    .period-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; }
    .period-weekday { display: grid; gap: 4px; justify-items: center; }
    .period-weekday-bar { width: 100%; height: 90px; display: flex; align-items: flex-end; background: var(--surface-2); border-radius: 8px; overflow: hidden; }
    .period-weekday-bar > span { width: 100%; background: var(--primary); border-radius: 8px 8px 0 0; min-height: 2px; }
    .period-weekday small { font-size: 11px; color: var(--muted); font-weight: 700; }
    .period-weekday strong { font-size: 13px; font-variant-numeric: tabular-nums; }
    .modal.modal-wide { max-width: min(920px, 94vw); }
    .modal.modal-companion-picker { width:min(840px,94vw); max-width:min(840px,94vw); overflow:hidden; }
    .modal-companion-picker .modal-body { padding:26px 28px 28px; }
    .modal-companion-picker .modal-foot { padding:16px 28px 24px; }
    .companion-picker-modal { display:grid; gap:22px; min-height:260px; }
    .companion-picker-search { margin:0; }
    .companion-picker-note { margin:0; min-height:86px; display:flex; align-items:center; padding:18px 20px; }
    .companion-picker-fields { display:grid; grid-template-columns:minmax(220px,1fr) minmax(190px,.82fr) minmax(190px,.82fr); gap:16px; align-items:end; }
    .companion-picker-fields .field { min-width:0; }
    .companion-picker-fields input { width:100%; min-width:0; font-variant-numeric:tabular-nums; }
    .modal-companion-picker .modal-foot .btn { min-width:148px; }

    @media (min-width:651px) and (max-width:780px) {
      .companion-picker-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
      .companion-picker-name { grid-column:1 / -1; }
      .modal-companion-picker .modal-foot .btn { min-width:0; }
    }

    .modal-details-compact-actions .modal-foot-row[data-modal-row="1"] { grid-template-columns:repeat(auto-fit,minmax(56px,1fr)); }
    .modal-details-compact-actions .modal-foot-row[data-modal-row="1"] .btn.btn-icon-only { min-height:52px; padding:0 8px; display:grid; place-items:center; font-size:22px; line-height:1; white-space:nowrap; overflow:hidden; }
    .modal-details-compact-actions .modal-foot-row[data-modal-row="1"] .btn.btn-icon-only.btn-appointment-quick-action { border-radius:14px; }
    .modal-details-compact-actions .modal-foot-row[data-modal-row="1"] .btn.btn-icon-only:hover { transform:translateY(-1px); }

    /* v1.9.66 — a segunda linha precisa permitir o deslocamento do hover sem
       recortar a borda superior dos botões. */
    .modal-details-compact-actions.modal-details-two-rows .modal-foot-row[data-modal-row="2"] { position:relative; overflow:visible; z-index:1; }
    .modal-details-compact-actions.modal-details-two-rows .modal-foot-row[data-modal-row="2"] .btn { position:relative; }
    .modal-details-compact-actions.modal-details-two-rows .modal-foot-row[data-modal-row="2"] .btn:hover,
    .modal-details-compact-actions.modal-details-two-rows .modal-foot-row[data-modal-row="2"] .btn:focus-visible { z-index:2; }

    .modal-details-compact-actions .modal-foot-row[data-modal-row="1"] { overflow:visible; }
    .modal-details-compact-actions .modal-foot-row[data-modal-row="1"] .btn.btn-icon-only.btn-appointment-quick-action { position:relative; overflow:visible; }
    .modal-details-compact-actions .modal-foot-row[data-modal-row="1"] .btn.btn-icon-only.btn-appointment-quick-action.btn-no-tooltip::before,
    .modal-details-compact-actions .modal-foot-row[data-modal-row="1"] .btn.btn-icon-only.btn-appointment-quick-action.btn-no-tooltip::after { display:none; }
    .modal-details-compact-actions .modal-foot-row[data-modal-row="1"] .btn.btn-icon-only.btn-appointment-quick-action::after {
      content:attr(data-tooltip);
      position:absolute;
      left:50%;
      bottom:calc(100% + 10px);
      transform:translateX(-50%) translateY(6px);
      opacity:0;
      pointer-events:none;
      white-space:nowrap;
      padding:6px 10px;
      border-radius:10px;
      background:rgba(14,18,28,.96);
      border:1px solid color-mix(in srgb,var(--primary) 26%,var(--border));
      color:#fff;
      font-size:12px;
      font-weight:800;
      line-height:1.2;
      box-shadow:0 10px 30px rgba(0,0,0,.28);
      z-index:30;
      transition:opacity .16s ease, transform .16s ease;
    }
    .modal-details-compact-actions .modal-foot-row[data-modal-row="1"] .btn.btn-icon-only.btn-appointment-quick-action::before {
      content:'';
      position:absolute;
      left:50%;
      bottom:calc(100% + 4px);
      width:10px;
      height:10px;
      background:rgba(14,18,28,.96);
      border-right:1px solid color-mix(in srgb,var(--primary) 26%,var(--border));
      border-bottom:1px solid color-mix(in srgb,var(--primary) 26%,var(--border));
      transform:translateX(-50%) rotate(45deg) translateY(6px);
      opacity:0;
      pointer-events:none;
      z-index:29;
      transition:opacity .16s ease, transform .16s ease;
    }
    .modal-details-compact-actions .modal-foot-row[data-modal-row="1"] .btn.btn-icon-only.btn-appointment-quick-action:hover::after,
    .modal-details-compact-actions .modal-foot-row[data-modal-row="1"] .btn.btn-icon-only.btn-appointment-quick-action:hover::before,
    .modal-details-compact-actions .modal-foot-row[data-modal-row="1"] .btn.btn-icon-only.btn-appointment-quick-action:focus-visible::after,
    .modal-details-compact-actions .modal-foot-row[data-modal-row="1"] .btn.btn-icon-only.btn-appointment-quick-action:focus-visible::before {
      opacity:1;
      transform:translateX(-50%) translateY(0);
    }
    .modal-details-compact-actions .modal-foot-row[data-modal-row="1"] .btn.btn-icon-only.btn-appointment-quick-action:focus-visible::before {
      transform:translateX(-50%) rotate(45deg) translateY(0);
    }

    /* Tooltip superior do status reagendado, no mesmo padrão das ações rápidas. */
    .queue-status-jump.status-hover-tooltip { position:relative; overflow:visible; z-index:4; }
    .queue-status-jump.status-hover-tooltip::after {
      content:attr(data-tooltip);
      position:absolute;
      left:50%;
      bottom:calc(100% + 10px);
      width:max-content;
      max-width:min(320px, calc(100vw - 32px));
      padding:6px 10px;
      border:1px solid color-mix(in srgb,var(--primary) 26%,var(--border));
      border-radius:10px;
      background:rgba(14,18,28,.96);
      color:#fff;
      box-shadow:0 10px 30px rgba(0,0,0,.28);
      font-size:12px;
      font-weight:800;
      line-height:1.2;
      text-align:center;
      white-space:normal;
      opacity:0;
      pointer-events:none;
      transform:translateX(-50%) translateY(6px);
      transition:opacity .16s ease, transform .16s ease;
      z-index:31;
    }
    .queue-status-jump.status-hover-tooltip::before {
      content:'';
      position:absolute;
      left:50%;
      bottom:calc(100% + 5px);
      width:10px;
      height:10px;
      border-right:1px solid color-mix(in srgb,var(--primary) 26%,var(--border));
      border-bottom:1px solid color-mix(in srgb,var(--primary) 26%,var(--border));
      background:rgba(14,18,28,.96);
      opacity:0;
      pointer-events:none;
      transform:translateX(-50%) rotate(45deg) translateY(6px);
      transition:opacity .16s ease, transform .16s ease;
      z-index:30;
    }
    .queue-status-jump.status-hover-tooltip:hover::after,
    .queue-status-jump.status-hover-tooltip:focus-visible::after {
      opacity:1;
      transform:translateX(-50%) translateY(0);
    }
    .queue-status-jump.status-hover-tooltip:hover::before,
    .queue-status-jump.status-hover-tooltip:focus-visible::before {
      opacity:1;
      transform:translateX(-50%) rotate(45deg) translateY(0);
    }

    .modal.modal-appointment-details.modal-details-compact-actions { overflow:visible; }
    .modal.modal-appointment-details.modal-details-compact-actions .modal-foot { position:relative; overflow:visible; z-index:4; }
    .modal.modal-appointment-details.modal-details-compact-actions .modal-body { position:relative; z-index:1; }

    /* v1.9.32 — consistência visual, ações responsivas e tooltips explicativos */
    html.overlay-scroll-locked { overscroll-behavior: none; }
    .appointment-detail-timing .field { min-width:0; }
    .appointment-detail-timing .field strong { display:block; margin-top:2px; line-height:1.28; overflow-wrap:anywhere; }
    .appointment-live-duration, .appointment-live-wait { font-variant-numeric: tabular-nums; }

    .btn.btn-disabled-explained { position:relative; overflow:visible; pointer-events:auto; }
    .btn.btn-disabled-explained::after {
      content:attr(data-tooltip);
      position:absolute;
      left:50%;
      bottom:calc(100% + 9px);
      transform:translateX(-50%) translateY(5px);
      width:max-content;
      max-width:min(290px,calc(100vw - 32px));
      padding:7px 10px;
      border-radius:9px;
      background:rgba(14,18,28,.97);
      color:#fff;
      font-size:11px;
      font-weight:800;
      line-height:1.3;
      white-space:normal;
      text-align:center;
      box-shadow:0 9px 24px rgba(0,0,0,.24);
      opacity:0;
      visibility:hidden;
      pointer-events:none;
      z-index:80;
      transition:opacity .15s ease,transform .15s ease,visibility .15s ease;
    }
    .btn.btn-disabled-explained:hover::after,
    .btn.btn-disabled-explained:focus-visible::after {
      opacity:1;
      visibility:visible;
      transform:translateX(-50%) translateY(0);
    }

    @media (min-width: 861px) {
      #page-queue .queue-item {
        align-items:start;
        grid-template-columns:66px minmax(240px,1.2fr) minmax(220px,.95fr) 92px 112px minmax(290px,1.25fr);
      }
      #page-queue .queue-actions {
        align-content:flex-start;
        align-items:flex-start;
        flex-wrap:wrap;
        gap:6px;
      }
      #page-queue .queue-actions .btn-sm {
        min-height:34px;
        padding:7px 9px;
        font-size:10.5px;
        line-height:1.15;
      }
      #page-queue .queue-lawyer .lawyer-badge { min-height:58px; }
      #page-queue .queue-lawyer .lawyer-badge-label { font-size:9px; letter-spacing:.065em; }
      #page-queue .queue-lawyer .lawyer-badge-name { font-size:14px; }
    }

    @media (max-width: 1400px) and (min-width: 861px) {
      #page-queue .queue-item {
        grid-template-columns:58px minmax(220px,1fr) 92px 112px minmax(270px,1.1fr);
      }
    }
    .btn.btn-disabled-explained[aria-disabled="true"] { opacity:.48; cursor:not-allowed; transform:none; box-shadow:none; }
    /* Shared sizing: evita colisões em cards, cabeçalhos e grupos de ações. */
    .card, .form-card, .section-title, .page-head, .head-actions, .form-actions, .modal-foot { min-width:0; }
    .head-actions, .form-actions, .modal-foot { row-gap:8px; }
    .btn { line-height:1.2; }
    .btn-sm { min-height:34px; }
    .card strong, .card span, .card p, .field strong { overflow-wrap:anywhere; }
