* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

}

/* Header Styles */
.header-container {
    background-color: #e2e3e4;
    padding: 10px 20px;
    /* Adiciona um pouco de padding lateral */
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    /* Garante que o container ocupe toda a largura */

}

.logo {
    width: 200px;
    height: auto;
    margin-right: 20px;

}

.menu-items {
    display: flex;

}

.item {
    background-color: orange;
    margin: 10px;
    color: aliceblue;
    width: 150px;
    height: 28px;
    border-radius: 5px;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;

}

/* Main Layout Styles */
.main-content {
    display: flex;
    padding: 10px;
    gap: 10px;
    min-height: 75vh;
    /* Alinha com a altura do .calendar-wrapper */

}

/* Left and Right Column Styles */
.left-column {
    flex: 4;
    /* 80% of the space */

}

.right-column {
    flex: 1;
    /* 20% of the space */
    overflow-y: auto;
    /* Adiciona rolagem à coluna da direita se necessário */
    display: flex;
    flex-direction: column;

}

/* Estilos para o container do calendário para garantir a altura */
#calendar {
    height: 100%;
    /* Faz o calendário preencher a altura da coluna */
    min-height: 75vh;
    /* Garante uma altura mínima */

}

/* Right Column Content */
.professional-selector {
    background-color: #f0f0f0;
    padding: 10px;
    margin-bottom: 10px;
    /* Adiciona espaço abaixo */

}

.professional-selector select {
    width: 100%;
    /* Faz o select ocupar toda a largura */
    padding: 8px;
    font-size: 1em;
    margin-bottom: 10px;
    /* Adiciona um espaço abaixo do seletor */

}

/* Mini Calendar (in right column) */
.mini-calendar {
    margin-top: 20px;
    /* Adiciona espaço acima */
    min-height: 200px;
    background-color: #f0f0f0;

}

.mini-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;

}

.mini-calendar-header button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;

}

.mini-calendar-days-header,
.mini-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    gap: 4px;

}

.mini-calendar-days-header div {
    font-weight: bold;

}

.mini-calendar-days .day {
    padding: 5px;
    cursor: pointer;

}

.mini-calendar-days .prev-month,
.mini-calendar-days .next-month {
    color: #ccc;

}

.mini-calendar-days .today {
    background-color: #fce4ec;
    border-radius: 50%;
    font-weight: bold;

}

.mini-calendar-days .day:hover {
    background-color: #e0e0e0;
    border-radius: 50%;

}

/* Status Legend Styles */
.status-legend {
    margin-top: 20px;

}

.status-legend h4 {
    margin-bottom: 10px;
    font-size: large;

}

.status-legend ul {
    list-style: none;
    padding: 0;

}

.status-legend li {
    padding: 5px;
    margin-bottom: 5px;
    border-radius: 5px;

}

.status-agendado {
    background-color: #d3d3d3;
    border: 1px solid #b3b3b3;

}

.status-confirmado {
    background-color: #00ffff;
    border: 1px solid #00e6e6;

}

.status-esperando {
    background-color: #ffa500;
    border: 1px solid #e69500;

}

.status-cancelado {
    background-color: #ff0000;
    border: 1px solid #e60000;
    color: white;

}

.status-nao-compareceu {
    background-color: #ffc0cb;
    border: 1px solid #ffb3c1;

}

.status-reagendado {
    background-color: #a52a2a;
    border: 1px solid #8c2323;
    color: white;

}

.status-em-atendimento {
    background-color: #808080;
    border: 1px solid #666666;
    color: white;

}

.status-finalizado {
    background-color: #008000;
    border: 1px solid #006600;
    color: white;

}

.status-bloqueado {
    background-color: #e1e3d4;
    border: 1px solid #660066;
    color: white;

}

.status-online {
    background-color: #e094e0;
    border: 1px solid #c07ab1;
    color: white;

}

/* Message Box Styles */
.message-box {
    margin-top: 20px;
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 5px;

}

.message-box h4 {
    margin-bottom: 10px;

}

.message-box label {
    display: block;
    margin-bottom: 5px;

}

.message-box select,
.message-box textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;

}

.message-box textarea {
    resize: vertical;
    min-height: 80px;

}

.message-box button {
    width: 100%;
    padding: 10px;
    border: none;
    background-color: orange;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;

}

.message-box button:hover {
    background-color: orange;

}

/* Dropdown Menu Styles */
.menu-items .item a,
.menu-items .item button {
    color: aliceblue;
    text-decoration: none;
    background: none;
    border: none;
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;

}

.dropdown {
    position: relative;
    display: inline-block;

}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: orange;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 2;
    border-radius: 5px;

}

.dropdown-content a,
.menu-items .item .dropdown-content a {
    color: white;
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-size: 16px;
}

.dropdown-content a:hover {
    background-color: rgb(5, 5, 39);

}

.dropdown:hover .dropdown-content {
    display: block;

}

/* Week View Styles */
.hidden {
    display: none;

}

.week-grid {
    display: grid;
    grid-template-columns: 80px repeat(5, 1fr);
    /* 1 para horário + 5 para os dias */

}

.grid-header-day {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    background-color: #f0f0f0;
    text-align: center;
    font-weight: bold;

}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;

}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;

}

.modal-content h2 {
    margin-bottom: 20px;

}

.appointment {
    position: absolute;
    left: 0;
    right: 5px;
    /* Pequena margem à direita */
    background-color: #e3f2fd;
    border: 1px solid #2196f3;
    border-left: 3px solid #2196f3;
    border-radius: 4px;
    padding: 2px 5px;
    box-sizing: border-box;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    z-index: 1;

}

.appointment.status-confirmado {
    background: #c8e6c9;
    border-color: #4caf50;

}

.appointment.status-pendente {
    background: #fff9c4;
    border-color: #ffca28;

}

.appointment-time {
    font-weight: bold;

}

/* --- Estilos Responsivos --- */

/* Botão Hambúrguer (escondido por padrão em telas grandes) */
.hamburger {
    display: none;
    font-size: 30px;
    background: none;
    border: none;
    color: #333;
    cursor: pointer;

}

/* Media Query para telas menores (a partir de 1100px) */
@media (max-width: 1100px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .hamburger {
        display: block;
        position: absolute;
        top: 25px;
        right: 20px;
    }

    .menu-items {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
    }

    .menu-items.show {
        display: flex;
    }

    .item {
        width: 100%;
        margin: 5px 0;
        justify-content: flex-start;
        padding-left: 15px;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        background-color: #f0a04b;
    }

    .main-content {
        flex-direction: column;
    }

    .left-column,
    .right-column {
        flex: 1;
        width: 100%;
    }
}

/* --- Ajustes de Responsividade para o Calendário --- */
@media (max-width: 767px) {
    .fc .fc-toolbar {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .fc .fc-toolbar-chunk:nth-child(2) {
        /* Título */
        width: 100%;
        order: -1;
        /* Move para o topo */
        text-align: center;
    }

    .fc .fc-toolbar-title {
        font-size: 1.25rem;
        display: block;
        margin-bottom: 5px;
    }
}

/* --- Estilos Globais do Modal (Renomeados para evitar conflito com Bootstrap) --- */

.custom-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    padding-top: 60px;

}

.custom-modal-content {
    background-color: #f0f0f0;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 700px;
    border-radius: 10px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);

}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #ccc;
    margin-bottom: 20px;

}

.modal-header h2 {
    color: #095698;
    margin: 0;

}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;

}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;

}

.modal-body fieldset {
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;

}

.modal-body .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;

}

.modal-body .form-group {
    display: flex;
    flex-direction: column;
    flex: 1;

}

.modal-body .form-group.flex-2 {
    flex: 2;

}

.modal-body .form-group.flex-3 {
    flex: 3;

}

.modal-body .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;

}

.modal-body .form-group input,
.modal-body .form-group select,
.modal-body .form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;

}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    margin-top: 20px;

}

.modal-footer button {
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: bold;

}

.btn-cancel,
.btn-delete {
    background-color: #ccc;
    color: black;

}

.btn-delete {
    background-color: #dc3545;

}

/* Estilos para o FullCalendar e Agenda */
.fc-event {
    cursor: pointer;
    margin-bottom: 2px !important;
}

.fc-event-title {
    font-weight: 600;
    font-size: 0.8em;
    padding: 0 2px;
}

.fc-v-event .fc-event-main {
    padding: 2px 0;
    display: flex;
    flex-direction: column;
    height: 100% !important;
}

.fc-v-event .fc-event-main-frame {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100% !important;
}

/* Efeito listrado para bloqueios */
.fc-event[style*="background-color: rgb(128, 0, 128)"],
.fc-event[style*="background-color: #e1e3d4"] {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent);
    background-size: 20px 20px;

}

/* Efeito de Piscar para a Fila de Espera (Padrão Amplimed) */
@keyframes piscar {
    0% {
        opacity: 1;

    }

    50% {
        opacity: 0.5;

    }

    100% {
        opacity: 1;

    }

}

.piscar-espera {
    animation: piscar 1.5s infinite;
    border: 2px dashed #996300 !important;

}

/* ===== User Profile Chip ===== */
.user-chip-item {
    background-color: #095698 !important;
    min-width: 160px !important;
    width: auto !important;
    padding: 0 10px;

}

.user-chip-item .user-dropdown-content {
    right: 0;
    left: auto;
    min-width: 160px;

}

.user-chip-btn {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    white-space: nowrap;

}

.user-avatar {
    background-color: #fff;
    color: #095698;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75em;
    flex-shrink: 0;

}

.user-avatar-lg {
    background: linear-gradient(135deg, #095698, #1a7ec8);
    color: #fff;
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5em;
    margin: 0 auto;
}


/* Estilo Global para Tabelas de Resumo do Paciente (Modo Leitura) */
#paciente_readonly .table-sm {
    font-size: 13px;
}

/* Ajuste opcional para os rótulos (Data nasc, CPF, etc) ficarem mais discretos */
#paciente_readonly .table-sm td.fw-bold {
    font-size: 12px;
    color: #6c757d;
}

/* Diminuir o espaçamento entre as linhas para um visual mais limpo */
#paciente_readonly .table-sm td {
    padding-top: 4px;
    padding-bottom: 4px;
}

/* Aumentar altura dos slots para comportar confortavelmente as 4 linhas */
.fc-timegrid-slot {
    height: 60px !important;
}

.fc-timegrid-event {
    min-height: 60px !important;
}

/* ===== Design System Overrides: Modal Agendamento ===== */
.modal-header-alk {
    background-color: #095698 !important;
    color: white !important;
    padding: 0.5rem 1rem !important;
}

.modal-header-bloqueio {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.modal-title-alk {
    color: white !important;
    margin: 0 !important;
    font-size: 1.1rem !important;
    font-weight: 500;
}

.header-patient-alk {
    background-color: #f8f9fa;
    border-left: 3px solid #2471a3;
    padding: 0.5rem !important;
    margin-bottom: 0.75rem !important;
    border-radius: 0.25rem;
}

.patient-name-alk {
    color: #095698;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0 !important;
}

.dt-display-alk {
    background-color: #f8f9fa;
    padding: 0.25rem !important;
    margin-bottom: 0.5rem !important;
    border-radius: 0.25rem;
    justify-content: center;
    text-align: center;
}

.badge-alk-small {
    font-size: 0.8rem !important;
    padding: 0.25rem 0.75rem !important;
}

.consultas-box-alk {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.5rem !important;
    font-size: 0.85rem;
}

.footer-alk-compact {
    padding: 0.5rem 1rem !important;
}

.dropdown-item-compact {
    font-size: 0.85rem !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}

.btn-alk-compact {
    font-size: 0.85rem !important;
}