/* 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; }
    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 .checkbox-row { min-height:47px; padding:7px 10px; white-space:nowrap; background:var(--field-bg); }
    .queue-deleted-filter > .checkbox-row { height:47px; box-sizing:border-box; margin:0; align-items:center !important; }
    .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:12px; font-weight:750; text-align:left; cursor:pointer; }
    .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: 160px max-content minmax(190px, .6fr) minmax(250px, 1.2fr) 135px max-content;
        column-gap: 14px;
        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; }
    @media (max-width: 560px) { .call-popup-details { grid-template-columns:1fr; } }

    /* 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; }
    @media (max-width: 650px) {
      #statsGrid { grid-template-columns:repeat(7,minmax(136px,1fr)); grid-auto-columns:minmax(136px,1fr); gap:9px; }
      .popup-template-preview-toolbar .btn { width:100%; margin-left:0; }
      .popup-full-preview-stage { padding:8px; }
      .popup-full-preview-stage .call-popup-top { padding:22px 16px 18px; }
      .popup-full-preview-stage .call-popup-body { padding:18px 14px 20px; }
    }

    /* v1.7.19 — ações organizadas, mensagens semafóricas e status distintos */
    .modal.modal-appointment-details.modal-details-two-rows .modal-foot { display:grid; 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; }

    .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:not(.monitor-calendar-open) .monitor-top,
    .monitor-page:not(.monitor-calendar-open) .monitor-summary,
    .monitor-page:not(.monitor-calendar-open) .monitor-footer { flex: 0 0 auto; }
    .monitor-page:not(.monitor-calendar-open) .monitor-grid {
      flex: 1 1 0;
      height: auto;
      min-height: 0;
      grid-auto-rows: minmax(0, 1fr);
      align-items: stretch;
    }
    .monitor-page:not(.monitor-calendar-open) .monitor-grid .monitor-call,
    .monitor-page:not(.monitor-calendar-open) .monitor-grid .monitor-list-card {
      height: 100% !important;
      min-height: 0 !important;
      max-height: none !important;
      align-self: stretch;
    }
    .monitor-page:not(.monitor-calendar-open) .monitor-footer {
      position: static;
      bottom: auto;
    }
    .monitor-page.monitor-calendar-open {
      display: block;
      overflow-y: auto;
      overscroll-behavior-y: contain;
    }
    @media (min-width: 1280px) {
      .monitor-page:not(.monitor-calendar-open) .monitor-grid {
        grid-template-rows: minmax(0, 1fr);
      }
    }
    @media (min-width: 761px) and (max-width: 1279px) {
      .monitor-page:not(.monitor-calendar-open) .monitor-grid {
        grid-template-rows: repeat(2, minmax(0, 1fr));
      }
    }
    @media (max-width: 760px) {
      .monitor-page:not(.monitor-calendar-open) {
        display: block;
        overflow-y: auto;
        overscroll-behavior-y: contain;
      }
      .monitor-page:not(.monitor-calendar-open) .monitor-grid {
        display: grid;
        height: auto;
        min-height: 0;
        grid-template-rows: none;
        grid-auto-rows: auto;
      }
      .monitor-page:not(.monitor-calendar-open) .monitor-grid .monitor-call,
      .monitor-page:not(.monitor-calendar-open) .monitor-grid .monitor-list-card {
        height: clamp(240px, 55vh, 460px) !important;
        height: clamp(240px, 55dvh, 460px) !important;
      }
      .monitor-page:not(.monitor-calendar-open) .monitor-footer {
        position: sticky;
        bottom: -8px;
      }
    }
    .login-api-status { display:flex; align-items:center; justify-content:center; gap:7px; min-height:28px; padding:5px 8px; border-radius:9px; background:var(--surface-2); color:var(--muted); font-size:12px; font-weight:750; text-align:center; }
    .login-api-status::before { content:''; width:8px; height:8px; flex:0 0 auto; border-radius:50%; background:#ffd17d; box-shadow:0 0 0 4px rgba(255,209,125,.14); }
    .login-api-status.is-online { color:#176a46; background:#eaf8f1; }
    .login-api-status.is-online::before { background:#39b77c; box-shadow:0 0 0 4px rgba(57,183,124,.14); }
    .login-api-status.is-error { color:#982834; background:#fff0f2; }
    .login-api-status.is-error::before { background:#e45161; box-shadow:0 0 0 4px rgba(228,81,97,.14); }
