/*---------------------------------base.html-------------------------------*/
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 70px;
    height: 100vh;
    background-color: #cfe2ff;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
    z-index: 1000;
}

.sidebar a {
    color: #333;
    margin: 10px 0;
    font-size: 1.5rem;
    transition: color 0.2s;
}

.sidebar a:hover {
    color: #0d6efd;
}

.logo-container {
    position: fixed;
    right: 0;
    left: 70px;
    height: 70px;
    /* Reduzido de 110px */
    background-color: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 40px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .05);
    z-index: 999;
}

.logo {
    height: 60px;
    /* Reduzido de 70px */
    width: auto;
}

.main-content {
    flex-grow: 1;
    margin-left: 70px;
    padding: 20px;
    padding-top: 90px;
}

/* Seus outros estilos (custom-btn, custom-btn-secondary, messages, fieldset, legend) */
.custom-btn {
    border: 1px solid #212529;
    color: #212529;
    background-color: transparent;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
}

.custom-btn:hover {
    background-color: #cfe2ff;
    color: #212529;
    border-color: #212529;
}

.custom-btn-secondary {
    border: 1px solid #6c757d;
    color: #6c757d;
    background-color: transparent;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
}

.custom-btn-secondary:hover {
    background-color: #e2e6ea;
    color: #6c757d;
    border-color: #6c757d;
}

.messages .alert {
    margin-bottom: 1rem;
}

fieldset.border {
    border: 1px solid #dee2e6 !important;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 0.25rem;
}

legend.float-none {
    width: unset;
    padding: 0 0.5rem;
    margin-bottom: 0;
    font-size: 1rem;
    color: #6c757d;
}

/*---------------------------------base.html-------------------------------*/


/*-----------------------lista_agendamentos.html---------------------------*/
.btn-outline-secondary:hover:not(.btn-primary):not([style*="background-color: #cfe2ff"]):not(.btn-date-selected) {
    background-color: #e9ecef !important;
    /* Um cinza um pouco mais claro */
    color: #212529 !important;
    /* Mantém o texto escuro */
    border-color: #6c757d !important;
    /* Mantém a borda cinza padrão */
}

/* Cor de fundo para alerta de agendamento em tempo real */
.alert-new-appointment {
    background-color: #ffe6e6 !important;
    /* Vermelho claro */
    color: #dc3545 !important;
    /* Texto vermelho mais escuro */
    border-color: #dc3545 !important;
    /* Borda vermelha */
    animation: pulse-red 1.5s infinite alternate;
    /* Adiciona um "pulsar" */
}

/* Cor de fundo para a guia "Hoje" */
.btn-today-active {
    background-color: #cfe2ff !important;
    /* Cor real da sidebar */
    color: #212529 !important;
    /* Texto escuro para contraste com azul claro */
    border-color: #6c757d !important;
    /* Manter a borda cinza padrão ou similar */
}

/* Dia selecionado (cinza claro persistente) */
.btn-data-navegacao.btn-date-selected {
    background-color: #e9ecef !important;
    /* cinza claro */
    color: #212529 !important;
    border-color: #ced4da !important;
}

.btn-data-navegacao.btn-date-selected:hover,
.btn-data-navegacao.btn-date-selected:focus,
.btn-data-navegacao.btn-date-selected:active {
    background-color: #dadfe4 !important;
    /* cinza um pouco mais escuro no hover */
    color: #212529 !important;
    border-color: #c1c9d0 !important;
}

/* Dias com agendamento: aplicam verde APENAS se NÃO estiver selecionado */
.btn-has-ags:not(.btn-date-selected) {
    background-color: #eaf7ea !important;
    /* verde bem claro */
    color: #0f5132 !important;
    border-color: #badbcc !important;
}

.btn-has-ags:not(.btn-date-selected):hover {
    background-color: #d1ecd1 !important;
    color: #0f5132 !important;
    border-color: #86cfab !important;
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* Custom Styles for Nav Tabs */
.nav-tabs .nav-link.active {
    background-color: #dfdfdf;
    /* Fundo cinza claro */
    border-color: #dee2e6 #dee2e6 #f1f1f1;
    /* Borda inferior some com o fundo */
    color: #495057;
    /* Cor do texto para um cinza escuro padrão do Bootstrap, parecido com o texto normal. Ou 'inherit' para herdar a cor do pai. */
}

.nav-tabs .nav-link {
    color: #495057;
    /* Garante que os links não ativos também tenham essa cor de texto */
}

/*-----------------------lista_agendamentos.html---------------------------*/


/*-----------------------agendamentos_table.html---------------------------*/
/* habilita rolagem vertical dentro da tabela */
.table-responsive.sticky-header {
    max-height: 70vh;
    /* ajuste se quiser mais/menos alto */
    overflow-y: auto;
}

/* deixa o cabeçalho colado no topo durante a rolagem */
.table-responsive.sticky-header thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    /* fica acima das linhas */
    background-color: var(--bs-light, #f8f9fa);
    /* combina com .table-light */
}

.requisicao-miniatura {
    max-width: 150px;
    /* Ajuste este valor para o tamanho desejado da miniatura */
    height: auto;
    display: inline-block;
    margin-right: 10px;
    vertical-align: top;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}

/* Cores de fundo personalizadas para linhas de agendamento */
/* Aumenta a especificidade para garantir que sobrescreva estilos de tabela do Bootstrap */
/* Adicionado .table para aumentar ainda mais a especificidade */
.table.table-hover.table-striped tbody tr.agendamento-row.bg-light-purple,
.table.table-hover tbody tr.agendamento-row.bg-light-purple {
    /* Para tabelas sem striped */
    background-color: #E6E6FA !important;
    /* Roxo claro (Lavender) */
}

.table.table-hover.table-striped tbody tr.agendamento-row.bg-light-red,
.table.table-hover tbody tr.agendamento-row.bg-light-red {
    /* Para tabelas sem striped */
    background-color: #FFCCCC !important;
    /* Vermelho claro (Light Coral) */
}

/* Estilos para slots disponíveis */
.slot-available {
    background-color: #e6ffe6;
    /* Um verde bem clarinho para slots disponíveis */
}

.slot-available:hover {
    background-color: #d0ffc0;
    /* Um verde um pouco mais forte no hover */
}

/* Estilo para a linha clicável */
.clickable-slot {
    cursor: pointer;
    /* Muda o cursor para indicar que é clicável */
}

.clickable-slot:hover {
    background-color: #d0ffc0 !important;
    /* Garante que o hover seja aplicado */
}


.slot-available-dentista {
    background-color: #f8f9fa;
    /* Um cinza muito claro para dentistas verem slots vazios */
    cursor: default;
    /* Não clicável para dentistas */
}

/* NOVO: Estilo para slots indisponíveis (horário já passou) */
.slot-unavailable {
    background-color: #f0f0f0 !important;
    /* Um cinza claro para indisponível */
    color: #888;
    /* Texto mais apagado */
    cursor: not-allowed;
    /* Cursor de "não permitido" */
    text-decoration: line-through;
    /* Opcional: riscar o texto */
}

.slot-unavailable:hover {
    background-color: #f0f0f0 !important;
    /* Mantém a cor no hover */
    color: #888 !important;
}

/* Removido .btn-block-slot pois não será mais um botão */

/* Garante que o hover não sobrescreva as cores personalizadas */
/* Aumenta a especificidade para lidar com as classes de cor */
.table-hover tbody tr.agendamento-row.bg-light-purple:hover {
    background-color: #E6E6FA !important;
    /* Mantém a cor roxa clara no hover */
}

.table-hover tbody tr.agendamento-row.bg-light-red:hover {
    background-color: #FFCCCC !important;
    /* Mantém a cor vermelha clara no hover */
}

/* Garante que o hover nas linhas listradas coloridas mantenha a cor */
.table-striped tbody tr:nth-of-type(odd).agendamento-row.bg-light-purple:hover,
.table-striped tbody tr:nth-of-type(even).agendamento-row.bg-light-purple:hover {
    background-color: #E6E6FA !important;
}

.table-striped tbody tr:nth-of-type(odd).agendamento-row.bg-light-red:hover,
.table-striped tbody tr:nth-of-type(even).agendamento-row.bg-light-red:hover {
    background-color: #FFCCCC !important;
}

/* Cores suaves por status */
tr.agendamento-row.row-status-P {
    background-color: #f2f2f7;
}

tr.agendamento-row.row-status-C {
    background-color: #e7f3ff;
}

tr.agendamento-row.row-status-F {
    background-color: #eaf8ee;
}

tr.agendamento-row.row-status-X {
    background-color: #fdecea;
}

tr.agendamento-row.row-status-R {
    background-color: #fff7e6;
}

.table-striped>tbody>tr.row-status-P:nth-of-type(odd) {
    background-color: #ececf2;
}

.table-striped>tbody>tr.row-status-C:nth-of-type(odd) {
    background-color: #dff0ff;
}

.table-striped>tbody>tr.row-status-F:nth-of-type(odd) {
    background-color: #e1f3e7;
}

.table-striped>tbody>tr.row-status-X:nth-of-type(odd) {
    background-color: #fbd8d5;
}

.table-striped>tbody>tr.row-status-R:nth-of-type(odd) {
    background-color: #ffefd6;
}

/*-----------------------agendamentos_table.html---------------------------*/

/* ======================== */
/* Select colorido por status */
/* ======================== */
.status-inline-select.status-P {
    --bs-form-select-bg: #f2f2f7;
    --bs-form-select-color: #000;
    background-color: #f2f2f7 !important;
    color: #000 !important;
    border-color: #ced4da !important;
}

.status-inline-select.status-C {
    --bs-form-select-bg: #e7f3ff;
    --bs-form-select-color: #055160;
    background-color: #e7f3ff !important;
    color: #055160 !important;
    border-color: #b6e0f5 !important;
}

.status-inline-select.status-X {
    --bs-form-select-bg: #fdecea;
    --bs-form-select-color: #842029;
    background-color: #fdecea !important;
    color: #842029 !important;
    border-color: #f5c2c7 !important;
}

.status-inline-select.status-R {
    --bs-form-select-bg: #fff7e6;
    --bs-form-select-color: #664d03;
    background-color: #fff7e6 !important;
    color: #664d03 !important;
    border-color: #ffe69c !important;
}

.status-inline-select.status-F {
    --bs-form-select-bg: #eaf8ee;
    --bs-form-select-color: #0f5132;
    background-color: #eaf8ee !important;
    color: #0f5132 !important;
    border-color: #a3cfbb !important;
}

.status-inline-select.status-P:focus,
.status-inline-select.status-P:hover {
    box-shadow: 0 0 0 .2rem rgba(108, 117, 125, .15);
}

.status-inline-select.status-C:focus,
.status-inline-select.status-C:hover {
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .15);
}

.status-inline-select.status-X:focus,
.status-inline-select.status-X:hover {
    box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .15);
}

.status-inline-select.status-R:focus,
.status-inline-select.status-R:hover {
    box-shadow: 0 0 0 .2rem rgba(255, 193, 7, .20);
}

.status-inline-select.status-F:focus,
.status-inline-select.status-F:hover {
    box-shadow: 0 0 0 .2rem rgba(25, 135, 84, .15);
}

.status-inline-select:disabled {
    opacity: .9;
    cursor: not-allowed;
}

/* ===== agendamentos_table.html ===== */
/* ===== Post-its (observações)  ===== */
.obs-wrapper {
    padding: .5rem 0;
}

.obs-surface {
    position: relative;
    padding: 1rem .75rem .75rem .75rem;
    background: #f8f9fb;
    border: 1px solid rgba(0, 0, 0, .05);
    border-radius: 12px;
}

.obs-controls {
    position: absolute;
    top: .5rem;
    right: .5rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.btn-ghost {
    --pad-y: .2rem;
    --pad-x: .6rem;
    --radius: 9999px;
    padding: var(--pad-y) var(--pad-x);
    border: 1px solid #0d6efd;
    color: #0d6efd;
    background: transparent;
    border-radius: var(--radius);
    font-size: .8rem;
    line-height: 1;
}

.btn-ghost:hover {
    background: rgba(13, 110, 253, .06);
    color: #0a58ca;
    border-color: #0a58ca;
}

.palette {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.color-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, .15);
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .05) inset;
}

.color-dot[data-color="yellow"] {
    background: #fff59d;
}

.color-dot[data-color="pink"] {
    background: #ffd1dc;
}

.color-dot[data-color="green"] {
    background: #c8e6c9;
}

.color-dot[data-color="blue"] {
    background: #b3e5fc;
}

.color-dot[data-color="orange"] {
    background: #ffe0b2;
}

.color-dot.active {
    outline: 2px solid rgba(13, 110, 253, .35);
    outline-offset: 2px;
}

.obs-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.postit {
    --tilt: -1.2deg;
    width: 180px;
    min-height: 110px;
    padding: 10px 12px;
    background: #fff59d;
    border-radius: 10px;
    box-shadow: 0 8px 14px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .06);
    transform: rotate(var(--tilt));
    position: relative;
    cursor: pointer;
}

.postit::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e53935;
    box-shadow: 0 2px 0 rgba(0, 0, 0, .2) inset;
}

.postit .content {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.postit .meta {
    font-size: .75rem;
    opacity: .75;
    margin-top: .5rem;
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
}

.postit-yellow {
    background: #fff59d;
}

.postit-pink {
    background: #ffd1dc;
}

.postit-green {
    background: #c8e6c9;
}

.postit-blue {
    background: #b3e5fc;
}

.postit-orange {
    background: #ffe0b2;
}
