body {
    background-color: #f8fafc !important;
    color: #334155 !important;
}

.app-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.app-header .app-header__logo .logo-src {
    background: none !important;
}

.app-sidebar {
    background-color: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
}

.vertical-nav-menu li a {
    color: #475569 !important;
}

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

.vertical-nav-menu li a:hover {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

.app-page-title {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    margin-bottom: 1.5rem !important;
}

.app-page-title .page-title-heading {
    color: #0f172a !important;
}

.app-page-title .page-title-subheading {
    color: #64748b !important;
}

.main-card.card {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

.card-title {
    color: #0f172a !important;
}

.form-label {
    color: #475569 !important;
}

.form-select {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

.card-header {
    background-color: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
}

.agenda-grid-card {
    min-width: 0 !important;
    width: 100% !important;
    overflow: hidden !important;
    /* Corta qualquer vazamento visual */
    display: block !important;
}

.card-agenda-wrapper {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    /* overflow não vai aqui, para não cortar dropdowns */
}

.grade-container-scroll {
    padding: 1rem;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    /* Cria a barra horizontal estilo Netflix */
    overflow-y: visible !important;
    /* Permite que a página role para baixo naturalmente */
    position: relative !important;
    cursor: grab;
}

.grade-container-scroll.dragging {
    cursor: grabbing;
    user-select: none;
}

.container-colunas-agenda {
    display: grid !important;
    grid-template-columns: repeat(var(--num-colunas, 5), minmax(0, 1fr));
    flex-grow: 1;
    position: relative;
    width: 100% !important;
}

.grade-timeline-continua {
    display: flex !important;
    flex-direction: column;
    background-color: #ffffff;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    width: 100% !important;
    min-width: 100% !important;
    position: relative;
}

.grade-timeline-continua.multicolumn-scroll {
    width: max-content !important;
}

.hdr-coluna-agenda {
    background-color: #f8fafc;
    font-weight: 700;
    text-align: center;
    padding: 12px 6px;
    color: #0f172a;
    font-size: 0.8rem;
    border-bottom: 2px solid #cbd5e1;
    border-right: 1px solid #e2e8f0;
}

.eixo-vertical-horas {
    background-color: #ffffff !important;
    position: sticky;
    left: 0;
    width: 60px;
    min-width: 60px;
    border-right: 1px solid #cbd5e1 !important;
    height: 720px !important;
    z-index: 11;
    box-shadow: 4px 0 8px rgba(0, 0, 0, 0.05);
    box-sizing: border-box !important;
}

.celula-hora {
    height: 60px;
    min-height: 60px;
    box-sizing: border-box;
    border-bottom: 1px solid #e2e8f0;
}

.marcador-hora {
    position: absolute;
    left: 0;
    width: 100%;
    text-align: center;
    font-weight: 700;
    color: #334155;
    font-size: 0.75rem;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    border: none !important;
    line-height: 1;
    pointer-events: none;
    z-index: 5;
}

.coluna-fluxo-agenda {
    background-color: #ffffff;
    position: relative;
    border-right: 1px solid #cbd5e1 !important;
    height: 720px !important;
    box-sizing: border-box !important;
}

.linha-grade-hora {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    border-top: 1px solid #475569 !important;
    border-bottom: none !important;
    box-sizing: border-box !important;
    pointer-events: none;
    z-index: 1;
}

.bloco-medico-card {
    z-index: 10;
}

.bloco-compromisso {
    position: absolute;
    left: 4px;
    right: 4px;
    border-radius: 5px;
    padding: 6px 8px;
    font-size: 0.73rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    line-height: 1.3;
    overflow: visible;
    z-index: 15;
}

.bloco-compromisso:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 99;
}

.bloco-compromisso::after {
    content: attr(data-horario);
    position: absolute;
    bottom: 105%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #0f172a;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.bloco-compromisso:hover::after {
    opacity: 1;
    visibility: visible;
}

.status-autorizado-card {
    background-color: rgba(16, 185, 129, 0.1);
    border-left: 4px solid #10b981;
    color: #065f46;
}

.status-pgto-card {
    background-color: rgba(245, 158, 11, 0.1);
    border-left: 4px solid #f59e0b;
    color: #78350f;
}

.status-atendimento-card {
    background-color: rgba(59, 130, 246, 0.1);
    border-left: 4px solid #3b82f6;
    color: #1e3a8a;
}

.status-concluido-card {
    background-color: rgba(100, 116, 139, 0.1);
    border-left: 4px solid #64748b;
    color: #334155;
    text-decoration: line-through;
}

.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;
}

.form-control {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    font-size: 0.8rem !important;
    border-radius: 6px !important;
}

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

.invalid-feedback {
    color: #ef4444 !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
}

.perfil-paciente-container {
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 20px;
    margin-bottom: 1.5rem;
}

.carrossel-abas-viewport {
    overflow: hidden;
    width: 100%;
    position: relative;
}

.carrossel-abas-slider {
    display: flex;
    width: 300%;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.aba-painel-conteudo {
    width: 33.33333%;
    flex-shrink: 0;
    padding: 15px 5px;
}

.btn-historico-adm {
    background-color: #1a1c1e !important;
    color: #ffffff !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid #2d3139 !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
}

.btn-historico-adm:hover {
    background-color: #2d3139 !important;
}

.campo-anotacoes-fixo {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    font-size: 0.8rem !important;
    border-radius: 6px !important;
    resize: none;
    height: 120px;
}

.campo-anotacoes-fixo:focus {
    border-color: #F48120 !important;
    outline: none;
}

.info-paciente-header {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.info-paciente-idade {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    background-color: #f1f5f9;
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 10px;
}

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

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

.btn-panther-delete {
    background-color: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    color: #ef4444 !important;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-panther-delete:hover {
    background-color: #ef4444 !important;
    color: #ffffff !important;
}

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

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

.btn-panther-os {
    background-color: #065f46 !important;
    border: 1px solid #065f46 !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-panther-os:hover {
    background-color: #044e39 !important;
    border-color: #044e39 !important;
}

.btn-panther-audit {
    background-color: #1e293b !important;
    border: 1px solid #1e293b !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-panther-audit:hover {
    background-color: #0f172a !important;
    border-color: #0f172a !important;
}

.btn-panther-history {
    background-color: #2563eb !important;
    border: 1px solid #2563eb !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-panther-history:hover {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
}

.btn-panther-add {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-panther-add:hover {
    background-color: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

/* ============================
   Padronização Panther HMR
   Texto normal, sem caixa alta forçada
============================ */

.app-sidebar__heading,
.card-header,
.form-section-title,
.home-section-title,
.widget-heading,
.vertical-nav-menu li a,
.btn,
.badge,
label,
th,
.btn-historico-adm,
.btn-panther-edit,
.btn-panther-delete,
.btn-panther-budget,
.btn-panther-os,
.btn-panther-audit,
.btn-panther-history,
.btn-panther-add {
    text-transform: none !important;
}

/* Título "Navegação" no padrão Panther */
.app-sidebar__heading {
    color: #F48120 !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
}

/* Barrinhas do menu em laranja */
.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    background-color: #F48120 !important;
}

/* Ícones do menu */
.vertical-nav-menu li a i {
    color: #cbd5e1 !important;
}

.vertical-nav-menu li a.mm-active i {
    color: #ffffff !important;
}

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

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

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

/* Selo Ambiente seguro */
.badge-ambiente,
#badgeAmbienteSeguro {
    background: #fff7ed !important;
    border: 1px solid #F48120 !important;
    color: #F48120 !important;
    text-transform: none !important;
}

/* Cabeçalhos dos cards em texto normal */
.card-header {
    font-weight: 700 !important;
    letter-spacing: 0 !important;
}

/* Seções de formulário em texto normal */
.form-section-title {
    color: #F48120 !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
}

/* Botões Panther em texto normal */
.btn-panther-edit,
.btn-panther-delete,
.btn-panther-budget,
.btn-panther-os,
.btn-panther-audit,
.btn-panther-history,
.btn-panther-add,
.btn-historico-adm {
    letter-spacing: 0 !important;
}

/* Tabelas em texto normal */
.tabela-pacientes th,
table th {
    text-transform: none !important;
    letter-spacing: 0 !important;
}

/* Labels em texto normal */
.form-label,
label {
    text-transform: none !important;
    letter-spacing: 0 !important;
}

/* ==========================================
   Estilos específicos de Gestão de Agendas
   ========================================== */
.painel-navegacao-data {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
}

.btn-nav-data {
    background: transparent;
    border: none;
    color: #475569;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0 4px;
}

.btn-nav-data:hover {
    color: #F48120;
}

.lbl-data-foco {
    font-weight: 800;
    font-size: 13px;
    color: #0f172a;
    text-transform: uppercase;
    width: 140px;
    text-align: center;
}

.grade-cabecalhos-wrapper {
    display: grid !important;
    grid-template-columns: 60px repeat(var(--num-colunas, 5), minmax(0, 1fr));
    border-bottom: 2px solid #cbd5e1;
    position: sticky;
    top: 0;
    background-color: #ffffff !important;
    z-index: 12;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    height: 50px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.grade-timeline-continua.multicolumn-scroll .grade-cabecalhos-wrapper {
    grid-template-columns: 60px repeat(var(--num-colunas, 6), minmax(220px, 1fr)) !important;
    width: max-content !important;
}

.grade-cabecalhos-corner {
    height: 50px !important;
    min-height: 50px !important;
    width: 60px !important;
    min-width: 60px !important;
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 30 !important;
    background-color: #ffffff !important;
    border-bottom: 2px solid #cbd5e1 !important;
    border-right: 1px solid #cbd5e1 !important;
    box-sizing: border-box !important;
}

.grade-corpo-wrapper {
    position: relative;
    display: grid !important;
    grid-template-columns: 60px repeat(var(--num-colunas, 5), minmax(0, 1fr));
    min-height: 720px !important;
    height: 720px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.grade-timeline-continua.multicolumn-scroll .grade-corpo-wrapper {
    grid-template-columns: 60px repeat(var(--num-colunas, 6), minmax(220px, 1fr)) !important;
    width: max-content !important;
}

.container-colunas-agenda {
    grid-column: 2 / -1;
    display: grid !important;
    grid-template-columns: repeat(var(--num-colunas, 5), minmax(0, 1fr));
    position: relative;
    width: 100% !important;
    height: 720px !important;
    box-sizing: border-box !important;
}

.grade-timeline-continua.multicolumn-scroll .container-colunas-agenda {
    grid-template-columns: repeat(var(--num-colunas, 6), minmax(220px, 1fr)) !important;
    width: max-content !important;
}

.coluna-flex {
    border-right: 1px solid #cbd5e1 !important;
    position: relative;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    background-color: #ffffff !important;
    height: 720px !important;
}

.coluna-flex:last-child {
    border-right: none !important;
}

.hdr-dinamico {
    text-align: center;
    padding: 10px 4px;
    font-size: 11px;
    font-weight: 800;
    color: #334155;
    text-transform: uppercase;
    border-right: 1px solid #cbd5e1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px !important;
    min-height: 50px !important;
    background-color: #ffffff !important;
    border-bottom: 2px solid #cbd5e1 !important;
    box-sizing: border-box !important;
    position: sticky;
    top: 0;
    z-index: 20;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hdr-dinamico:last-child {
    border-right: none !important;
}

/* Estilo do Modal Nativo (Destrói bugs de z-index) */
dialog::backdrop {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 1049 !important;
}

dialog {
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    padding: 0;
    max-width: 450px;
    width: 100%;
    z-index: 1050 !important;
}

/* Autocomplete Resultados Dropdown */
.dropdown-resultados {
    position: absolute;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    z-index: 1060 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-top: 2px;
}

.dropdown-resultados .item-resultado {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    transition: background-color 0.2s;
    text-align: left;
}

.dropdown-resultados .item-resultado:hover {
    background-color: #fff7ed;
    color: #F48120;
}

.dropdown-resultados .no-results {
    padding: 8px 12px;
    color: #94a3b8;
    font-size: 13px;
    font-style: italic;
    text-align: left;
}

/* Classes para substituição de CSS inline de Gestão de Agendas */
.agenda-page-title-icon {
    background: #f1f5f9 !important;
    color: #F48120 !important;
}

.card-header-agenda {
    background-color: #f8fafc !important;
    height: auto !important;
}

.txt-identificador-modo {
    color: #0f172a !important;
    font-size: 18px !important;
}

.txt-subtitulo-grid {
    font-size: 11px !important;
    font-weight: 600 !important;
}

.btn-modo-visao {
    font-size: 10px !important;
    font-weight: bold !important;
}

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

.btn-link-compact {
    font-size: 11px !important;
    text-decoration: none !important;
}

.modal-header-title {
    font-size: 14px !important;
    text-transform: uppercase !important;
}

.modal-cadastro-rapido {
    max-width: 400px !important;
    width: 100% !important;
}

.btn-agenda-checkin {
    background-color: #2b9348 !important;
    border-color: #2b9348 !important;
}

.btn-agenda-reagendar {
    background-color: #f48120 !important;
    border-color: #f48120 !important;
}

.btn-agenda-cancelar {
    background-color: #d92550 !important;
    border-color: #d92550 !important;
}

.btn-agenda-cancelar-os {
    background-color: #8a132e !important;
    border-color: #8a132e !important;
}

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

/* Isolamento absoluto do fluxo principal */
.app-main__inner {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    /* Corta qualquer vazamento visual horizontal */
    display: block !important;
}