@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css');
@import url('https://cdn.jsdelivr.net/npm/pixeden-stroke-7-icon@1.2.3/pe-icon-7-stroke/dist/pe-icon-7-stroke.min.css');

/* ==========================================================================
   PANTHER HMR - ESTILOS GLOBAIS DO SISTEMA
   ========================================================================== */


/* --- MENU LATERAL (SIDEBAR) --- */
.app-sidebar__heading {
    color: #F48120 !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
}

.vertical-nav-menu li a.mm-active {
    background-color: #F48120 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

.vertical-nav-menu li a:hover {
    background-color: #fff7ed !important;
    color: #F48120 !important;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    background-color: #F48120 !important;
}

/* --- INPUTS E SELECTS --- */
input:focus,
select:focus,
textarea:focus {
    border-color: #F48120 !important;
    box-shadow: 0 0 0 0.2rem rgba(244, 129, 32, 0.25) !important;
}

/* --- VALIDATION FEEDBACK --- */
.is-invalid-field {
    border-color: #dc3545 !important;
}
.is-invalid-field:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.is-valid-field {
    border-color: #198754 !important;
}
.is-valid-field:focus {
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25) !important;
}

.is-warning-field {
    border-color: #F48120 !important;
}
.is-warning-field:focus {
    box-shadow: 0 0 0 0.2rem rgba(244, 129, 32, 0.25) !important;
}

/* --- CARDS E CAIXAS --- */
.card-custom-box,
.card-faturamento-box {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
}

.secao-titulo-sub,
.secao-titulo-tabela {
    font-size: 11px;
    text-transform: uppercase;
    color: #F48120;
    font-weight: 800;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 6px;
    letter-spacing: 0.5px;
}

/* --- TABELAS PADRÃO PANTHER --- */
.tabela-panther th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    padding: 14px 20px !important;
    border-bottom: 2px solid #e2e8f0 !important;
    text-align: center;
}

.tabela-panther td {
    padding: 14px 20px !important;
    font-size: 13px;
    vertical-align: middle !important;
    color: #334155 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    background-color: #ffffff !important;
    text-align: center;
}

.tabela-panther tr:hover td {
    background-color: #f8fafc !important;
}

.tabela-panther tr.selecionado td {
    background-color: #fff7ed !important;
}

/* --- BOTÕES GLOBAIS --- */
.btn-salvar-panther,
.btn-voltar-topo,
.btn-success-panther {
    font-family: inherit !important;
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}

.btn-salvar-panther {
    background-color: #F48120 !important;
    border: 1px solid #F48120 !important;
    color: #ffffff !important;
}

.btn-salvar-panther:hover:not(:disabled) {
    background-color: #ea580c !important;
}

.btn-salvar-panther:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-success-panther {
    background-color: #22c55e !important;
    border: 1px solid #22c55e !important;
    color: #ffffff !important;
}

.btn-success-panther:hover:not(:disabled) {
    background-color: #16a34a !important;
}

.btn-success-panther:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-voltar-topo {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #000000 !important;
}

.btn-voltar-topo:hover {
    color: #000000 !important;
    background-color: #f8fafc !important;
}

.btn-acao-arredondado {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    color: #64748b;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    margin: 0 2px;
}

.btn-acao-arredondado:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.06);
}

.btn-acao-del:hover {
    border-color: #ef4444;
    color: #ef4444;
    background-color: #fef2f2;
}

.btn-acao-edit:hover {
    border-color: #F48120;
    color: #F48120;
    background-color: #fff7ed;
}

/* Botões de ordenação nas tabelas */
.sort-icon-panther {
    padding: 3px 5px !important;
    border-radius: 4px !important;
    background-color: transparent !important;
    transition: background-color 0.2s ease, color 0.2s ease !important;
}

.sort-icon-panther.active {
    background-color: #fdba74 !important;
    color: #1e293b !important;
}

.btn-acao-copy:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background-color: #eff6ff;
}

.btn-os-pac:hover {
    border-color: #10b981;
    color: #10b981;
    background-color: #ecfdf5;
}

/* --- BADGES (STATUS) --- */
.badge-status-ativa {
    background-color: #dcfce7;
    color: #15803d;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 30px;
    display: inline-block;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    border: 1px solid #86efac;
}

.badge-status-ativa:hover {
    background-color: #bbf7d0;
    transform: scale(1.04);
}

.badge-status-suspensa {
    background-color: #fee2e2;
    color: #b91c1c;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 30px;
    display: inline-block;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    border: 1px solid #fca5a5;
}

.badge-status-suspensa:hover {
    background-color: #fca5a5;
    transform: scale(1.04);
}

.badge-status-vinculado {
    background-color: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 30px;
    display: inline-block;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    border: 1px solid #7dd3fc;
}

.badge-status-vinculado:hover {
    background-color: #bae6fd;
    transform: scale(1.04);
}

/* --- MODAIS GLOBAIS --- */
.modal-custom {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    display: none;
}

.modal-custom.active {
    display: block;
}

.modal-backdrop-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
}

.modal-backdrop-custom.active {
    display: block;
}

/* --- TELA DE CARREGAMENTO (LOADING) --- */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    visibility: visible;
    opacity: 1;
}

/* Old Page Loader - spinner-panther (Retrievable)
.spinner-panther {
    width: 60px;
    height: 60px;
    border: 5px solid #f1f5f9;
    border-top: 5px solid #F48120;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
*/
.spinner-panther {
    display: none !important;
}

/* --- PIZZA WHEEL LOADER (CLINIC) --- */
.loader-svg-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-svg {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 4px 12px rgba(30,33,48,0.15));
}

.ring path {
    stroke: #EDEEF0;
    stroke-width: 1.6;
    stroke-linejoin: round;
}

.ring {
    transform-box: view-box;
    transform-origin: 200px 200px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes spin-ccw {
    from { transform: rotate(0deg); }
    to   { transform: rotate(-360deg); }
}

/* each jerk below eases from a brief rest into the next 15°, mimicking a real ratcheting wheel */
@keyframes jerk-cw {
  0.0000% { transform: rotate(0deg); animation-timing-function: linear; }
  2.2917% { transform: rotate(0deg); animation-timing-function: ease-in-out; }
  4.1667% { transform: rotate(15deg); animation-timing-function: linear; }
  6.4583% { transform: rotate(15deg); animation-timing-function: ease-in-out; }
  8.3333% { transform: rotate(30deg); animation-timing-function: linear; }
  10.6250% { transform: rotate(30deg); animation-timing-function: ease-in-out; }
  12.5000% { transform: rotate(45deg); animation-timing-function: linear; }
  14.7917% { transform: rotate(45deg); animation-timing-function: ease-in-out; }
  16.6667% { transform: rotate(60deg); animation-timing-function: linear; }
  18.9583% { transform: rotate(60deg); animation-timing-function: ease-in-out; }
  20.8333% { transform: rotate(75deg); animation-timing-function: linear; }
  23.1250% { transform: rotate(75deg); animation-timing-function: ease-in-out; }
  25.0000% { transform: rotate(90deg); animation-timing-function: linear; }
  27.2917% { transform: rotate(90deg); animation-timing-function: ease-in-out; }
  29.1667% { transform: rotate(105deg); animation-timing-function: linear; }
  31.4583% { transform: rotate(105deg); animation-timing-function: ease-in-out; }
  33.3333% { transform: rotate(120deg); animation-timing-function: linear; }
  35.6250% { transform: rotate(120deg); animation-timing-function: ease-in-out; }
  37.5000% { transform: rotate(135deg); animation-timing-function: linear; }
  39.7917% { transform: rotate(135deg); animation-timing-function: ease-in-out; }
  41.6667% { transform: rotate(150deg); animation-timing-function: linear; }
  43.9583% { transform: rotate(150deg); animation-timing-function: ease-in-out; }
  45.8333% { transform: rotate(165deg); animation-timing-function: linear; }
  48.1250% { transform: rotate(165deg); animation-timing-function: ease-in-out; }
  50.0000% { transform: rotate(180deg); animation-timing-function: linear; }
  52.2917% { transform: rotate(180deg); animation-timing-function: ease-in-out; }
  54.1667% { transform: rotate(195deg); animation-timing-function: linear; }
  56.4583% { transform: rotate(195deg); animation-timing-function: ease-in-out; }
  58.3333% { transform: rotate(210deg); animation-timing-function: linear; }
  60.6250% { transform: rotate(210deg); animation-timing-function: ease-in-out; }
  62.5000% { transform: rotate(225deg); animation-timing-function: linear; }
  64.7917% { transform: rotate(225deg); animation-timing-function: ease-in-out; }
  66.6667% { transform: rotate(240deg); animation-timing-function: linear; }
  68.9583% { transform: rotate(240deg); animation-timing-function: ease-in-out; }
  70.8333% { transform: rotate(255deg); animation-timing-function: linear; }
  73.1250% { transform: rotate(255deg); animation-timing-function: ease-in-out; }
  75.0000% { transform: rotate(270deg); animation-timing-function: linear; }
  77.2917% { transform: rotate(270deg); animation-timing-function: ease-in-out; }
  79.1667% { transform: rotate(285deg); animation-timing-function: linear; }
  81.4583% { transform: rotate(285deg); animation-timing-function: ease-in-out; }
  83.3333% { transform: rotate(300deg); animation-timing-function: linear; }
  85.6250% { transform: rotate(300deg); animation-timing-function: ease-in-out; }
  87.5000% { transform: rotate(315deg); animation-timing-function: linear; }
  89.7917% { transform: rotate(315deg); animation-timing-function: ease-in-out; }
  91.6667% { transform: rotate(330deg); animation-timing-function: linear; }
  93.9583% { transform: rotate(330deg); animation-timing-function: ease-in-out; }
  95.8333% { transform: rotate(345deg); animation-timing-function: linear; }
  98.1250% { transform: rotate(345deg); animation-timing-function: ease-in-out; }
  100% { transform: rotate(360deg); }
}

@keyframes jerk-ccw {
  0.0000% { transform: rotate(0deg); animation-timing-function: linear; }
  2.2917% { transform: rotate(0deg); animation-timing-function: ease-in-out; }
  4.1667% { transform: rotate(-15deg); animation-timing-function: linear; }
  6.4583% { transform: rotate(-15deg); animation-timing-function: ease-in-out; }
  8.3333% { transform: rotate(-30deg); animation-timing-function: linear; }
  10.6250% { transform: rotate(-30deg); animation-timing-function: ease-in-out; }
  12.5000% { transform: rotate(-45deg); animation-timing-function: linear; }
  14.7917% { transform: rotate(-45deg); animation-timing-function: ease-in-out; }
  16.6667% { transform: rotate(-60deg); animation-timing-function: linear; }
  18.9583% { transform: rotate(-60deg); animation-timing-function: ease-in-out; }
  20.8333% { transform: rotate(-75deg); animation-timing-function: linear; }
  23.1250% { transform: rotate(-75deg); animation-timing-function: ease-in-out; }
  25.0000% { transform: rotate(-90deg); animation-timing-function: linear; }
  27.2917% { transform: rotate(-90deg); animation-timing-function: ease-in-out; }
  29.1667% { transform: rotate(-105deg); animation-timing-function: linear; }
  31.4583% { transform: rotate(-105deg); animation-timing-function: ease-in-out; }
  33.3333% { transform: rotate(-120deg); animation-timing-function: linear; }
  35.6250% { transform: rotate(-120deg); animation-timing-function: ease-in-out; }
  37.5000% { transform: rotate(-135deg); animation-timing-function: linear; }
  39.7917% { transform: rotate(-135deg); animation-timing-function: ease-in-out; }
  41.6667% { transform: rotate(-150deg); animation-timing-function: linear; }
  43.9583% { transform: rotate(-150deg); animation-timing-function: ease-in-out; }
  45.8333% { transform: rotate(-165deg); animation-timing-function: linear; }
  48.1250% { transform: rotate(-165deg); animation-timing-function: ease-in-out; }
  50.0000% { transform: rotate(-180deg); animation-timing-function: linear; }
  52.2917% { transform: rotate(-180deg); animation-timing-function: ease-in-out; }
  54.1667% { transform: rotate(-195deg); animation-timing-function: linear; }
  56.4583% { transform: rotate(-195deg); animation-timing-function: ease-in-out; }
  58.3333% { transform: rotate(-210deg); animation-timing-function: linear; }
  60.6250% { transform: rotate(-210deg); animation-timing-function: ease-in-out; }
  62.5000% { transform: rotate(-225deg); animation-timing-function: linear; }
  64.7917% { transform: rotate(-225deg); animation-timing-function: ease-in-out; }
  66.6667% { transform: rotate(-240deg); animation-timing-function: linear; }
  68.9583% { transform: rotate(-240deg); animation-timing-function: ease-in-out; }
  70.8333% { transform: rotate(-255deg); animation-timing-function: linear; }
  73.1250% { transform: rotate(-255deg); animation-timing-function: ease-in-out; }
  75.0000% { transform: rotate(-270deg); animation-timing-function: linear; }
  77.2917% { transform: rotate(-270deg); animation-timing-function: ease-in-out; }
  79.1667% { transform: rotate(-285deg); animation-timing-function: linear; }
  81.4583% { transform: rotate(-285deg); animation-timing-function: ease-in-out; }
  83.3333% { transform: rotate(-300deg); animation-timing-function: linear; }
  85.6250% { transform: rotate(-300deg); animation-timing-function: ease-in-out; }
  87.5000% { transform: rotate(-315deg); animation-timing-function: linear; }
  89.7917% { transform: rotate(-315deg); animation-timing-function: ease-in-out; }
  91.6667% { transform: rotate(-330deg); animation-timing-function: linear; }
  93.9583% { transform: rotate(-330deg); animation-timing-function: ease-in-out; }
  95.8333% { transform: rotate(-345deg); animation-timing-function: linear; }
  98.1250% { transform: rotate(-345deg); animation-timing-function: ease-in-out; }
  100% { transform: rotate(-360deg); }
}

/* innermost: sustained, steady rotation */
.ring1 { animation: spin     3s  linear infinite normal; }
/* counter-clockwise, eases in/out each turn, with a higher top speed through the middle */
.ring2 { animation: spin-ccw 6s  cubic-bezier(0.87, 0, 0.13, 1) infinite normal; }
/* jerky, counter-clockwise, 15° per jerk, quicker than the outer ring */
.ring3 { animation: jerk-ccw 8s  linear infinite normal; }
/* jerky, clockwise, 15° per jerk, 1 jerk/second like an hour hand */
.ring4 { animation: jerk-cw  24s linear infinite normal; }

/* subtle center hub so it doesn't look hollow */
.hub {
    fill: #1E2130;
}


/* --- AUTOCOMPLETE GERAL --- */
.autocomplete-container {
    position: relative;
    width: 100%;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.autocomplete-list.active {
    display: block;
}

.autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
}

.autocomplete-item:hover {
    background-color: #fff7ed;
    color: #F48120;
}

.autocomplete-btn-novo {
    padding: 10px 12px;
    background-color: #f8fafc;
    color: #F48120;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
    border-top: 1px solid #cbd5e1;
    font-size: 11px;
    text-transform: uppercase;
}

.autocomplete-btn-novo:hover {
    background-color: #ffedd5;
}

/* --- TÍTULOS DE SEÇÃO GLOBAIS --- */
.titulo-secao-panther {
    color: #F48120 !important;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

/* --- CLASSE DE OCULTAÇÃO PARA IMPRESSÃO --- */
.print-only {
    display: none !important;
}

/* tela detalhes-os.html */
.tabela-detalhes th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    border-bottom: 2px solid #e2e8f0 !important;
    padding: 14px 20px !important;
    text-align: center;
}

.tabela-detalhes td {
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 14px 20px !important;
    font-size: 13px;
    vertical-align: middle !important;
    color: #334155 !important;
    background-color: #ffffff !important;
    text-align: center;
}

.badge-status-aberto {
    background-color: #fff7ed;
    color: #F48120;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid #fdba74;
    letter-spacing: 0.5px;
}

.badge-status-quitado {
    background-color: #dcfce7;
    color: #15803d;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid #86efac;
    letter-spacing: 0.5px;
}

.badge-status-cancelado {
    background-color: #fee2e2;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid #fca5a5;
    letter-spacing: 0.5px;
}

.resumo-financeiro-container {
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.resumo-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
}

.resumo-destaque {
    font-size: 18px;
    font-weight: 900;
    color: #1e293b;
    border-top: 2px dashed #cbd5e1;
    padding-top: 12px;
    margin-top: 12px;
}

.saldo-devedor {
    color: #ef4444;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -1px;
}

.switch-custom {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.switch-custom input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-custom {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 22px;
}

.slider-custom::before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked+.slider-custom {
    background-color: #F48120;
}

input:checked+.slider-custom::before {
    transform: translateX(18px);
}

.lista-pagamentos {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

/* --- TELAS DE CADASTRO (PACIENTES, PROFISSIONAIS, ETC) --- */
.card-cadastro-paciente {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
}

.secao-titulo-cadastro {
    color: #F48120;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 6px;
}

.loading-cep {
    opacity: 0.6;
    cursor: wait;
}

.tabela-panther th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    padding: 14px 20px !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

.tabela-panther td {
    padding: 14px 20px !important;
    font-size: 13px;
    vertical-align: middle !important;
    color: #334155 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    background-color: #ffffff !important;
}

.tabela-panther tr:hover td {
    background-color: #f8fafc !important;
}

.link-tabela-panther {
    color: #334155;
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
}

.link-tabela-panther:hover {
    color: #F48120;
    text-decoration: none !important;
}

.w-120px {
    width: 120px !important;
}

.w-50px {
    width: 50px !important;
}

.w-100px {
    width: 100px !important;
}

.w-130px {
    width: 130px !important;
}

.w-140px {
    width: 140px !important;
}

.w-150px {
    width: 150px !important;
}

.w-160px {
    width: 160px !important;
}

.w-180px {
    width: 180px !important;
}

.w-200px {
    width: 200px !important;
}

.h-31px {
    height: 31px !important;
}

.h-34px {
    height: 34px !important;
}

.letter-spacing-1 {
    letter-spacing: 1px !important;
}

.badge-rastreio {
    font-size: 9px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

.badge-rastreio-orcamento {
    background-color: #fff7ed;
    color: #F48120;
    border-color: #fdba74;
}

.badge-rastreio-os {
    background-color: #f0fdf4;
    color: #166534;
    border-color: #86efac;
}

.badge-rastreio-vazio {
    background-color: #f1f5f9;
    color: #94a3b8;
    border-color: #cbd5e1;
}

/* --- COMPONENTES DA TELA DE DETALHES (PROFISSIONAL/PACIENTE) --- */
.paciente-header-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.paciente-nome-destaque {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.paciente-badge-idade {
    background-color: #f1f5f9;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    margin-left: 10px;
    vertical-align: middle;
}

/* SISTEMA DE ABAS (TABS) */
.nav-tabs-panther {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    padding: 8px;
    list-style: none;
}

.nav-tabs-panther .nav-item {
    margin-bottom: 0;
}

.nav-tabs-panther .nav-link {
    color: #475569;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 8px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.nav-tabs-panther .nav-link:hover {
    color: #F48120;
}

.nav-tabs-panther .nav-link.active {
    color: #F48120;
    background-color: #fff7ed;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* TÍTULOS E COMPONENTES ESPECÍFICOS */
.secao-titulo-cadastro {
    color: #F48120;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 6px;
    margin-bottom: 1rem;
}

.checkbox-dia-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
}

.dinamico-hide {
    display: none !important;
}

/* MULTI-SELECT EM ÁRVORE (SALAS DA AGENDA) */
.custom-multi-select {
    position: relative;
    width: 100%;
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 280px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    z-index: 1050;
    padding: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    display: none;
}

.tree-node {
    display: flex;
    flex-direction: column;
}

.tree-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 4px;
}

.tree-row:hover {
    background-color: #f8fafc;
}

.tree-expander {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #64748b;
    transition: transform 0.2s;
}

.tree-expander.empty {
    visibility: hidden;
}

.tree-expander.open i {
    transform: rotate(90deg);
}

.tree-checkbox {
    margin: 0;
    cursor: pointer;
    width: 14px;
    height: 14px;
    accent-color: #F48120;
}

.tree-text {
    font-size: 11px;
    font-weight: 700;
    color: #334155;
    user-select: none;
}

.tree-children {
    padding-left: 22px;
    display: none;
    border-left: 1px dotted #cbd5e1;
    margin-left: 8px;
}

.tree-children.active {
    display: block;
}

.sala-chip {
    background-color: #fff7ed;
    color: #F48120;
    border: 1px solid #fdba74;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sala-chip i {
    cursor: pointer;
    font-size: 11px;
    transition: color 0.2s;
}

.sala-chip i:hover {
    color: #ea580c;
}

/* Classes Utilitárias (Substitutas do inline style) */
.bg-f8fafc {
    background-color: #f8fafc;
}

.btn-dark-slate {
    background-color: #1e293b;
    border-radius: 6px;
    color: #ffffff !important;
}

.btn-dark-slate:hover {
    background-color: #334155 !important;
    color: #ffffff !important;
    text-decoration: none;
}

.btn-orange-panther {
    background-color: #F48120;
    border-radius: 6px;
}

.label-xs {
    font-size: 10px;
}

.border-none {
    border: none !important;
}

.table-container-480 {
    max-height: 480px;
    overflow-y: auto;
}

.table-container-280 {
    max-height: 280px;
    overflow-y: auto;
}

.w-110 {
    width: 110px;
}

.w-100-px {
    width: 100px;
}

.th-especialidade {
    text-align: left;
    padding-left: 15px !important;
}

.th-acao-60 {
    width: 60px;
}

.btn-select-salas {
    cursor: pointer;
    background-color: #fff;
}

.btn-adicionar-esp {
    background-color: #2b9348;
}

.label-loading {
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
}


.borda-reta {
    border-radius: 0 !important;
}

.bg-f8fafc {
    background-color: #f8fafc !important;
}

.border-e2e8f0 {
    border-color: #e2e8f0 !important;
}

.font-10 {
    font-size: 10px !important;
}

.font-11 {
    font-size: 11px !important;
}

.font-12 {
    font-size: 12px !important;
}

.font-13 {
    font-size: 13px !important;
}

.font-15 {
    font-size: 15px !important;
}

.font-24 {
    font-size: 24px !important;
}

.espaco-letra {
    letter-spacing: 0.5px !important;
}

.espaco-letra-neg {
    letter-spacing: -0.5px !important;
}

.h-45 {
    height: 45px !important;
}

.w-100px {
    width: 100px !important;
}

.w-45px {
    width: 45px !important;
}

.linha-altura-13 {
    line-height: 1.3 !important;
}

.borda-tracejada {
    border-top: 1px dashed #cbd5e1 !important;
    padding-top: 6px !important;
}

.cursor-pointer {
    cursor: pointer !important;
}

.btn-salvar-os {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

/* --- CALCULADORA COMERCIAL --- */
.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 10px;
}

.calc-btn {
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 10px;
    font-weight: 800;
    border-radius: 0;
    font-size: 14px;
    color: #334155;
    transition: 0.1s;
    cursor: pointer;
}

.calc-btn:hover {
    background-color: #e2e8f0;
}

.calc-btn.op {
    background-color: #fff7ed;
    color: #F48120;
    border-color: #fdba74;
}

.calc-btn.op:hover {
    background-color: #ffedd5;
}

.calc-btn.eval {
    background-color: #F48120;
    color: white;
    border-color: #F48120;
    grid-column: span 2;
}

.calc-btn.eval:hover {
    background-color: #ea580c;
}

.calc-display {
    background: #0f172a;
    color: #10b981;
    font-family: monospace;
    font-size: 20px;
    padding: 10px;
    text-align: right;
    letter-spacing: 1px;
    width: 100%;
    border: none;
    outline: none;
}

/* --- BOTÕES PANTHER PADRONIZADOS --- */
.btn-voltar-panther {
    background-color: transparent !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    padding: 8px 20px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

.btn-voltar-panther:hover {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
    border-color: #94a3b8 !important;
    text-decoration: none !important;
}

.btn-atendimento-controle {
    background-color: #1a1c1e !important;
    border: 1px solid #2d3139 !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 16px;
    border-radius: 6px;
    width: 100%;
    transition: all 0.2s;
}

.btn-atendimento-controle:hover {
    background-color: #F48120 !important;
    border-color: #F48120 !important;
    color: #ffffff !important;
}

.btn-panther-vincular-bloco {
    background-color: #F48120 !important;
    border: 1px solid #F48120 !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 16px;
    border-radius: 6px;
    width: 100%;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(244, 129, 32, 0.2);
}

.btn-panther-vincular-bloco:hover {
    background-color: #e07116 !important;
    border-color: #e07116 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(244, 129, 32, 0.3);
    color: #ffffff !important;
}

.btn-excluir-convenio {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: none;
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-excluir-convenio:hover {
    background-color: #ef4444;
    color: #ffffff;
    transform: scale(1.05);
}

/* --- LAYOUT DE IMPRESSÃO GLOBAL E CAMADA DE DOCUMENTOS (PANTHER DOCUMENTOS) --- */

/* Esconder raiz de impressão no modo normal */
#panther-print-root {
    display: none;
}

/* Container de captura de PDF fora da tela (renderizável pelo html2canvas) */
.panther-pdf-offscreen {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    z-index: 9998 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    width: 190mm !important;
    max-width: 190mm !important;
    box-sizing: border-box !important;
    background-color: #ffffff !important;
    pointer-events: none !important;
}

/* Regra Global de Impressão (panther-print-mode) */
@media print {
    @page {
        margin: 5mm;
    }

    body, html {
        margin: 0;
        padding: 0;
        background-color: #fff !important;
    }

    /* Quando estiver no modo de impressão Panther, esconde todos os elementos do body exceto o print-root */
    body.panther-print-mode > *:not(#panther-print-root) {
        display: none !important;
    }

    body.panther-print-mode #panther-print-root {
        display: block !important;
        position: relative !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 10px !important;
        background: #ffffff !important;
        color: #000000 !important;
    }
}

/* Estilos de Documentos Padronizados Panther */
.panther-doc-container {
    font-family: Arial, Helvetica, sans-serif;
    color: #1e293b;
    background: #ffffff;
    padding: 15px;
    box-sizing: border-box;
}

.panther-doc-a4 {
    width: 100%;
    max-width: 190mm;
    margin: 0 auto;
    box-sizing: border-box;
}

.panther-doc-a4 table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    box-sizing: border-box;
}

.panther-doc-a4 th,
.panther-doc-a4 td {
    box-sizing: border-box;
    word-break: break-word;
}

.panther-doc-termica {
    max-width: 300px;
    margin: 0 auto;
    font-size: 11px;
    font-family: 'Courier New', Courier, monospace;
}

.panther-doc-header {
    border-bottom: 2px solid #F48120;
    padding-bottom: 12px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panther-doc-logo-box {
    max-height: 55px;
    margin-right: 15px;
}

.panther-doc-logo {
    max-height: 50px;
    max-width: 180px;
    object-fit: contain;
}

.panther-doc-header-standard {
    flex-grow: 1;
}

.panther-doc-clinica-nome {
    font-size: 16px;
    font-weight: bold;
    color: #F48120;
    text-transform: uppercase;
}

.panther-doc-clinica-meta {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

.panther-doc-header-custom {
    flex-grow: 1;
    font-size: 12px;
    line-height: 1.4;
}

.panther-doc-title-block {
    text-align: center;
    margin-bottom: 15px;
    border-bottom: 1px dashed #cbd5e1;
    padding-bottom: 8px;
}

.panther-doc-title {
    font-size: 16px;
    font-weight: bold;
    color: #0f172a;
    text-transform: uppercase;
}

.panther-doc-subtitle {
    font-size: 12px;
    color: #64748b;
    margin-top: 3px;
}

.panther-doc-body {
    margin-bottom: 20px;
}

.panther-doc-footer {
    border-top: 1px dashed #cbd5e1;
    padding-top: 12px;
    margin-top: 20px;
    page-break-inside: avoid;
}

.panther-doc-footer-standard {
    font-size: 10px;
    color: #64748b;
    line-height: 1.4;
}

.panther-doc-footer-custom {
    font-size: 11px;
    line-height: 1.4;
}

.panther-doc-timestamp {
    font-size: 9px;
    color: #94a3b8;
    text-align: right;
    margin-top: 8px;
}

/* Estilos Específicos para a tela e recibo de Repasse dos Médicos */
.filter-card {
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}
.summary-bar {
    background: #f8f9fa;
    border-left: 4px solid #3f6ad8;
    border-radius: 6px;
    padding: 12px 20px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.btn-round-action {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50% !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease-in-out;
}
.btn-round-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.badge-status-pendente {
    background-color: #ffe8e6;
    color: #d92550;
    border: 1px solid #fbe1e1;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}
.badge-status-efetivado {
    background-color: #e0f8e9;
    color: #3ac47d;
    border: 1px solid #c8f2d5;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}
.table-repasse th {
    background-color: #f8f9fa;
    font-weight: 700;
    color: #495057;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dee2e6;
    vertical-align: middle;
}
.table-repasse td {
    vertical-align: middle;
    font-size: 0.88rem;
}
.recibo-header {
    border-bottom: 2px solid #3f6ad8;
    padding-bottom: 12px;
    margin-bottom: 15px;
}
.recibo-title {
    font-size: 18pt;
    font-weight: bold;
    color: #16a085;
    text-align: center;
    text-transform: uppercase;
    margin-top: 10px;
}
.recibo-sub {
    font-size: 10pt;
    color: #6c757d;
    text-align: center;
}
.recibo-info-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px 15px;
    margin-bottom: 15px;
    font-size: 10pt;
}
.recibo-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 9.5pt;
}
.recibo-table th, .recibo-table td {
    border: 1px solid #dee2e6;
    padding: 8px;
    text-align: left;
}
.recibo-table th {
    background-color: #f1f3f5;
    font-weight: bold;
}
.recibo-assinatura {
    margin-top: 40px;
    text-align: center;
    font-size: 9.5pt;
}
.linha-assinatura {
    width: 250px;
    border-top: 1px solid #000;
    margin: 0 auto 5px auto;
}

/* Helpers de Layout CSS Limpos */
.flex-grow-6-custom { flex-grow: 6; flex-basis: 0%; min-width: 250px; }
.flex-grow-4-custom { flex-grow: 4; flex-basis: 0%; min-width: 180px; }
.flex-grow-0-custom { flex-grow: 0; flex-shrink: 0; flex-basis: auto; }
.w-80px { width: 80px; }
.w-40px { width: 40px; }
.w-110px { width: 110px; }
.w-250px { width: 250px; }
.cursor-pointer { cursor: pointer; }
.font-8pt { font-size: 8pt; }


/* --- CATEGORIAS DE SERVIÇOS --- */
.container-justo-categorias {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.card-categorias-main {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    min-height: 500px;
}

.text-panther {
    color: #F48120 !important;
}

.bg-light-panther {
    background-color: #f1f5f9 !important;
}

.w-80px {
    width: 80px !important;
}

.btn-panther-primary {
    background-color: #F48120 !important;
    border-color: #F48120 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    height: 35px !important;
}

.btn-panther-primary:hover:not(:disabled) {
    background-color: #ea580c !important;
    border-color: #ea580c !important;
    color: #ffffff !important;
    box-shadow: 0 4px 6px rgba(244, 129, 32, 0.3) !important;
}

/* --- PAGINAÇÃO GLOBAL PANTHER --- */
.panther-pag-top-bar {
    padding: 16px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 1px solid #e2e8f0 !important;
    background-color: #f8fafc !important;
}

.panther-pag-select {
    width: 70px !important;
    height: 28px !important;
    font-size: 11px !important;
    padding: 2px 8px !important;
    color: #212529 !important;
    font-weight: 700 !important;
    border-color: #ced4da !important;
    border-radius: 4px !important;
}

.panther-pag-bottom-bar {
    padding: 16px !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    border-top: 1px solid #e2e8f0 !important;
    background-color: #ffffff !important;
    border-radius: 0 0 8px 8px !important;
}

/* --- PREMIUM SAAS - SOFT UI DASHBOARD ACCESS --- */
.btn-pill-orange {
    background-color: #F48120 !important;
    border: 1px solid #F48120 !important;
    color: #ffffff !important;
    font-weight: 700;
    border-radius: 50px !important;
    padding: 10px 24px !important;
    box-shadow: 0 4px 12px rgba(244, 129, 32, 0.2);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-pill-orange:hover {
    background-color: #ea580c !important;
    border-color: #ea580c !important;
    box-shadow: 0 8px 20px rgba(244, 129, 32, 0.45);
    transform: translateY(-1px);
    color: #ffffff !important;
}

.card-acesso-premium {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    text-decoration: none !important;
    display: block;
    width: 100%;
}

.card-acesso-premium:hover {
    transform: translateY(-5px);
    border-color: rgba(244, 129, 32, 0.3) !important;
    box-shadow: 0 12px 25px rgba(244, 129, 32, 0.25);
}

.card-acesso-premium .icon-container {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background-color: #fff7ed;
    color: #F48120;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
    font-size: 24px;
    transition: all 0.3s ease;
}

.card-acesso-premium:hover .icon-container {
    background-color: #F48120;
    color: #ffffff;
    transform: scale(1.1);
}

.card-acesso-premium .card-title-text {
    color: #1e293b;
    font-weight: 700;
    font-size: 14px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Card KPI Clickable styling */
.card-kpi-clickable {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    display: block;
    text-decoration: none !important;
}

.card-kpi-clickable:hover {
    transform: translateY(-4px);
    border-color: rgba(244, 129, 32, 0.3) !important;
    box-shadow: 0 10px 20px rgba(244, 129, 32, 0.15) !important;
}

/* --- CLASSES DE ESTILOS EXTRAÍDAS (MOD. COMERCIAL) --- */
.font-14 {
    font-size: 14px !important;
}

.font-16 {
    font-size: 16px !important;
}

.fw-800 {
    font-weight: 800 !important;
}

.fw-900 {
    font-weight: 900 !important;
}

.w-50px {
    width: 50px !important;
}

.w-70px {
    width: 70px !important;
}

.w-130px {
    width: 130px !important;
}

.w-160px {
    width: 160px !important;
}

.btn-success-panther {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
}

.btn-success-panther:hover:not(:disabled) {
    background-color: #059669 !important;
    border-color: #059669 !important;
}

.btn-success-panther:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-blue-panther {
    background-color: #0ea5e9 !important;
    border-color: #0ea5e9 !important;
    color: #ffffff !important;
}

.btn-blue-panther:hover:not(:disabled) {
    background-color: #0284c7 !important;
    border-color: #0284c7 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(14, 165, 233, 0.3);
}

.btn-blue-panther:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-info-panther {
    background-color: #0ea5e9 !important;
    border-color: #0ea5e9 !important;
    color: #ffffff !important;
}

.btn-info-panther:hover:not(:disabled) {
    background-color: #0284c7 !important;
    border-color: #0284c7 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(14, 165, 233, 0.3);
}

.btn-info-panther:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --- EVITAR INVISIBILIDADE DE MODAIS E BOTÕES NO HOVER (EVENTO MOUSE) --- */

dialog, 
#modalAgendamento, 
#modalGerenciarAgendamento, 
#modalCadastroRapidoPaciente {
    opacity: 1 !important;
    visibility: visible !important;
}

dialog:hover, 
#modalAgendamento:hover, 
#modalGerenciarAgendamento:hover, 
#modalCadastroRapidoPaciente:hover {
    opacity: 1 !important;
    visibility: visible !important;
}

.btn-orange-panther,
.btn-agenda-reagendar {
    background-color: #F48120 !important;
    border: 1px solid #F48120 !important;
    color: #ffffff !important;
    opacity: 1 !important;
    transition: all 0.2s ease !important; /* Animação padrão do sistema */
}

.btn-orange-panther:hover,
.btn-orange-panther:focus,
.btn-orange-panther:active,
.btn-agenda-reagendar:hover,
.btn-agenda-reagendar:focus,
.btn-agenda-reagendar:active {
    background-color: #ea580c !important;
    border-color: #ea580c !important;
    color: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* PANTHER HMR - CONSOLIDATED SYSTEM-WIDE CLASSES */

.btn-panther-add {
    background-color: #F48120 !important;
    border: 1px solid #F48120 !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.72rem;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-panther-add:hover {
    background-color: #d66e13 !important;
    border-color: #d66e13 !important;
    color: #ffffff !important;
}

.btn-salvar {
    background-color: #10b981 !important;
    border: 1px solid #10b981 !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-salvar:hover {
    background-color: #059669 !important;
    border-color: #059669 !important;
}

.btn-voltar {
    background-color: #64748b !important;
    border: 1px solid #64748b !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-voltar:hover {
    background-color: #475569 !important;
    border-color: #475569 !important;
}

.form-section-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: #F48120;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 6px;
    margin-bottom: 15px;
}

/* --- ESTILOS DE MODAIS FINANCEIROS --- */
#modalCalculadora {
    width: 340px !important;
}

#modalNovoPaciente,
#modalPreCadastro {
    width: 500px !important;
    max-width: 95% !important;
    width: 500px !important;
    max-width: 95% !important;
}

/* --- TABELAS FINANCEIRAS --- */
.tabela-orcamentos th, .tabela-os th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    padding: 14px 20px !important;
    border-bottom: 2px solid #e2e8f0 !important;
    text-align: center;
}
.tabela-orcamentos td, .tabela-os td {
    padding: 14px 20px !important;
    font-size: 13px;
    vertical-align: middle !important;
    color: #334155 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    background-color: #ffffff !important;
    text-align: center;
}
.tabela-orcamentos tr:hover td, .tabela-os tr:hover td {
    background-color: #f8fafc !important;
}

/* --- BADGES DE STATUS FINANCEIROS --- */
.badge-status-aberto {
    background-color: #fff7ed !important;
    color: #F48120 !important;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 30px;
    display: inline-block;
    user-select: none;
    border: 1px solid #fdba74 !important;
}
.badge-status-quitado {
    background-color: #dcfce7 !important;
    color: #15803d !important;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 30px;
    display: inline-block;
    user-select: none;
    border: 1px solid #86efac !important;
}
.badge-status-cancelado {
    background-color: #fee2e2 !important;
    color: #b91c1c !important;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 30px;
    display: inline-block;
    user-select: none;
    border: 1px solid #fca5a5 !important;
}

/* --- BOTÕES DE AÇÃO ARREDONDADOS --- */
.btn-acao-arredondado {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    color: #64748b;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    margin: 0 2px;
    cursor: pointer;
}
.btn-acao-arredondado:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.06);
}
.btn-editar:hover, .btn-acao-editar:hover {
    border-color: #F48120;
    color: #F48120;
    background-color: #fff7ed;
}
.btn-historico:hover, .btn-acao-historico:hover, .btn-agenda:hover, .btn-acao-agenda:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background-color: #eff6ff;
}
.btn-deletar:hover, .btn-acao-cancelar:hover {
    border-color: #ef4444;
    color: #ef4444;
    background-color: #fef2f2;
}
.btn-acao-imprimir:hover {
    border-color: #64748b;
    color: #1e293b;
    background-color: #f1f5f9;
}
.btn-acao-executar:hover {
    border-color: #059669;
    color: #059669;
    background-color: #ecfdf5;
}
.btn-acao-diagnostico:hover {
    border-color: #8b5cf6;
    color: #8b5cf6;
    background-color: #f5f3ff;
}

/* --- OVERLAYS E MODAIS --- */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}
.loading-overlay.active {
    visibility: visible;
    opacity: 1;
}
/* Old Page Loader - spinner-panther (Retrievable)
.spinner-panther {
    width: 60px;
    height: 60px;
    border: 5px solid #f1f5f9;
    border-top: 5px solid #F48120;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
*/
.spinner-panther {
    display: none !important;
}

.modal-custom {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 10001;
    display: none;
}
.modal-custom.active {
    display: block;
}
.modal-backdrop-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: none;
}
.modal-backdrop-custom.active {
    display: block;
}

/* --- HISTÓRICO / TIMELINE --- */
#listaHistoricoContainer {
    padding-left: 10px;
    padding-right: 10px;
}
.timeline-item {
    position: relative;
    padding-left: 15px;
    margin-left: 10px;
    margin-bottom: 15px;
    border-left: 2px solid #e2e8f0;
}
.timeline-badge {
    display: inline-block;
    background-color: #F48120;
    color: white;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    text-transform: uppercase;
    white-space: nowrap;
    margin-right: 8px;
    vertical-align: middle;
}
.timeline-date {
    display: inline-block;
    font-size: 11px;
    color: #64748b;
    font-weight: 700;
    margin-left: 0;
    vertical-align: middle;
}
.timeline-text {
    font-size: 12px;
    color: #334155;
    font-weight: 600;
    margin-top: 4px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- CLASSES DE LARGURA (WIDTH HELPERS) --- */
.w-70px { width: 70px !important; }
.w-80px { width: 80px !important; }
.w-140px { width: 140px !important; }
.w-160px { width: 160px !important; }
.w-500px { width: 500px !important; }
.h-31px { height: 31px !important; }
.h-45 { height: 45px !important; }
.bg-f8fafc { background-color: #f8fafc !important; }
.border-success { border-color: #10b981 !important; }
.text-success { color: #10b981 !important; }

/* --- ADICIONAIS DE LAYOUT E RESPONSIVIDADE --- */
.w-15 { width: 15% !important; }
.w-35 { width: 35% !important; }
.grid-span-2 { grid-column: span 2 !important; }
.font-9 { font-size: 9px !important; }
.font-15 { font-size: 15px !important; }
.font-10 { font-size: 10px !important; }
.espaco-letra-zero { letter-spacing: 0 !important; }
.mt-5px { margin-top: 5px !important; }
.color-slate { color: #64748b !important; }

/* --- CUSTOM FINANCE LAYOUT CLASSES --- */
.w-90px { width: 90px !important; }
.w-100px { width: 100px !important; }
.w-110px { width: 110px !important; }
.w-120px { width: 120px !important; }
.w-130px { width: 130px !important; }
.w-max-content { max-width: max-content !important; }
.font-08rem { font-size: 0.8rem !important; }
.mh-80vh { max-height: 80vh !important; }
.text-truncate-paciente {
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.bloco-responsavel-financeiro {
    display: none;
    border-left: 3px solid #F48120;
    padding-left: 15px;
    margin-left: 5px;
}

/* --- ESTILOS DE FILA DE ESPERA (LISTA-ESPERA) --- */
.btn-orange-round {
    background-color: #F48120 !important;
    border-color: #F48120 !important;
    color: #ffffff !important;
}
.btn-orange-round:hover {
    background-color: #ea580c !important;
    border-color: #ea580c !important;
    color: #ffffff !important;
}
.btn-red-round {
    background-color: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}
.btn-red-round:hover {
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}
.btn-green-round {
    background-color: #22c55e !important;
    border-color: #22c55e !important;
    color: #ffffff !important;
}
.btn-green-round:hover {
    background-color: #16a34a !important;
    border-color: #16a34a !important;
    color: #ffffff !important;
}
.tabela-panther th, .tabela-panther td {
    text-align: center;
}
.tabela-panther th.text-start, .tabela-panther td.text-start {
    text-align: left !important;
}
.modal-ver-cadastro-espera {
    width: 600px !important;
    max-width: 95% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
}
.letter-spacing-05 {
    letter-spacing: 0.5px !important;
}

.h-49px {
    height: 49px !important;
}
.btn-close-custom-espera {
    background: none !important;
    border: none !important;
    font-size: 16px !important;
    color: #64748b !important;
    cursor: pointer !important;
}
.modal-visualizar-campo-espera {
    font-size: 13px !important;
    border: 1px solid #e2e8f0 !important;
}

/* Botões de ordenação nas tabelas (triângulos) */
.sort-icon-panther {
    padding: 3px 5px !important;
    border-radius: 4px !important;
    background-color: transparent !important;
    transition: background-color 0.2s ease, color 0.2s ease !important;
}

.sort-icon-panther.active {
    background-color: #fdba74 !important;
    color: #1e293b !important;
}

/* --- REMOÇÃO DE ÍCONES NATIVOS DE REVEAL DE SENHA DO NAVEGADOR --- */
input::-ms-reveal,
input::-ms-clear {
    display: none !important;
    width: 0;
    height: 0;
}
input::-webkit-contacts-auto-fill-button,
input::-webkit-credentials-auto-fill-button {
    visibility: hidden;
    pointer-events: none;
    right: 0;
}

/* ==========================================================================
   PANTHER HMR - TELA DE LOGIN
   ========================================================================== */
body.login-page {
    margin: 0;
    background: #ffffff;
    font-family: Arial, sans-serif;
}

.login-panther {
    min-height: 100vh;
    display: flex;
}

.login-left {
    width: 55%;
    background: #1a1c1e;
    color: #ffffff;
    padding: 55px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 39px, #fff 39px, #fff 40px),
        repeating-linear-gradient(90deg, transparent, transparent 39px, #fff 39px, #fff 40px);
}

.login-left-content {
    position: relative;
    z-index: 2;
    max-width: 430px;
}

.login-tag {
    display: inline-block;
    color: #F48120;
    border: 1px solid rgba(244, 129, 32, 0.35);
    background: rgba(244, 129, 32, 0.12);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 22px;
}

.login-left h1 {
    font-size: 42px;
    line-height: 1.1;
    font-weight: 900;
    margin: 0 0 18px;
}

.login-left h1 span {
    color: #F48120;
}

.login-left p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 15px;
    line-height: 1.7;
}

.login-stats {
    display: flex;
    gap: 24px;
    margin-top: 35px;
}

.login-stat strong {
    display: block;
    font-size: 22px;
    color: #ffffff;
}

.login-stat small {
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 1px;
}

.login-right {
    width: 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 45px;
    background: #ffffff;
}

.login-box {
    width: 100%;
    max-width: 360px;
}

.login-logo {
    width: 250px;
    margin-bottom: 35px;
}

.login-box h2 {
    color: #1e293b;
    font-size: 25px;
    font-weight: 900;
    margin-bottom: 6px;
}

.login-box p {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 25px;
}

.campo-login {
    margin-bottom: 16px;
}

.campo-login label {
    display: block;
    color: #475569;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.7px;
    margin-bottom: 7px;
}

.campo-login input {
    width: 100%;
    height: 45px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
}

.campo-login input:focus {
    border-color: #F48120;
    box-shadow: 0 0 0 3px rgba(244, 129, 32, 0.16);
    background: #ffffff;
}

.campo-senha-wrapper {
    position: relative;
}

.campo-senha-wrapper input[type="password"],
.campo-senha-wrapper input[type="text"] {
    padding-right: 45px;
}

.btn-toggle-senha {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 45px;
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.erro-login {
    display: none;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    margin-top: 14px;
    margin-bottom: 14px;
    font-weight: 700;
}

.btn-login {
    width: 100%;
    border: none;
    background: #F48120;
    color: #ffffff;
    height: 46px;
    border-radius: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
}

.btn-login:hover {
    background: #d66e13;
}

.btn-login-selection {
    margin-bottom: 12px;
}

.login-help {
    margin-top: 18px;
    color: #94a3b8;
    font-size: 11px;
    text-align: center;
}

.loading-text-login {
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
}

.container-selecao {
    display: none;
}

.subtitulo-selecao {
    margin-bottom: 25px;
}

@media(max-width: 800px) {
    .login-panther {
        display: block;
    }

    .login-left {
        display: none;
    }

    .login-right {
        width: 100%;
    }
}

/* --- TELA NOVO-METODO-PAGAMENTO.HTML --- */
.container-justo-metodo {
    max-width: 1150px;
    margin: 0 auto;
    width: 100%;
}

.card-custom-box {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
}

.secao-titulo-sub {
    font-size: 11px;
    text-transform: uppercase;
    color: #475569;
    font-weight: 800;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 6px;
    letter-spacing: 0.5px;
}

.tabela-parcelas-config th {
    background-color: #0f172a !important;
    color: #ffffff !important;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    padding: 10px !important;
    text-align: center;
}

.tabela-parcelas-config td {
    padding: 6px !important;
    vertical-align: middle !important;
    background-color: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.input-tabela-fin {
    width: 100%;
    max-width: 120px;
    text-align: center;
    font-weight: 700;
    color: #334155;
}

.btn-salvar-panther {
    background-color: #F48120 !important;
    border: 1px solid #F48120 !important;
    color: #ffffff !important;
    font-weight: 800;
    font-size: 0.9rem;
    padding: 8px 24px;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.btn-salvar-panther:hover:not(:disabled) {
    background-color: #ea580c !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(244, 129, 32, 0.3);
}

.btn-salvar-panther:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.subtitulo-contexto-metodo {
    color: #F48120;
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
}

.input-grid-taxa-container {
    max-width: 140px;
    margin: auto;
}

.input-grid-dias-container {
    max-width: 140px;
    margin: auto;
}

/* --- TELA EDITAR-CATEGORIA.HTML & NOVO-BLOCO.HTML --- */
.container-justo-form {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.chk-exame-lab {
    width: 16px;
    height: 16px;
}

.form-section-title {
    color: #F48120;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
    margin-bottom: 1rem;
}

.btn-salvar-bloco {
    background-color: #10b981 !important;
    border: 1px solid #10b981 !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.btn-salvar-bloco:hover {
    background-color: #059669 !important;
    border-color: #059669 !important;
}

.btn-voltar-bloco {
    background-color: #64748b !important;
    border: 1px solid #64748b !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.btn-voltar-bloco:hover {
    background-color: #475569 !important;
    border-color: #475569 !important;
}

.table-horarios th {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #475569;
    background-color: #f8fafc;
}

.table-horarios td {
    vertical-align: middle;
}

.alert-instrucao-horarios {
    background-color: #fff7ed;
    border-color: #fdba74;
    color: #9a3412;
    font-size: 0.8rem;
}

.w-150px { width: 150px; }
.w-180px { width: 180px; }

/* ==========================================================================
   PANTHER HMR - ATENDIMENTO CLÍNICO (DESIGN PREMIUM)
   ========================================================================== */

/* Animação de entrada */
.animate-fade-in {
    animation: pantherFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes pantherFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header & Cards do Atendimento */
.atendimento-header-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
    transition: box-shadow 0.25s ease;
}

.atendimento-header-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07) !important;
}

.atendimento-avatar {
    width: 52px;
    height: 52px;
    background-color: rgba(244, 129, 32, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #F48120;
    font-size: 1.25rem;
    border-radius: 50%;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.atendimento-avatar:hover {
    transform: scale(1.05);
    background-color: rgba(244, 129, 32, 0.2);
}

.atendimento-cronometro-badge {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 8px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.atendimento-cronometro-badge:hover {
    border-color: #f87171;
    background-color: #fee2e2;
}

.atendimento-cronometro-tempo {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 1px;
}

/* Modern Panther Cards */
.atendimento-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 0;
    max-width: 100%;
}

.atendimento-card-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 16px 20px !important;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
}

.atendimento-card-title {
    font-size: 0.825rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #F48120;
    letter-spacing: 0.5px;
    margin: 0;
    display: flex;
    align-items: center;
}

/* Sinais Vitais Input Styling */
.atendimento-vital-group {
    position: relative;
}

.atendimento-vital-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: block;
}

.atendimento-vital-input {
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    background-color: #f8fafc !important;
    transition: all 0.2s ease !important;
}

.atendimento-vital-input:focus {
    background-color: #ffffff !important;
    border-color: #F48120 !important;
    box-shadow: 0 0 0 4px rgba(244, 129, 32, 0.15) !important;
    outline: none !important;
}

.atendimento-vital-input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

/* Anamnese & Evolução Textarea */
.atendimento-evolucao-textarea {
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    color: #1e293b !important;
    background-color: #ffffff !important;
    min-height: 340px !important;
    resize: none !important;
    overflow-y: hidden !important;
    padding: 12px 16px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.atendimento-evolucao-textarea:focus {
    border-color: #F48120 !important;
    box-shadow: 0 0 0 4px rgba(244, 129, 32, 0.15) !important;
    outline: none !important;
}

/* Linha do Tempo / Timeline Scroll (Crescimento natural e confortável) */
.atendimento-timeline-scroll {
    min-height: 120px;
    padding-right: 8px;
    min-width: 0;
    max-width: 100%;
}

.timeline-container {
    min-width: 0;
    max-width: 100%;
}

.vertical-timeline-item,
.vertical-timeline-element-content {
    min-width: 0;
    max-width: 100%;
}

.timeline-title {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.atendimento-timeline-scroll::-webkit-scrollbar {
    width: 6px;
}

.atendimento-timeline-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.atendimento-timeline-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.atendimento-timeline-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.atendimento-timeline-text {
    line-height: 1.5;
    color: #475569;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
    max-width: 100%;
}

/* Botões do Rodapé de Atendimento */
.atendimento-btn {
    border-radius: 8px !important;
    font-weight: 700 !important;
    padding: 10px 20px !important;
    font-size: 0.85rem !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.atendimento-btn:hover:not(:disabled) {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
}

.atendimento-btn:active:not(:disabled) {
    transform: translateY(0) !important;
}

.atendimento-btn-cancelar {
    background-color: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
}

.atendimento-btn-cancelar:hover:not(:disabled) {
    background-color: #e2e8f0 !important;
    color: #1e293b !important;
}

.atendimento-btn-rascunho {
    background-color: #334155 !important;
    border: 1px solid #334155 !important;
    color: #ffffff !important;
}

.atendimento-btn-rascunho:hover:not(:disabled) {
    background-color: #1e293b !important;
}

.atendimento-btn-finalizar {
    background-color: #10b981 !important;
    border: 1px solid #10b981 !important;
    color: #ffffff !important;
}

.atendimento-btn-finalizar:hover:not(:disabled) {
    background-color: #059669 !important;
}

/* ==========================================================================
   PANTHER HMR - VISUAL BUILDER DE ESTRUTURA FÍSICA
   ========================================================================== */
.panther-structure-section-title {
    border: none !important;
}

.panther-structure-bloco-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.panther-structure-bloco-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.panther-structure-bloco-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.panther-structure-bloco-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panther-structure-bloco-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}

.panther-structure-bloco-stats {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.panther-structure-bloco-body {
    padding: 1.25rem;
}

/* Grid de Departamentos */
.panther-structure-deps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin-bottom: 0.5rem;
}

/* Card do Departamento */
.panther-structure-dep-card {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s ease,
                background-color 0.2s ease;
    user-select: none;
}

.panther-structure-dep-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: #94a3b8;
}

.panther-structure-dep-card.active {
    border-color: #F48120;
    background-color: #fffbf7;
    box-shadow: 0 0 0 3px rgba(244, 129, 32, 0.15), 0 4px 12px rgba(244, 129, 32, 0.08);
    transform: translateY(-2px);
}

.panther-structure-dep-card.dimmed {
    opacity: 0.85;
}

.panther-structure-dep-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.panther-structure-dep-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
}

.panther-structure-dep-meta {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
}

/* Gaveta de Salas do Departamento Selecionado */
.panther-structure-gaveta {
    background-color: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 1.25rem;
    margin-top: 1rem;
    animation: fadeInGaveta 0.2s ease-out;
}

@keyframes fadeInGaveta {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panther-structure-gaveta-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.panther-structure-gaveta-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Grid de Salas */
.panther-structure-salas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.75rem;
}

/* Card de Sala */
.panther-structure-sala-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.panther-structure-sala-card:hover {
    transform: translateY(-1px);
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.panther-structure-sala-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.panther-structure-sala-name {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1e293b;
}

.panther-structure-sala-badge {
    font-size: 0.6875rem;
}

/* Responsividade e Acessibilidade */
@media (max-width: 768px) {
    .panther-structure-deps-grid {
        grid-template-columns: 1fr;
    }
    .panther-structure-salas-grid {
        grid-template-columns: 1fr;
    }
    .panther-structure-bloco-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .panther-structure-bloco-card,
    .panther-structure-dep-card,
    .panther-structure-sala-card,
    .panther-structure-gaveta,
    .panther-perfil-card,
    .panther-modulo-card {
        transition: none !important;
        animation: none !important;
    }
}

/* --- PORTAL DE DOCUMENTAÇÃO & CONFORMIDADE --- */
.app-header__logo.doc-header-logo {
    width: 240px !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 1.5rem !important;
    background: #ffffff !important;
    border-bottom: 1px solid #f1f5f9;
}

.doc-logo-container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 48px !important;
    width: 165px !important;
    cursor: pointer;
}

.doc-logo-expanded {
    max-height: 100% !important;
    max-width: 100% !important;
    object-fit: contain !important;
    display: block !important;
}

/* Ajustes gerais de layout de documentação */
.doc-highlight-match {
    background-color: rgba(244, 129, 32, 0.25) !important;
    border-bottom: 2px solid #F48120;
    padding: 1px 3px;
    border-radius: 3px;
    color: #0f172a;
    font-weight: 600;
}

.doc-section-anchor {
    scroll-margin-top: 80px;
    transition: border-left-color 0.3s ease;
    border-left: 3px solid transparent;
    padding-left: 15px;
    margin-left: -18px;
}

.doc-section-anchor:target {
    border-left-color: #F48120;
    animation: highlightSection 1.5s ease-out;
}

@keyframes highlightSection {
    0% { background-color: rgba(244, 129, 32, 0.05); }
    100% { background-color: transparent; }
}

.search-snippet {
    font-size: 11.5px;
    color: #64748b;
    display: block;
    margin-top: 4px;
    font-weight: normal;
    line-height: 1.4;
    border-left: 2px solid #e2e8f0;
    padding-left: 8px;
}

.doc-nav-item {
    padding: 10px 14px !important;
    border-radius: 6px;
    font-size: 13px !important;
    display: block !important;
    height: auto !important;
    line-height: 1.4 !important;
    white-space: normal !important;
    word-break: break-word !important;
    transition: all 0.2s ease;
    margin-bottom: 5px;
}

.doc-nav-item:hover {
    background-color: #fff7ed !important;
    color: #F48120 !important;
}

.doc-nav-item.active {
    background-color: #F48120 !important;
    color: #ffffff !important;
}

.doc-nav-item.active .search-snippet {
    color: rgba(255, 255, 255, 0.85);
    border-left-color: rgba(255, 255, 255, 0.5);
}

.doc-body p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #334155;
}

.btn-close-search {
    position: absolute;
    right: 35px;
    top: 10px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
}

.btn-close-search:hover {
    color: #475569;
}

.btn-toggle-sidebar-panther:hover {
    background-color: #fff7ed !important;
}

.btn-toggle-sidebar-panther .icon-sidebar-toggle {
    position: absolute;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease !important;
}

.btn-toggle-sidebar-panther .icon-arrow {
    opacity: 1;
    transform: rotate(0deg);
}

.btn-toggle-sidebar-panther .icon-burger {
    opacity: 0;
    transform: rotate(-180deg);
}

.closed-sidebar .btn-toggle-sidebar-panther .icon-arrow {
    opacity: 0;
    transform: rotate(180deg);
}

.closed-sidebar .btn-toggle-sidebar-panther .icon-burger {
    opacity: 1;
    transform: rotate(0deg);
}

/* ==========================================================================
   ESTILOS DEDICADOS — GESTÃO DE PERFIS (LOTE 1 PRÉVIA VISUAL)
   ========================================================================== */

.panther-perfis-badge-previa {
    background-color: #fff7ed;
    color: #ea580c;
    border: 1px solid #ffedd5;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.panther-perfis-badge-clinica {
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Fonte Oficial Local do Font Awesome 7 Solid (v7.2.0) */
@font-face {
    font-display: block;
    font-family: "Font Awesome 7 Free";
    font-style: normal;
    font-weight: 900;
    src: url("../fonts/fa-solid-900.woff2") format("woff2");
}

/* Regra Mestra de Aplicação de Fonte para Ícones FontAwesome Solid */
.fa, .fas, .fa-solid {
    font-family: "Font Awesome 7 Free" !important;
    font-weight: 900 !important;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Regra Mestra de Aplicação de Fonte para Ícones FontAwesome Brands (Marcas) */
.fab, .fa-brands {
    font-family: "Font Awesome 7 Brands" !important;
    font-weight: 400 !important;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Regra Mestra para Ícones Pe-icon-7-stroke do Tema ArchitectUI */
[class^="pe-7s-"], [class*=" pe-7s-"] {
    font-family: 'Pe-icon-7-stroke' !important;
    font-style: normal;
    font-weight: 400 !important;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    display: inline-block;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- GRID E CARDS DE PERFIL DE ACESSO --- */
.panther-perfis-grid-perfis {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

/* Reset de Botão e Estilos Base dos Cards */
button.panther-perfil-btn,
.panther-perfil-btn {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    font: inherit !important;
    color: inherit;
    margin: 0 !important;
    position: relative;
    background-color: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
    text-align: left !important;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

.panther-perfil-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.panther-perfil-btn-title {
    font-weight: 800;
    font-size: 13px;
    color: #1e293b;
    line-height: 1.2;
}

.panther-perfil-btn-sub {
    font-size: 10px;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.panther-perfil-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 15px;
}

.panther-perfil-check-badge {
    display: none;
    font-size: 10px;
    margin-left: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background-color: #059669;
}

.panther-perfil-btn.active .panther-perfil-check-badge,
.panther-perfil-btn[aria-pressed="true"] .panther-perfil-check-badge {
    display: inline-flex !important;
}

/* Foco por teclado */
.panther-perfil-btn:focus-visible {
    outline: 2px solid #F48120 !important;
    outline-offset: 3px !important;
}

/* Hover Genérico */
.panther-perfil-btn:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1) !important;
}

/* Estado Selecionado Genérico */
.panther-perfil-btn.active,
.panther-perfil-btn[aria-pressed="true"] {
    transform: scale(1.02) !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14) !important;
}

/* --- IDENTIDADES VISUAIS ESPECÍFICAS PARA CADA PERFIL CANÔNICO --- */

/* 1. Administrador Geral (Dourado / Laranja) */
button.panther-perfil-btn.perfil-admin-geral,
.panther-perfil-btn.perfil-admin-geral {
    border-color: #fde68a !important;
    background-color: #fffdf5 !important;
}
button.panther-perfil-btn.perfil-admin-geral .panther-perfil-icon-wrap i,
.panther-perfil-btn.perfil-admin-geral .panther-perfil-icon-wrap i {
    color: #d97706 !important;
}
button.panther-perfil-btn.perfil-admin-geral:hover,
.panther-perfil-btn.perfil-admin-geral:hover {
    border-color: #f59e0b !important;
    background-color: #fffbeb !important;
    box-shadow: 0 8px 18px rgba(245, 158, 11, 0.18) !important;
}
button.panther-perfil-btn.perfil-admin-geral.active,
button.panther-perfil-btn.perfil-admin-geral[aria-pressed="true"],
.panther-perfil-btn.perfil-admin-geral.active,
.panther-perfil-btn.perfil-admin-geral[aria-pressed="true"] {
    border-color: #d97706 !important;
    background-color: #fef3c7 !important;
    box-shadow: 0 8px 22px rgba(217, 119, 6, 0.25) !important;
}
button.panther-perfil-btn.perfil-admin-geral.active .panther-perfil-btn-title,
.panther-perfil-btn.perfil-admin-geral.active .panther-perfil-btn-title {
    color: #92400e !important;
}
button.panther-perfil-btn.perfil-admin-geral .panther-perfil-check-badge,
.panther-perfil-btn.perfil-admin-geral .panther-perfil-check-badge {
    background-color: #d97706 !important;
}

/* 2. Gerência (Azul) */
button.panther-perfil-btn.perfil-gerente,
button.panther-perfil-btn.perfil-admin-filial,
.panther-perfil-btn.perfil-gerente,
.panther-perfil-btn.perfil-admin-filial {
    border-color: #bfdbfe !important;
    background-color: #f8fafc !important;
}
button.panther-perfil-btn.perfil-gerente .panther-perfil-icon-wrap i,
button.panther-perfil-btn.perfil-admin-filial .panther-perfil-icon-wrap i,
.panther-perfil-btn.perfil-gerente .panther-perfil-icon-wrap i,
.panther-perfil-btn.perfil-admin-filial .panther-perfil-icon-wrap i {
    color: #2563eb !important;
}
button.panther-perfil-btn.perfil-gerente:hover,
button.panther-perfil-btn.perfil-admin-filial:hover,
.panther-perfil-btn.perfil-gerente:hover,
.panther-perfil-btn.perfil-admin-filial:hover {
    border-color: #3b82f6 !important;
    background-color: #eff6ff !important;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18) !important;
}
button.panther-perfil-btn.perfil-gerente.active,
button.panther-perfil-btn.perfil-gerente[aria-pressed="true"],
button.panther-perfil-btn.perfil-admin-filial.active,
button.panther-perfil-btn.perfil-admin-filial[aria-pressed="true"],
.panther-perfil-btn.perfil-gerente.active,
.panther-perfil-btn.perfil-gerente[aria-pressed="true"],
.panther-perfil-btn.perfil-admin-filial.active,
.panther-perfil-btn.perfil-admin-filial[aria-pressed="true"] {
    border-color: #1d4ed8 !important;
    background-color: #dbeafe !important;
    box-shadow: 0 8px 22px rgba(29, 78, 216, 0.25) !important;
}
button.panther-perfil-btn.perfil-gerente.active .panther-perfil-btn-title,
button.panther-perfil-btn.perfil-admin-filial.active .panther-perfil-btn-title,
.panther-perfil-btn.perfil-gerente.active .panther-perfil-btn-title,
.panther-perfil-btn.perfil-admin-filial.active .panther-perfil-btn-title {
    color: #1e40af !important;
}
button.panther-perfil-btn.perfil-gerente .panther-perfil-check-badge,
button.panther-perfil-btn.perfil-admin-filial .panther-perfil-check-badge,
.panther-perfil-btn.perfil-gerente .panther-perfil-check-badge,
.panther-perfil-btn.perfil-admin-filial .panther-perfil-check-badge {
    background-color: #1d4ed8 !important;
}

/* 3. Médico (Ciano / Azul Claro) */
button.panther-perfil-btn.perfil-medico,
.panther-perfil-btn.perfil-medico {
    border-color: #a5f3fc !important;
    background-color: #f0fdfa !important;
}
button.panther-perfil-btn.perfil-medico .panther-perfil-icon-wrap i,
.panther-perfil-btn.perfil-medico .panther-perfil-icon-wrap i {
    color: #0891b2 !important;
}
button.panther-perfil-btn.perfil-medico:hover,
.panther-perfil-btn.perfil-medico:hover {
    border-color: #06b6d4 !important;
    background-color: #ecfeff !important;
    box-shadow: 0 8px 18px rgba(8, 145, 178, 0.18) !important;
}
button.panther-perfil-btn.perfil-medico.active,
button.panther-perfil-btn.perfil-medico[aria-pressed="true"],
.panther-perfil-btn.perfil-medico.active,
.panther-perfil-btn.perfil-medico[aria-pressed="true"] {
    border-color: #0e7490 !important;
    background-color: #cff4fc !important;
    box-shadow: 0 8px 22px rgba(14, 116, 144, 0.25) !important;
}
button.panther-perfil-btn.perfil-medico.active .panther-perfil-btn-title,
.panther-perfil-btn.perfil-medico.active .panther-perfil-btn-title {
    color: #155e75 !important;
}
button.panther-perfil-btn.perfil-medico .panther-perfil-check-badge,
.panther-perfil-btn.perfil-medico .panther-perfil-check-badge {
    background-color: #0e7490 !important;
}

/* 4. Recepção (Verde) */
button.panther-perfil-btn.perfil-recepcao,
.panther-perfil-btn.perfil-recepcao {
    border-color: #a7f3d0 !important;
    background-color: #f0fdf4 !important;
}
button.panther-perfil-btn.perfil-recepcao .panther-perfil-icon-wrap i,
.panther-perfil-btn.perfil-recepcao .panther-perfil-icon-wrap i {
    color: #059669 !important;
}
button.panther-perfil-btn.perfil-recepcao:hover,
.panther-perfil-btn.perfil-recepcao:hover {
    border-color: #10b981 !important;
    background-color: #ecfdf5 !important;
    box-shadow: 0 8px 18px rgba(5, 150, 105, 0.18) !important;
}
button.panther-perfil-btn.perfil-recepcao.active,
button.panther-perfil-btn.perfil-recepcao[aria-pressed="true"],
.panther-perfil-btn.perfil-recepcao.active,
.panther-perfil-btn.perfil-recepcao[aria-pressed="true"] {
    border-color: #047857 !important;
    background-color: #d1fae5 !important;
    box-shadow: 0 8px 22px rgba(4, 120, 87, 0.25) !important;
}
button.panther-perfil-btn.perfil-recepcao.active .panther-perfil-btn-title,
.panther-perfil-btn.perfil-recepcao.active .panther-perfil-btn-title {
    color: #065f46 !important;
}
button.panther-perfil-btn.perfil-recepcao .panther-perfil-check-badge,
.panther-perfil-btn.perfil-recepcao .panther-perfil-check-badge {
    background-color: #047857 !important;
}

/* 5. Financeiro (Vinho / Vermelho Discreto) */
button.panther-perfil-btn.perfil-financeiro,
button.panther-perfil-btn.perfil-faturista,
.panther-perfil-btn.perfil-financeiro,
.panther-perfil-btn.perfil-faturista {
    border-color: #fecaca !important;
    background-color: #fff5f5 !important;
}
button.panther-perfil-btn.perfil-financeiro .panther-perfil-icon-wrap i,
button.panther-perfil-btn.perfil-faturista .panther-perfil-icon-wrap i,
.panther-perfil-btn.perfil-financeiro .panther-perfil-icon-wrap i,
.panther-perfil-btn.perfil-faturista .panther-perfil-icon-wrap i {
    color: #dc2626 !important;
}
button.panther-perfil-btn.perfil-financeiro:hover,
button.panther-perfil-btn.perfil-faturista:hover,
.panther-perfil-btn.perfil-financeiro:hover,
.panther-perfil-btn.perfil-faturista:hover {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.18) !important;
}
button.panther-perfil-btn.perfil-financeiro.active,
button.panther-perfil-btn.perfil-financeiro[aria-pressed="true"],
button.panther-perfil-btn.perfil-faturista.active,
button.panther-perfil-btn.perfil-faturista[aria-pressed="true"],
.panther-perfil-btn.perfil-financeiro.active,
.panther-perfil-btn.perfil-financeiro[aria-pressed="true"],
.panther-perfil-btn.perfil-faturista.active,
.panther-perfil-btn.perfil-faturista[aria-pressed="true"] {
    border-color: #b91c1c !important;
    background-color: #fee2e2 !important;
    box-shadow: 0 8px 22px rgba(185, 28, 28, 0.25) !important;
}
button.panther-perfil-btn.perfil-financeiro.active .panther-perfil-btn-title,
button.panther-perfil-btn.perfil-faturista.active .panther-perfil-btn-title,
.panther-perfil-btn.perfil-financeiro.active .panther-perfil-btn-title,
.panther-perfil-btn.perfil-faturista.active .panther-perfil-btn-title {
    color: #991b1b !important;
}
button.panther-perfil-btn.perfil-financeiro .panther-perfil-check-badge,
button.panther-perfil-btn.perfil-faturista .panther-perfil-check-badge,
.panther-perfil-btn.perfil-financeiro .panther-perfil-check-badge,
.panther-perfil-btn.perfil-faturista .panther-perfil-check-badge {
    background-color: #b91c1c !important;
}

/* 6. Laboratório (Roxo) */
button.panther-perfil-btn.perfil-laboratorio,
.panther-perfil-btn.perfil-laboratorio {
    border-color: #ddd6fe !important;
    background-color: #faf5ff !important;
}
button.panther-perfil-btn.perfil-laboratorio .panther-perfil-icon-wrap i,
.panther-perfil-btn.perfil-laboratorio .panther-perfil-icon-wrap i {
    color: #7c3aed !important;
}
button.panther-perfil-btn.perfil-laboratorio:hover,
.panther-perfil-btn.perfil-laboratorio:hover {
    border-color: #8b5cf6 !important;
    background-color: #f5f3ff !important;
    box-shadow: 0 8px 18px rgba(124, 58, 237, 0.18) !important;
}
button.panther-perfil-btn.perfil-laboratorio.active,
button.panther-perfil-btn.perfil-laboratorio[aria-pressed="true"],
.panther-perfil-btn.perfil-laboratorio.active,
.panther-perfil-btn.perfil-laboratorio[aria-pressed="true"] {
    border-color: #6d28d9 !important;
    background-color: #f3e8ff !important;
    box-shadow: 0 8px 22px rgba(109, 40, 217, 0.25) !important;
}
button.panther-perfil-btn.perfil-laboratorio.active .panther-perfil-btn-title,
.panther-perfil-btn.perfil-laboratorio.active .panther-perfil-btn-title {
    color: #5b21b6 !important;
}
button.panther-perfil-btn.perfil-laboratorio .panther-perfil-check-badge,
.panther-perfil-btn.perfil-laboratorio .panther-perfil-check-badge {
    background-color: #6d28d9 !important;
}

/* 7. Marketing (Laranja / Coral) */
button.panther-perfil-btn.perfil-marketing,
.panther-perfil-btn.perfil-marketing {
    border-color: #fed7aa !important;
    background-color: #fffaf5 !important;
}
button.panther-perfil-btn.perfil-marketing .panther-perfil-icon-wrap i,
.panther-perfil-btn.perfil-marketing .panther-perfil-icon-wrap i {
    color: #ea580c !important;
}
button.panther-perfil-btn.perfil-marketing:hover,
.panther-perfil-btn.perfil-marketing:hover {
    border-color: #f97316 !important;
    background-color: #fff7ed !important;
    box-shadow: 0 8px 18px rgba(234, 88, 12, 0.18) !important;
}
button.panther-perfil-btn.perfil-marketing.active,
button.panther-perfil-btn.perfil-marketing[aria-pressed="true"],
.panther-perfil-btn.perfil-marketing.active,
.panther-perfil-btn.perfil-marketing[aria-pressed="true"] {
    border-color: #c2410c !important;
    background-color: #ffedd5 !important;
    box-shadow: 0 8px 22px rgba(194, 65, 12, 0.25) !important;
}
button.panther-perfil-btn.perfil-marketing.active .panther-perfil-btn-title,
.panther-perfil-btn.perfil-marketing.active .panther-perfil-btn-title {
    color: #9a3412 !important;
}
button.panther-perfil-btn.perfil-marketing .panther-perfil-check-badge,
.panther-perfil-btn.perfil-marketing .panther-perfil-check-badge {
    background-color: #c2410c !important;
}

/* Respeito a animações reduzidas */
@media (prefers-reduced-motion: reduce) {
    .panther-perfil-btn,
    .panther-modulo-card,
    .loading-overlay,
    .popover,
    .tooltip {
        transition: none !important;
        transform: none !important;
        animation: none !important;
    }
}

.panther-modulo-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s ease;
    overflow: hidden;
    margin-bottom: 12px;
}

.panther-modulo-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.panther-modulo-header {
    padding: 14px 18px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f5f9;
}

.panther-modulo-title-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.panther-modulo-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: #fff7ed;
    color: #F48120;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
}

.panther-modulo-title {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.panther-modulo-sub {
    font-size: 11px;
    color: #64748b;
    margin: 0;
}

.panther-modulo-body {
    padding: 14px 18px;
    background-color: #fafafa;
}

.panther-aba-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.panther-aba-item {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.panther-aba-item-lock {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.panther-fluxos-container {
    margin-top: 10px;
    padding: 10px 14px;
    background-color: #f1f5f9;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.panther-fluxos-title {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.panther-fluxos-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.panther-fluxo-tag {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
}

.panther-fluxo-tag-shared {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

@media (max-width: 768px) {
    .panther-perfis-grid-perfis {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   PANTHER RICH TEXT EDITOR (detalhes-clinica / config PDF)
   ========================================================================== */

.panther-richtext-wrapper {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.panther-richtext-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 10px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.panther-rt-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

.panther-rt-group + .panther-rt-group {
    padding-left: 8px;
    border-left: 1px solid #cbd5e1;
    margin-left: 4px;
}

.panther-rt-group.ms-auto {
    margin-left: auto !important;
    padding-left: 8px;
    border-left: 1px solid #cbd5e1;
}

.panther-rt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: #475569;
    font-size: 12px;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    padding: 0;
    line-height: 1;
}

.panther-rt-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #cbd5e1;
}

.panther-rt-btn.active {
    background: #F48120;
    color: #fff;
    border-color: #F48120;
}

.panther-rt-btn-clear {
    width: auto;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 600;
    color: #ef4444;
    border-color: #fca5a5;
}

.panther-rt-btn-clear:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #f87171;
}

.panther-rt-select {
    height: 30px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    background: #fff;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    padding: 0 6px;
    cursor: pointer;
    outline: none;
    transition: border-color .15s;
}

.panther-rt-select:focus {
    border-color: #F48120 !important;
    box-shadow: none !important;
}

.panther-rt-color {
    width: 30px;
    height: 30px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 2px;
    cursor: pointer;
    background: #fff;
}

.panther-richtext-area {
    min-height: 120px;
    max-height: 300px;
    overflow-y: auto;
    padding: 14px 16px;
    font-family: Arial, sans-serif;
    font-size: 13px;
    color: #1e293b;
    line-height: 1.6;
    outline: none;
}

.panther-richtext-area:focus {
    box-shadow: inset 0 0 0 2px rgba(244,129,32,.2);
}

/* Placeholder via CSS */
.panther-richtext-area:empty::before {
    content: attr(data-placeholder);
    color: #94a3b8;
    pointer-events: none;
    font-style: italic;
}

/* Custom Tabs para Categoria */
.custom-panther-tabs .nav-link {
    color: #64748b;
    border: 1px solid transparent;
    border-radius: 8px 8px 0 0;
    padding: 10px 20px;
    background-color: #f1f5f9;
    margin-right: 4px;
    transition: all 0.2s ease-in-out;
}

.custom-panther-tabs .nav-link:hover {
    color: #F48120;
    background-color: #fff7ed;
}

.custom-panther-tabs .nav-link.active {
    color: #F48120;
    background-color: #ffffff;
    border-color: #e2e8f0 #e2e8f0 #ffffff;
    border-bottom: 2px solid #F48120;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.03);
}

.style-container-categorias {
    max-width: 960px !important;
}

.style-scroll-sugeridas::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.style-scroll-sugeridas::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}

.style-scroll-sugeridas::-webkit-scrollbar-track {
    background-color: #f8fafc;
}

/* --- MULTI-SELECT CHECKBOX DROPDOWN PANEL (BANDEIRAS) --- */
.dropdown-bandeiras-panel {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1050;
    background-color: #ffffff;
    display: none;
    padding: 8px;
    border-radius: 4px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    border: 1px solid #cbd5e1;
}
.dropdown-bandeiras-panel.active {
    display: block;
}
.bandeira-item-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 10px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.panther-rt-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

.panther-rt-group + .panther-rt-group {
    padding-left: 8px;
    border-left: 1px solid #cbd5e1;
    margin-left: 4px;
}

.panther-rt-group.ms-auto {
    margin-left: auto !important;
    padding-left: 8px;
    border-left: 1px solid #cbd5e1;
}

.panther-rt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: #475569;
    font-size: 12px;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    padding: 0;
    line-height: 1;
}

.panther-rt-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #cbd5e1;
}

.panther-rt-btn.active {
    background: #F48120;
    color: #fff;
    border-color: #F48120;
}

.panther-rt-btn-clear {
    width: auto;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 600;
    color: #ef4444;
    border-color: #fca5a5;
}

.panther-rt-btn-clear:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #f87171;
}

.panther-rt-select {
    height: 30px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    background: #fff;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    padding: 0 6px;
    cursor: pointer;
    outline: none;
    transition: border-color .15s;
}

.panther-rt-select:focus {
    border-color: #F48120 !important;
    box-shadow: none !important;
}

.panther-rt-color {
    width: 30px;
    height: 30px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 2px;
    cursor: pointer;
    background: #fff;
}

.panther-richtext-area {
    min-height: 120px;
    max-height: 300px;
    overflow-y: auto;
    padding: 14px 16px;
    font-family: Arial, sans-serif;
    font-size: 13px;
    color: #1e293b;
    line-height: 1.6;
    outline: none;
}

.panther-richtext-area:focus {
    box-shadow: inset 0 0 0 2px rgba(244,129,32,.2);
}

/* Placeholder via CSS */
.panther-richtext-area:empty::before {
    content: attr(data-placeholder);
    color: #94a3b8;
    pointer-events: none;
    font-style: italic;
}

/* Custom Tabs para Categoria */
.custom-panther-tabs .nav-link {
    color: #64748b;
    border: 1px solid transparent;
    border-radius: 8px 8px 0 0;
    padding: 10px 20px;
    background-color: #f1f5f9;
    margin-right: 4px;
    transition: all 0.2s ease-in-out;
}

.custom-panther-tabs .nav-link:hover {
    color: #F48120;
    background-color: #fff7ed;
}

.custom-panther-tabs .nav-link.active {
    color: #F48120;
    background-color: #ffffff;
    border-color: #e2e8f0 #e2e8f0 #ffffff;
    border-bottom: 2px solid #F48120;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.03);
}

.style-container-categorias {
    max-width: 960px !important;
}

.style-scroll-sugeridas::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.style-scroll-sugeridas::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}

.style-scroll-sugeridas::-webkit-scrollbar-track {
    background-color: #f8fafc;
}

/* --- MULTI-SELECT CHECKBOX DROPDOWN PANEL (BANDEIRAS) --- */
.dropdown-bandeiras-panel {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1050;
    background-color: #ffffff;
    display: none;
    padding: 8px;
    border-radius: 4px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    border: 1px solid #cbd5e1;
}
.dropdown-bandeiras-panel.active {
    display: block;
}
.bandeira-item-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.15s;
}
.bandeira-item-check:hover {
    background-color: #f1f5f9;
}
.bandeira-item-check input[type="checkbox"] {
    cursor: pointer;
    width: 14px;
    height: 14px;
    accent-color: #F48120;
}

/* --- CLASSE UTILITÁRIA PARA RENDERIZAÇÃO TEMPORÁRIA OFFSCREEN DE PDF --- */
.offscreen-render-pdf {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    display: block !important;
    width: 210mm !important;
    background: #ffffff !important;
    color: #333333 !important;
    z-index: -1000 !important;
}

/* ==========================================================================
   CHECKPOINT C — REDESIGN VISUAL DA AGENDA (CARD DE FILTROS, LEGENDA E SLOTS)
   ========================================================================== */

/* Card de Filtros e Card da Grade Independente */
.card-filtros-agenda {
    border-radius: 0.75rem !important;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

.card-agenda-wrapper {
    border-radius: 0.75rem !important;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Loading Local da Agenda (Restrito ao Container da Grade) */
.loading-local-agenda {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.88);
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
    border-radius: 0.75rem;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
    pointer-events: all;
}

.loading-local-agenda.active {
    visibility: visible;
    opacity: 1;
}

/* Barra de Legenda Visual dos Status Reais Auditados */
.barra-legenda-agenda {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.6rem 1rem;
}

.legenda-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
    white-space: nowrap;
}

.legenda-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.legenda-dot.st-agendado { background-color: #a16207; }
.legenda-dot.st-agendado-quitado { background-color: #451a03; }
.legenda-dot.st-confirmado { background-color: #fb923c; }
.legenda-dot.st-confirmado-quitado { background-color: #c2410c; }
.legenda-dot.st-reagendado { background-color: #7c3aed; }
.legenda-dot.st-checkin { background-color: #22c55e; }
.legenda-dot.st-chamando { background-color: #ea580c; }
.legenda-dot.st-em_andamento { background-color: #d97706; }
.legenda-dot.st-atendido { background-color: #047857; }
.legenda-dot.st-nao_atendido { background-color: #6b21a8; }
.legenda-dot.st-cancelado { background-color: #dc2626; }
.legenda-dot.st-disponivel { background-color: #f97316; }

/* 5 Colunas Visíveis com Scroll Horizontal */
.input-datepicker-agenda {
    width: 140px;
}

.grade-coluna-sala {
    flex: 1 0 180px !important;
    min-width: 180px !important;
    box-sizing: border-box !important;
    border-right: 1px solid #e2e8f0 !important;
    position: relative !important;
}

/* Slots de Horários da Agenda sem CSS Inline */
.slot-agenda-base {
    position: absolute;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 0 8px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.slot-status-agendado {
    background-color: #fefce8;
    color: #713f12;
    border-left: 3px solid #a16207;
}

.slot-status-agendado-quitado {
    background-color: #fef3c7;
    color: #451a03;
    border-left: 3px solid #78350f;
}

.slot-status-confirmado {
    background-color: #fff7ed;
    color: #c2410c;
    border-left: 3px solid #fb923c;
}

.slot-status-confirmado-quitado {
    background-color: #ffedd5;
    color: #7c2d12;
    border-left: 3px solid #c2410c;
}

.slot-status-reagendado {
    background-color: #f5f3ff;
    color: #5b21b6;
    border-left: 3px solid #7c3aed;
}

.slot-status-checkin {
    background-color: #f0fdf4;
    color: #15803d;
    border-left: 3px solid #22c55e;
}

.slot-status-chamando {
    background-color: #ffedd5;
    color: #c2410c;
    border-left: 3px solid #ea580c;
}

.slot-status-em_andamento {
    background-color: #fef3c7;
    color: #b45309;
    border-left: 3px solid #d97706;
}

.slot-status-atendido {
    background-color: #ecfdf5;
    color: #064e3b;
    border-left: 3px solid #047857;
}

.slot-status-nao_atendido {
    background-color: #f3e8ff;
    color: #581c87;
    border-left: 3px solid #6b21a8;
}

.slot-status-cancelado {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 3px solid #dc2626;
}

.slot-status-disponivel {
    background-color: transparent;
    color: #f97316;
    border-bottom: 1px solid rgba(249, 115, 22, 0.25);
}

.slot-status-disponivel:hover {
    background-color: rgba(249, 115, 22, 0.12);
}

.slot-status-indisponivel {
    background-color: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
    border-left: 3px solid #cbd5e1;
    border-bottom: 1px solid rgba(203, 213, 225, 0.4);
}

/* --- CORREÇÃO S3.3: CENTRALIZAÇÃO MODAL DA OS E MODAIS CLÍNICOS --- */
#modalAgendamentoItensOS .modal-dialog,
#modalExecucaoLaboratorialOS .modal-dialog,
#modalPresencaPaciente .modal-dialog,
#modalInterromperAtendimento .modal-dialog {
    display: flex;
    align-items: center;
    min-height: calc(100vh - 3.5rem);
    box-shadow: none !important;
    background-color: transparent !important;
}

/* --- CORREÇÃO H3: NEUTRALIZAÇÃO DA SOMBRA ESPÚRIA EM DIALOGS EXPANDIDOS --- */
.modal-dialog,
.modal-dialog.modal-dialog-centered,
.modal-dialog.modal-dialog-scrollable {
    box-shadow: none !important;
}

.modal-title-panther-orange {
    color: #F48120;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.timeline-exames-container {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 12px;
    margin: 10px 0;
}

/* --- PANTHER HMR: F4A MODAIS — STACK E BACKDROP COM TRANSPARÊNCIA ÚNICA --- */
.panther-modal-layer-stacked {
    z-index: 1065 !important;
}

.modal-backdrop {
    background-color: #000;
}

.modal-backdrop.show {
    opacity: 0.5;
}

.timeline-exames-title {
    color: #1e293b;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.timeline-exames-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.timeline-exames-item {
    font-size: 0.75rem;
    color: #334155;
    padding: 4px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed #e2e8f0;
}

.timeline-exames-item:last-child {
    border-bottom: none;
}

.item-coleta-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 12px;
}

.item-coleta-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.item-coleta-scroll-container {
    max-height: 280px;
    overflow-y: auto;
}

/* Fallback de visibilidade controlado por classe (zero CSS inline) */
.panther-modal-fallback-show {
    display: block !important;
}

/* --- HOTFIX F2.1: CAMADAS DE MODAIS E ALERTA CONTEXTUAL SWEETALERT2 --- */
.swal2-container {
    z-index: 20000 !important;
}

dialog .swal2-container {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 20000 !important;
}

.panther-modal-layer-1 {
    z-index: 1050 !important;
}

.panther-modal-layer-2 {
    z-index: 1070 !important;
}

.panther-modal-layer-3 {
    z-index: 1090 !important;
}

/* --- FALLBACK DE ALERTA DO SISTEMA (ZERO CSS INLINE / TOP LAYER COMPATIBLE) --- */
.panther-alert-modal-fallback {
    z-index: 1060;
}

dialog .panther-alert-modal-fallback {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000 !important;
}

.panther-alert-card-error {
    border: 2px solid #F48120;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.panther-alert-card-success {
    border: 2px solid #10b981;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.panther-alert-header-error {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    border-bottom: none;
}

.panther-alert-header-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-bottom: none;
}

.panther-alert-btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #ffffff;
    cursor: pointer;
    line-height: 1;
}

.panther-alert-body {
    padding: 20px;
}

.panther-alert-body-success {
    padding: 25px 20px;
    text-align: center;
}

.panther-alert-msg-box {
    max-height: 300px;
    overflow-y: auto;
    user-select: text !important;
    white-space: pre-wrap;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: #1e293b;
    background-color: #ffffff;
    border-color: #cbd5e1;
    border-radius: 6px;
}

.panther-alert-success-text {
    font-size: 15px;
    line-height: 1.5;
}

.panther-alert-footer {
    padding: 15px 20px;
}

.panther-alert-btn-copy {
    background-color: #F48120;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
}

.panther-alert-btn-copy.copied {
    background-color: #10b981 !important;
}

.panther-alert-btn-ok {
    background-color: #10b981;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    color: #ffffff;
}

.panther-alert-card-warning {
    border: 2px solid #f59e0b;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.panther-alert-header-warning {
    background: linear-gradient(135deg, #F48120 0%, #f59e0b 100%);
    border-bottom: none;
}

.panther-alert-btn-warning {
    background-color: #f59e0b;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    color: #ffffff;
}

.panther-alert-card-confirm,
.panther-alert-card-prompt {
    border: 2px solid #2b2b40;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.panther-alert-header-confirm {
    background: linear-gradient(135deg, #2b2b40 0%, #F48120 100%);
    border-bottom: none;
}

.panther-alert-header-prompt {
    background: linear-gradient(135deg, #1e293b 0%, #F48120 100%);
    border-bottom: none;
}

.panther-alert-btn-confirm {
    background-color: #F48120;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    color: #ffffff;
}

.panther-alert-btn-cancel {
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    color: #475569;
}

.panther-alert-input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
    margin-top: 8px;
    color: #1e293b;
    background-color: #ffffff;
}

.panther-alert-input:focus {
    border-color: #F48120;
    box-shadow: 0 0 0 3px rgba(244, 129, 32, 0.15);
}

.btn-agenda-reagendar-cancelado {
    background-color: #1e6091 !important;
    border-color: #1e6091 !important;
}

.btn-agenda-reagendar-cancelado:hover {
    background-color: #154c74 !important;
    border-color: #154c74 !important;
}

/* Botão Abrir Prontuário na Fila de Espera */
.btn-abrir-prontuario {
    background-color: #2b9348 !important;
    border-color: #2b9348 !important;
    color: #ffffff !important;
}

.btn-abrir-prontuario:hover {
    background-color: #217237 !important;
    border-color: #217237 !important;
    color: #ffffff !important;
}

/* Badge Padrão Panther — Fundo Suave com Identidade Panther e Texto Slate */
.badge-panther {
    background-color: #fff7ed !important;
    color: #1e293b !important;
    border: 1px solid #fed7aa !important;
    font-weight: 700 !important;
}

.badge-panther i {
    color: #F48120 !important;
}

/* Linha de Grupo Laboratorial (Tipo C) na Aba 4 */
.tr-lab-tipo-c > td:first-child {
    border-left: 3px solid #F48120 !important;
}

/* Botão Executar Laboratorial (Tipo C) — Realce Laranja Panther Discreto e Formato Circular Padrão */
.btn-executar-lab,
.btn-acao-arredondado.btn-executar-lab {
    border-color: #F48120 !important;
    color: #F48120 !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 2px rgba(244, 129, 32, 0.2) !important;
    outline: none !important;
}

.btn-executar-lab:hover,
.btn-acao-arredondado.btn-executar-lab:hover {
    border-color: #d96b14 !important;
    color: #d96b14 !important;
    background-color: #fff7ed !important;
    box-shadow: 0 0 0 3px rgba(244, 129, 32, 0.3) !important;
    transform: translateY(-1px);
}

.btn-executar-lab:focus,
.btn-executar-lab:focus-visible,
.btn-acao-arredondado.btn-executar-lab:focus,
.btn-acao-arredondado.btn-executar-lab:focus-visible {
    outline: none !important;
    border-color: #F48120 !important;
    box-shadow: 0 0 0 3px rgba(244, 129, 32, 0.35) !important;
}

/* Stepper Visual de Diagnóstico Operacional */
.stepper-diagnostico {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    padding: 10px 0 20px 0;
}

.stepper-diagnostico::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 40px;
    right: 40px;
    height: 3px;
    background-color: #e2e8f0;
    z-index: 1;
}

.stepper-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
    text-align: center;
}

.stepper-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f1f5f9;
    border: 2px solid #cbd5e1;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 6px;
    transition: all 0.2s ease;
}

.stepper-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
}

.stepper-time {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 2px;
}

.stepper-item.completed .stepper-icon {
    background-color: #22c55e;
    border-color: #16a34a;
    color: #ffffff;
}

.stepper-item.completed .stepper-label {
    color: #16a34a;
}

.stepper-item.active .stepper-icon {
    background-color: #F48120;
    border-color: #d96b0b;
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(244, 129, 32, 0.3);
}

.stepper-item.active .stepper-label {
    color: #F48120;
    font-weight: 700;
}

.stepper-item.warning .stepper-icon {
    background-color: #f59e0b;
    border-color: #d97706;
    color: #ffffff;
}

.stepper-item.warning .stepper-label {
    color: #d97706;
}

.stepper-item.danger .stepper-icon {
    background-color: #ef4444;
    border-color: #dc2626;
    color: #ffffff;
}

.stepper-item.danger .stepper-label {
    color: #dc2626;
}

/* --- Link Discreto para Ordem de Serviço (Aba 4 / Histórico) --- */
.panther-os-link {
    color: #1e293b;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease-in-out;
}

.panther-os-link:hover {
    color: #F48120;
    text-decoration: underline;
}

/* ==========================================================================
   MÓDULO HISTÓRICO DE ALTERAÇÕES (HX-3 / HX-4) - ESTILOS CANÔNICOS PANTHER
   ========================================================================== */

/* Alternância de Visualização (Timeline / Tabela) */
.hx-view-toggle {
    display: inline-flex;
    background-color: #e2e8f0;
    padding: 3px;
    border-radius: 8px;
    gap: 3px;
}

.hx-view-toggle-btn {
    border: none;
    background-color: transparent;
    color: #475569;
    font-weight: 600;
    font-size: 12px;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hx-view-toggle-btn:hover {
    color: #1e293b;
    background-color: rgba(255, 255, 255, 0.6);
}

.hx-view-toggle-btn.active {
    background-color: #ffffff;
    color: #F48120;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Container e Barra da Linha do Tempo */
.hx-timeline-wrapper {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.hx-timeline-toolbar {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hx-timeline-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hx-timeline-btn {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.hx-timeline-btn:hover:not(:disabled) {
    background-color: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.hx-timeline-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(244, 129, 32, 0.35);
}

.hx-timeline-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hx-zoom-level-badge {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    background-color: #e2e8f0;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Viewport Navegável da Timeline */
.hx-timeline-viewport {
    position: relative;
    width: 100%;
    height: 480px;
    background-color: #ffffff;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
}

.hx-timeline-viewport:focus {
    outline: none;
}

.hx-timeline-viewport:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(244, 129, 32, 0.45);
}

.hx-timeline-viewport.is-dragging {
    cursor: grabbing;
}

.hx-timeline-track {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    will-change: transform;
}

.hx-timeline-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Elementos Gráficos SVG */
.hx-svg-axis {
    stroke: #e2e8f0;
    stroke-width: 2;
}

.hx-svg-tick {
    stroke: #e2e8f0;
    stroke-width: 1;
}

.hx-svg-tick-label {
    fill: #64748b;
    font-size: 11px;
    font-weight: 500;
    text-anchor: middle;
}

.hx-svg-connector {
    stroke: #cbd5e1;
    stroke-width: 1.5;
    stroke-dasharray: 3 3;
}

.hx-svg-divisor-line {
    stroke: #F48120;
    stroke-width: 2;
    stroke-dasharray: 6 3;
}

.hx-svg-divisor-label {
    fill: #d97706;
    font-size: 10px;
    font-weight: 700;
    text-anchor: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Camada DOM de Pontos Interativos */
.hx-timeline-points-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hx-point {
    position: absolute;
    border: none;
    outline: none;
    cursor: pointer;
    background: transparent;
    padding: 0;
    margin: 0;
    width: 32px;
    height: 32px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    z-index: 10;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hx-point:hover,
.hx-point:focus-visible {
    transform: translate(-50%, -50%) scale(1.35);
    z-index: 30;
}

.hx-point:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(244, 129, 32, 0.45);
}

.hx-point-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

/* Cores Semânticas dos Pontos */
.hx-point-criacao .hx-point-dot {
    background-color: #16a34a;
}

.hx-point-edicao .hx-point-dot {
    background-color: #F48120;
}

.hx-point-exclusao .hx-point-dot {
    background-color: #dc2626;
}

.hx-point-financeiro .hx-point-dot {
    background-color: #d97706;
}

.hx-point-seguranca .hx-point-dot {
    background-color: #334155;
}

.hx-point-legado .hx-point-dot {
    background-color: #64748b;
    border-style: dashed;
}

/* Clusters Visuais */
.hx-cluster {
    position: absolute;
    border: 2px solid #ffffff;
    outline: none;
    cursor: pointer;
    background-color: #1e293b;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 0 10px;
    min-width: 34px;
    height: 34px;
    transform: translate(-50%, -50%);
    border-radius: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    z-index: 15;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease, box-shadow 0.2s ease;
}

.hx-cluster:hover,
.hx-cluster:focus-visible {
    background-color: #F48120;
    transform: translate(-50%, -50%) scale(1.18);
    box-shadow: 0 5px 14px rgba(244, 129, 32, 0.45);
    z-index: 35;
}

.hx-cluster:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(244, 129, 32, 0.55);
}

/* Tooltip Dinâmico */
.hx-tooltip {
    position: absolute;
    background-color: #1e293b;
    color: #f8fafc;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    line-height: 1.45;
    max-width: 300px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: 120;
    opacity: 0;
    transform: translate(-50%, -100%) translateY(-10px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.hx-tooltip.visible {
    opacity: 1;
    transform: translate(-50%, -100%) translateY(-15px);
}

.hx-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}

.hx-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 5px;
    margin-bottom: 6px;
    font-size: 11px;
    color: #94a3b8;
}

.hx-tooltip-resumo {
    font-weight: 500;
    color: #f1f5f9;
    margin-bottom: 4px;
    word-break: break-word;
}

.hx-tooltip-meta {
    font-size: 11px;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Badges e Rótulos */
.hx-badge-canonico {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.5px;
}

.hx-badge-legado {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.5px;
}

.hx-badge-acao {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hx-badge-acao-criacao {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.hx-badge-acao-edicao {
    background-color: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.hx-badge-acao-exclusao {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.hx-badge-acao-status {
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.hx-badge-acao-sincronizacao {
    background-color: #f5f3ff;
    color: #5b21b6;
    border: 1px solid #ddd6fe;
}

.hx-badge-acao-finalizacao {
    background-color: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Banner de Finalização Administrativa */
.hx-banner-admin {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #d97706;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 16px;
}

.hx-banner-admin-title {
    color: #92400e;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.hx-banner-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    font-size: 12px;
}

.hx-banner-admin-item {
    display: flex;
    flex-direction: column;
}

.hx-banner-admin-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #b45309;
    letter-spacing: 0.5px;
}

.hx-banner-admin-val {
    font-size: 12px;
    font-weight: 600;
    color: #451a03;
}

/* Tabela de Diferenças (Diff) */
.hx-diff-table-container {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.hx-diff-table {
    width: 100%;
    margin-bottom: 0;
    font-size: 12px;
}

.hx-diff-table th {
    background-color: #f8fafc;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
}

.hx-diff-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

.hx-diff-col-campo {
    width: 30%;
}

.hx-diff-col-antes {
    width: 35%;
}

.hx-diff-col-depois {
    width: 35%;
}

.hx-diff-antes {
    background-color: #fef2f2;
    color: #991b1b;
    border-radius: 4px;
    padding: 4px 8px;
    font-family: monospace;
    font-size: 11px;
    word-break: break-word;
    display: inline-block;
    max-width: 100%;
}

.hx-diff-depois {
    background-color: #f0fdf4;
    color: #166534;
    border-radius: 4px;
    padding: 4px 8px;
    font-family: monospace;
    font-size: 11px;
    word-break: break-word;
    display: inline-block;
    max-width: 100%;
}

/* Estado Vazio */
.hx-empty-state {
    padding: 48px 24px;
    text-align: center;
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
    margin: 20px 0;
}

.hx-empty-state-icon {
    width: 56px;
    height: 56px;
    background-color: #f1f5f9;
    color: #94a3b8;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 14px;
}

.hx-empty-state-title {
    font-size: 15px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}

.hx-empty-state-desc {
    font-size: 13px;
    color: #64748b;
    max-width: 420px;
    margin: 0 auto;
}

/* Indicador Discreto de Carregamento */
.hx-timeline-loading-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #F48120 0%, #fbbf24 50%, #F48120 100%);
    background-size: 200% 100%;
    animation: hxShimmer 1.5s infinite;
    z-index: 100;
}

@keyframes hxShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Micro-animações e Redução de Movimento */
@media (prefers-reduced-motion: no-preference) {
    .hx-point {
        transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .hx-cluster {
        transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease;
    }
    .hx-view-toggle-btn {
        transition: all 0.2s ease;
    }
    .hx-view-fade-in {
        animation: hxFadeIn 0.2s ease-out;
    }
}

@keyframes hxFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Foco Acessível Panther (Substitui o outline preto padrão do navegador) */
.hx-timeline-svg:focus,
.hx-timeline-track:focus {
    outline: none;
}

.modal:focus,
.modal-dialog:focus,
.modal-content:focus {
    outline: none !important;
}

.hx-btn:focus,
.hx-cluster:focus,
.hx-point:focus {
    outline: none;
}

.hx-btn:focus-visible,
.hx-cluster:focus-visible,
.hx-point:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(244, 129, 32, 0.35);
}

/* Modal de Agrupamento de Alterações (Cluster HX) */
.hx-cluster-modal-header {
    background-color: #fffaf5;
    border-bottom: 1px solid #fed7aa;
    padding: 16px 20px;
}

.hx-cluster-badge-count {
    background-color: #ea580c;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 8px;
}

.hx-cluster-list {
    max-height: 460px;
    overflow-y: auto;
    padding: 0;
    margin: 0;
    list-style: none;
}

.hx-cluster-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    background-color: #ffffff;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
}

.hx-cluster-item:last-child {
    border-bottom: none;
}

.hx-cluster-item:hover {
    background-color: #fff7ed;
}

.hx-cluster-item:focus {
    outline: none;
}

.hx-cluster-item:focus-visible {
    outline: none;
    background-color: #fff7ed;
    box-shadow: inset 0 0 0 2px #F48120;
}

.hx-cluster-item-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.hx-cluster-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #64748b;
}

.hx-cluster-item-time {
    font-weight: 600;
    color: #1e293b;
}

.hx-cluster-item-actor {
    font-weight: 500;
    color: #334155;
}

.hx-cluster-item-resumo {
    font-size: 13px;
    font-weight: 500;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hx-cluster-item-registro {
    font-size: 12px;
    color: #64748b;
}

.hx-cluster-item-action {
    margin-left: 12px;
    flex-shrink: 0;
}

.input-tempo-fechamento-caixa {
    max-width: 100px;
}

/* Autocomplete do Filtro de Paciente (HX) */
.hx-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 220px;
    overflow-y: auto;
    z-index: 1050;
    margin-top: 2px;
}

.hx-autocomplete-item {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s ease;
}

.hx-autocomplete-item:last-child {
    border-bottom: none;
}

.hx-autocomplete-item:hover,
.hx-autocomplete-item.active {
    background-color: #fff7ed;
    color: #ea580c;
}

.hx-autocomplete-empty {
    padding: 10px 12px;
    font-size: 12px;
    color: #64748b;
    text-align: center;
    font-style: italic;
}

/* ==========================================================================
   PANTHER HMR — PADRONIZAÇÃO GLOBAL DE BOTÕES LARANJA / WARNING (F4)
   ========================================================================== */

.btn-warning,
.panther-alert-btn-warning,
.panther-alert-btn-confirm,
.btn-panther-add,
.btn-orange-panther,
.btn-pill-orange,
.btn-orange-round {
    background-color: #F48120 !important;
    border-color: #F48120 !important;
    color: #ffffff !important;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease !important;
}

.btn-warning:hover,
.panther-alert-btn-warning:hover,
.panther-alert-btn-confirm:hover,
.btn-panther-add:hover,
.btn-orange-panther:hover,
.btn-pill-orange:hover,
.btn-orange-round:hover {
    background-color: #d97010 !important;
    border-color: #c85f06 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(244, 129, 32, 0.35) !important;
}

.btn-warning:focus,
.btn-warning:focus-visible,
.panther-alert-btn-warning:focus,
.panther-alert-btn-warning:focus-visible,
.panther-alert-btn-confirm:focus,
.panther-alert-btn-confirm:focus-visible,
.btn-panther-add:focus,
.btn-panther-add:focus-visible,
.btn-orange-panther:focus,
.btn-orange-panther:focus-visible,
.btn-pill-orange:focus,
.btn-pill-orange:focus-visible,
.btn-orange-round:focus,
.btn-orange-round:focus-visible {
    background-color: #d97010 !important;
    border-color: #c85f06 !important;
    color: #ffffff !important;
    outline: 2px solid #F48120 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 3px rgba(244, 129, 32, 0.4) !important;
}

.btn-warning:active,
.panther-alert-btn-warning:active,
.panther-alert-btn-confirm:active,
.btn-panther-add:active,
.btn-orange-panther:active,
.btn-pill-orange:active,
.btn-orange-round:active {
    background-color: #be5605 !important;
    border-color: #a84c04 !important;
    color: #ffffff !important;
    transform: translateY(1px) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.btn-warning:disabled,
.btn-warning.disabled,
.panther-alert-btn-warning:disabled,
.panther-alert-btn-confirm:disabled,
.btn-panther-add:disabled,
.btn-orange-panther:disabled,
.btn-pill-orange:disabled,
.btn-orange-round:disabled {
    background-color: #fdba74 !important;
    border-color: #fdba74 !important;
    color: #ffffff !important;
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

/* ==========================================================================
   PANTHER HMR — FRENTE B: UI/UX PREMIUM ATENDIMENTO, HX & LOGO
   ========================================================================== */

/* 1. Header Logo Navegação */
.header-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    cursor: pointer;
    height: 48px;
    width: 165px;
    transition: opacity 0.2s ease;
}

.header-logo-link:hover {
    opacity: 0.88;
}

.closed-sidebar .header-logo-link {
    width: 38px;
    justify-content: center;
}

/* 2. Modal de Histórico Contextual (HX) - Identidade Panther */
.panther-historico-modal-dialog {
    border-radius: 12px;
    overflow: hidden;
}

.panther-historico-icon-wrapper {
    width: 40px;
    height: 40px;
    background-color: #fff7ed;
    color: #F48120;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panther-historico-body {
    max-height: 65vh;
    overflow-y: auto;
    background-color: #f8fafc;
}

.panther-historico-anotacao-card {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.panther-hx-card-evento {
    border-radius: 8px;
    border-left: 4px solid #F48120 !important;
    background-color: #ffffff;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.panther-hx-card-evento:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

.panther-hx-card-anotacao {
    border-radius: 8px;
    border-left: 4px solid #ea580c !important;
    background-color: #ffffff;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.panther-hx-card-anotacao:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

.badge-panther-ator {
    background-color: #0f172a !important;
    color: #ffffff !important;
    font-size: 11px;
}

.badge-panther-sistema {
    background-color: #64748b !important;
    color: #ffffff !important;
    font-size: 11px;
}

/* 3. Badges Semânticos e Elegantes Panther (Laboratório e Atendimento) */
.badge-panther-coletado {
    background-color: #ecfdf5 !important;
    color: #047857 !important;
    border: 1px solid #a7f3d0 !important;
}

.badge-panther-pendente {
    background-color: #fffbeb !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
}

.badge-panther-nao-coletado {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

.badge-panther-recoleta {
    background-color: #fef2f2 !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca !important;
}

.badge-panther-consulta {
    background-color: #f8fafc !important;
    color: #334155 !important;
    border: 1px solid #e2e8f0 !important;
}

.badge-panther-procedimento {
    background-color: #fff7ed !important;
    color: #c2410c !important;
    border: 1px solid #fed7aa !important;
}

.badge-panther-laboratorio {
    background-color: #f0fdf4 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0 !important;
}

.badge-panther-triagem {
    background-color: #fefce8 !important;
    color: #854d0e !important;
    border: 1px solid #fef08a !important;
}

/* 4. Feedback Visual Ativo em Botões de Coleta */
.btn-coletar-loading {
    opacity: 0.75;
    pointer-events: none;
    cursor: wait !important;
}

/* 5. Refinamento de Cards e Cabeçalho do Atendimento */
.atendimento-vital-card-group {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.atendimento-vital-card-group:focus-within {
    border-color: #F48120;
    box-shadow: 0 0 0 3px rgba(244, 129, 32, 0.12);
}

.atendimento-timeline-card-item {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03) !important;
    transition: box-shadow 0.2s ease;
}

.atendimento-timeline-card-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}
