/* ==========================================================================
   ATENDIMENTO MÉDICO (APPLE INSPIRED)
   ========================================================================== */

/* Fila de pacientes */
#filaAtendimentoContainer {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

#filaAtendimentoContainer::-webkit-scrollbar {
    width: 4px;
}

#filaAtendimentoContainer::-webkit-scrollbar-track {
    background: transparent;
}

#filaAtendimentoContainer::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Card de paciente na fila */
.fila-paciente-card {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.fila-paciente-card:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(0, 113, 227, 0.3) !important;
    transform: translateX(3px);
}

.fila-paciente-card.ativo {
    background: rgba(0, 113, 227, 0.1) !important;
    border-color: rgba(0, 113, 227, 0.35) !important;
}

/* Painel de consulta ativa */
#painelConsultaAtiva {
    min-height: 300px;
}

#atendPacienteNome {
    color: #ffffff;
    letter-spacing: -0.02em;
}

#atendPacienteInfo {
    color: rgba(255, 255, 255, 0.45) !important;
}

/* Nav pills (abas do prontuário) */
#atendimento-medico .nav-pills .nav-link {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.55rem 1rem;
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

#atendimento-medico .nav-pills .nav-link:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.1);
}

#atendimento-medico .nav-pills .nav-link.active {
    background: rgba(0, 113, 227, 0.15) !important;
    border-color: rgba(0, 113, 227, 0.3) !important;
    color: #4da3ff !important;
    font-weight: 600;
}

/* Área de evolução */
#atend_timelineEvolucao {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

#atend_timelineEvolucao::-webkit-scrollbar {
    width: 4px;
}

#atend_timelineEvolucao::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* ==========================================================================
   ODONTOGRAMA SVG
   ========================================================================== */
.odontograma-svg {
    width: 100%;
    max-width: 830px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.dent-item {
    fill: rgba(255, 255, 255, 0.06);
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 1.5;
    cursor: pointer;
    transition: fill 0.2s ease, stroke 0.2s ease;
}

.dent-item:hover {
    fill: rgba(0, 113, 227, 0.2);
    stroke: #0071e3;
    stroke-width: 2;
}

.dent-item.selecionado {
    fill: rgba(0, 113, 227, 0.35);
    stroke: #0071e3;
    stroke-width: 2;
}

/* Status dentários */
.dent-item.cariado       { fill: rgba(239, 68, 68, 0.3);   stroke: #ef4444; }
.dent-item.restaurado    { fill: rgba(52, 199, 89, 0.3);   stroke: #34c759; }
.dent-item.extraido      { fill: rgba(107, 114, 128, 0.3); stroke: #6b7280; }
.dent-item.coroa         { fill: rgba(255, 149, 0, 0.3);   stroke: #ff9500; }
.dent-item.tratamento    { fill: rgba(168, 85, 247, 0.3);  stroke: #a855f7; }
.dent-item.implante      { fill: rgba(0, 113, 227, 0.4);   stroke: #0071e3; }
.dent-item.ausente       { fill: rgba(156, 163, 175, 0.15); stroke: rgba(156, 163, 175, 0.4); stroke-dasharray: 3,2; }

/* Labels do odontograma */
.odontograma-label {
    font-size: 9px;
    fill: rgba(255, 255, 255, 0.45);
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;
    pointer-events: none;
}

.quadrante-label {
    font-size: 8px;
    fill: rgba(255, 255, 255, 0.25);
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    pointer-events: none;
}

/* Linhas de grade do odontograma */
.odontograma-grid-line {
    stroke: rgba(255, 255, 255, 0.07);
    stroke-width: 1;
    stroke-dasharray: 4, 3;
}

/* Legendas */
#atend_odontograma-legendas .badge {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    border-radius: 8px;
    font-size: 0.73rem;
}

/* ==========================================================================
   TABELAS DO ATENDIMENTO
   ========================================================================== */

/* Procedimentos e Materiais */
.table-responsive.border {
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px;
    overflow: hidden;
}

#tableAtendProcedimentos,
#tableAtendMateriais {
    color: #e5e7eb !important;
}

#tableAtendProcedimentos thead.table-light th,
#tableAtendMateriais thead.table-light th {
    background: rgba(255, 255, 255, 0.04) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.85rem 1rem;
}

#tableAtendProcedimentos tbody td,
#tableAtendMateriais tbody td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
    color: #d1d5db !important;
    padding: 0.75rem 1rem;
}

#tableAtendProcedimentos tfoot tr.table-secondary td {
    background: rgba(255, 255, 255, 0.03) !important;
    color: #ffffff !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* List groups (receitas e atestados) */
.list-group-flush.border.rounded-3 {
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
    overflow: hidden;
}

.list-group-flush .list-group-item {
    background: rgba(255, 255, 255, 0.02) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: #d1d5db !important;
    transition: background 0.2s ease;
}

.list-group-flush .list-group-item:hover {
    background: rgba(255, 255, 255, 0.04) !important;
}

.list-group-flush .list-group-item:last-child {
    border-bottom: none !important;
}

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */
@media (max-width: 768px) {
    .odontograma-svg {
        max-width: 100%;
        min-width: 500px;
    }

    .odontograma-container-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
    }

    #atendimento-medico .nav-pills {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
    }

    #atendimento-medico .nav-pills .nav-link {
        white-space: nowrap;
        font-size: 0.8rem;
        padding: 0.45rem 0.75rem;
    }

    #colFilaAtendimento {
        margin-bottom: 1.5rem;
    }
}

