/* user.css - Estilo modernizado para tabela de usuários */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    background: #e4ebf3;
}

/* Regras globais para botões - consistência */
.btn, button, input[type="button"], input[type="submit"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none !important;
    box-sizing: border-box;
}

.btn:focus, .btn:active, .btn:focus-visible,
button:focus, button:active, button:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.25) !important;
}

/* Centralização de botões no mobile */
@media (max-width: 768px) {
    .btn-container,
    .button-group,
    .form-actions,
    .card-footer,
    .modal-footer {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    .btn-container .btn,
    .button-group .btn,
    .form-actions .btn,
    .card-footer .btn,
    .modal-footer .btn {
        margin: 0 !important;
        width: auto !important;
        min-width: 120px !important;
        max-width: 180px !important;
    }

    /* Centralização específica para formulários */
    .form-card .d-flex,
    .form-card .btn-group,
    .form-card .form-button-group,
    .patient-form .d-flex,
    .patient-form .btn-group {
        justify-content: center !important;
        align-items: center !important;
    }

    /* Botões em containers flexíveis */
    .d-flex .btn,
    .btn-group .btn,
    .form-button-group .btn {
        /* margin: 0 0.25rem !important; */
        width: auto !important;
        min-width: 120px !important;
        max-width: 180px !important;
    }

    /* EXCEÇÃO: botões de pacientes ficam centralizados mas pequenos na mesma linha */
    .patient-footer {
        justify-content: center !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 0.25rem !important;
    }

    .patient-footer .patient-btn {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.75rem !important;
        min-height: 28px !important;
        min-width: 60px !important;
        max-width: 80px !important;
        flex: 0 0 auto !important;
    }

    /* EXCEÇÃO: botões de usuários ficam pequenos lado a lado */
    .user-card .card-footer {
        justify-content: center !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 0.2rem !important;
    }

    .user-card .card-footer .btn {
        padding: 0.2rem 0.4rem !important;
        font-size: 0.65rem !important;
        min-height: 26px !important;
        min-width: 45px !important;
        max-width: 65px !important;
        flex: 1 1 0% !important;
        margin: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}


.user {
    background: #fbfcfd;
    min-height: 100vh;
    padding: 32px 0;
    font-family: 'Roboto', sans-serif;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    /* sombra padrão */
    transition: box-shadow 0.3s ease;
}

.form-card {
    background: #fbfcfd;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    transition: box-shadow 0.3s ease;
    max-width: 100%;
    margin: 0 auto;
}

.form-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Ajustes para telas menores */
@media (max-width: 768px) {
    .form-card {
        padding: 1rem;
        /* menos espaço interno */
        border-radius: 10px;
        /* bordas um pouco menores */
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
        /* sombra mais leve */
    }
}


.user:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    /* sombra mais forte no hover */
}


.user-table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
    background: #ffffff;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    transition: all 0.3s ease;
}

.user-table th {
    background: #007bff;
    color: #fff;
    font-weight: 500;
    border: none;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    padding: 15px 20px;
}

.user-table td {
    background: #ffffff;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    font-size: 0.92rem;
    padding: 12px 20px;
    transition: all 0.2s ease;
}

.user-table tr:hover td {
    background: #f1f7ff;
    transform: translateX(2px);
}

.user-table tr:last-child td {
    border-bottom: none;
}

.user-table .btn {
    border-radius: 6px;
    font-size: 0.8125rem;
    padding: 0.4rem 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
    margin-right: 0.25rem;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.user-table .btn:last-child {
    margin-right: 0;
}

.user-table .btn-warning {
    background: #ffc107;
    color: #212529;
    border: none;
}

.user-table .btn-warning:hover {
    background: #e0a800;
    transform: translateY(-1px);
}

.user-table .btn-danger {
    background: #dc3545;
    color: #fff;
    border: none;
}

.user-table .btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.user-table .btn-primary {
    background: #007bff;
    color: #fff;
    border: none;
}

.user-table .btn-primary:hover {
    background: #0069d9;
    transform: translateY(-1px);
}

/* Efeito de zebrado moderno */
.user-table tr:nth-child(even) td {
    background: #f8f9fa;
}

.user-table tr:nth-child(even):hover td {
    background: #eaf2ff;
}

.btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    line-height: 1.4;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    min-height: 36px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.3;
    min-height: 32px;
}



.btn-primary {
    background-color: var(--primary-color, #4299e1);
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: #3182ce;
    color: white;
}

/* Responsividade */
@media (max-width: 768px) {

    .user-table th,
    .user-table td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .user {
        padding: 16px 0;
    }

    .user-table .btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
        margin-right: 0.125rem;
        margin-bottom: 0.25rem;
        min-height: 30px;
        width: auto;
        display: inline-flex;
    }
}

/* Animação para linhas novas */
@keyframes fadeIn {
    from {
        opacity: 0;
        background-color: #e3f2fd;
    }

    to {
        opacity: 1;
        background-color: inherit;
    }
}

.user-table tr.highlight {
    animation: fadeIn 1.5s ease-out;
}



.user-card.card::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border-radius: 16px;
    background: rgba(0, 191, 174, 0.10);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.25s;
}

.user-card.card:hover {
    box-shadow: 0 8px 32px rgba(0, 191, 174, 0.22), 0 2px 8px rgba(0, 123, 255, 0.10);
    background: #e6f7f5;
    border-color: #007bff;
}

.user-card.card:hover::before {
    opacity: 1;
}


.user-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #007bff;
    margin-bottom: 0.3rem;
    word-break: break-word;
    white-space: normal;
}



.user-card .btn {
    border-radius: 6px;
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
    margin-right: 0.25rem;
    min-height: 32px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.user-card .btn:last-child {
    margin-right: 0;
}

.user-card .btn-warning {
    background: #ffb300;
    color: #fff;
    border: none;
}

.user-card .btn-danger {
    background: #e53935;
    color: #fff;
    border: none;
}

.user-card .btn-info {
    background: #00bfae;
    color: #fff;
    border: none;
}


.user-card:hover {
    box-shadow: 0 8px 24px rgba(0, 188, 212, 0.18);
    background: #e3f7fa;
    border-color: #007bff;
}

.user-card .user-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #007bff;
    margin-bottom: 0.2rem;
}

.user-card .user-card-email {
    font-size: 1rem;
    color: #555;
    margin-bottom: 0.7rem;
}

.user-card .user-card-coren,
.user-card .user-card-role {
    font-size: 0.95rem;
    color: #009688;
    margin-bottom: 0.5rem;
}

.user-card .user-card-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.7rem;
}

.user-card .btn {
    font-size: 0.85rem;
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
}

/* Ajuste geral do card */
.user-card.card {
    max-width: 100%;
    padding: 1rem 0.8rem;
    margin-bottom: 1rem;
    min-height: auto;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0, 191, 174, 0.10);
    border: 2px solid #00bfae;
    background: #f8fdfc;
    transition: box-shadow 0.25s, background 0.25s, border-color 0.25s;
    position: relative;
    z-index: 1;
}

.user-card {
    border: 2.5px solid #00bcd4;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s, background 0.3s, border-color 0.3s;
    padding: 1.5rem 1.2rem 1.2rem 1.2rem;
    margin-bottom: 1.5rem;
    min-width: 260px;
    max-width: 340px;
    vertical-align: top;
}

/* Hover card */
.user-card.card:hover {
    box-shadow: 0 8px 32px rgba(0, 191, 174, 0.22), 0 2px 8px rgba(0, 123, 255, 0.10);
    background: #e6f7f5;
    border-color: #007bff;
}

/* Avatar reduzido */
.user-avatar {
    background: #00bfae !important;
    color: #fff !important;
    font-size: 1.3rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
    /* Impede que o avatar diminua por causa de textos grandes */
}



.user-card .card-text,
.user-card .user-card-coren,
.user-card .user-card-role {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 0.3rem;
}

.user-card .card-footer {
    background: transparent;
    /* ou #f8fdfc se quiser o mesmo tom do card */
    border-top: none;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

/* Botões menores nos cards */
.user-card .btn {
    font-size: 0.75rem;
    padding: 0.3125rem 0.625rem;
    border-radius: 6px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    outline: none;
    transition: all 0.25s ease;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.25rem;
}

.user-card .btn:last-child {
    margin-right: 0;
}

/* Cores personalizadas dos botões */
.user-card .btn-warning {
    background: #ffb300;
    color: #fff;
    border: none;
}

.user-card .btn-info {
    background: #00bfae;
    color: #fff;
    border: none;
}

.user-card .btn-danger {
    background: #e53935;
    color: #fff;
    border: none;
}

/* Hover sem brilho branco */
.user-card .btn:focus,
.user-card .btn:active,
.user-card .btn:focus-visible {
    outline: none !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
    background-blend-mode: normal;
    transform: translateY(-1px);
}

.user-card .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Layout em 3 colunas fixo */
@media (min-width: 992px) {
    .user .row {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .user .row>div.col-lg-4 {
        flex: 1 1 calc(33.333% - 1rem);
        max-width: calc(33.333% - 1rem);
    }
}

/* Responsivo para mobile */
@media (max-width: 768px) {
    .user-card.card {
        margin-bottom: 1rem;
        width: 100%;
        /* Ocupa toda a largura disponível */
        max-width: 300px;
        /* Largura máxima consistente */
        margin-left: auto;
        margin-right: auto;
        /* Centraliza o card */
    }


}


.user-card .card-text,
.user-card .user-card-coren,
.user-card .user-card-role {
    font-size: 0.8125rem;
}

.user-card .btn {
    font-size: 0.75rem;
    padding: 0.3125rem 0.625rem;
    min-height: 30px;
}

.titulo-principal {
    font-size: 2rem;
    font-weight: bold;
    text-align: left;
    margin-bottom: 1rem;
}

/* Responsivo para telas menores */
@media (max-width: 768px) {
    .titulo-principal {
        font-size: 1.5rem;
        text-align: center !important;
        /* Centraliza o título em telas menores */
    }
}

.btn-container {
    width: 100%;
    text-align: right;
    /* Alinhado à direita por padrão */
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .btn-container {
        text-align: center;
        /* Centraliza o botão em telas pequenas */
    }
}

.titulo-usuario {
    font-size: 2rem;
    font-weight: bold;
    text-align: left;
    margin-bottom: 1rem;
}

/* Em telas menores, centraliza e reduz o tamanho */
@media (max-width: 768px) {
    .titulo-usuario {
        font-size: 1.5rem;
        text-align: center;
    }
}



/*CSS DO FORMULÁRIO DE USUÁRIO
=====================================================
=====================================================*/

/* Estilos para o formulário de usuário */
.user-form-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.user-form-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.user-form-card:hover {
    box-shadow: 0 12px 24px rgba(0, 123, 255, 0.15);
    transform: translateY(-2px);
}

.user-form-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #f0f3f7;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #4a5568;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1.05rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    min-height: 48px;
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    max-width: 100%;
    padding: 0.6rem 1rem;
    font-size: 1.05rem;
    min-height: 48px;
    line-height: 1.6;
    background-color: #fff;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg fill='none' stroke='%234a5568' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    cursor: pointer;
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #90cdf4;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(144, 205, 244, 0.3);
}

/* Efeito para os campos quando em foco */
.form-control-focus-effect {
    position: relative;
}

.form-control-focus-effect:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    pointer-events: none;
    box-shadow: 0 0 0 0px rgba(66, 153, 225, 0);
    transition: box-shadow 0.2s ease;
}

.form-control:focus+.form-control-focus-effect:after {
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.3);
}

/* RESPONSIVO para telas menores */
@media (max-width: 768px) {

    .form-control,
    select.form-control {
        font-size: 0.95rem;
        padding: 0.6rem 0.85rem;
        min-height: 44px;
        background-position: right 0.8rem center;
        background-size: 0.85rem;
    }

    .form-group {
        margin-bottom: 0.75rem;
    }
}

.titulo-paciente {
    font-size: 2rem;
    font-weight: bold;
    text-align: left;
    margin-bottom: 1rem;
}

/* Em telas menores (celular) */
@media (max-width: 768px) {
    .titulo-paciente {
        font-size: 1.5rem;
        text-align: center;
    }
}



/* Estilo base do botão */
.btn-primary {
    background-color: #4299e1;
    border-color: #4299e1;
    color: white;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    line-height: 1.4;
    border-radius: 6px;
    transition: all 0.25s ease;
    font-weight: 500;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 4px rgba(66, 153, 225, 0.2);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    width: auto;
    text-align: center;
    min-height: 40px;
    text-decoration: none;
}

/* Mantenha todos os outros estilos (hover, active, media queries) */
.btn-primary:hover {
    background-color: #3182ce;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(66, 153, 225, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(66, 153, 225, 0.3);
}

/* Responsividade para telas menores */
@media (max-width: 768px) {
    .btn-primary {
        padding: 0.4375rem 1rem;
        font-size: 0.8125rem;
        display: inline-flex;
        margin: 0 auto;
        width: auto;
        min-width: 120px;
        max-width: 200px;
    }
}

@media (max-width: 576px) {
    .btn-primary {
        padding: 0.4375rem 1rem;
        font-size: 0.8125rem;
        width: auto;
        min-width: 140px;
        max-width: 180px;
    }
}


/* Botão PDF - Estilo base */
.btn-outline-danger {
    background-color: transparent;
    color: #e53e3e;
    border: 1.5px solid #e53e3e;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    line-height: 1.4;
    border-radius: 6px;
    transition: all 0.25s ease;
    font-weight: 500;
    letter-spacing: 0.3px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 2px 4px rgba(229, 62, 62, 0.15);
    min-height: 40px;
    text-decoration: none;
}

/* Hover */
.btn-outline-danger:hover {
    background-color: #e53e3e;
    color: white;
    box-shadow: 0 4px 8px rgba(229, 62, 62, 0.3);
    transform: translateY(-1px);
}

/* Active */
.btn-outline-danger:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(229, 62, 62, 0.3);
}

/* Responsivo */
@media (max-width: 768px) {
    .btn-outline-danger {
        display: inline-flex;
        width: auto;
        min-width: 120px;
        max-width: 200px;
        padding: 0.4375rem 1rem;
        font-size: 0.8125rem;
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    .btn-outline-danger {
        width: auto;
        min-width: 140px;
        max-width: 180px;
        font-size: 0.8125rem;
        padding: 0.4375rem 1rem;
    }
}

/* FIM DO CSS DO FORMULÁRIO DE USUÁRIO
=====================================================
=====================================================*/







/*CSS DO TABELA DE PACIENTES
=====================================================
=====================================================*/


/* Estilos para a lista linear de pacientes */
.patient-list-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.patient-search-container {
    margin-bottom: 2rem;
    /* background: #fff; */
    padding: 1.5rem;
    /* border-radius: 10px; */
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); */
}

.patient-search-form {
    display: flex;
    gap: 1rem;
}

.patient-search-input {
    flex-grow: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.patient-search-input:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
    outline: none;
}

.patient-search-btn {
    background-color: #4299e1;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.patient-search-btn:hover {
    background-color: #3182ce;
    transform: translateY(-1px);
}

/* Lista linear de pacientes */
.patient-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.patient-item {
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.patient-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.patient-header {
    background-color: #4299e1;
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0px !important; /* ou 0 se quiser totalmente quadrado */
}

.patient-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    color: white;
}

/* Responsivo para telas menores */
@media (max-width: 576px) {
    .patient-title {
        font-size: 1rem;
        /* Tamanho um pouco menor */
        text-align: center;
        /* Centraliza o texto */
        width: 100%;
        /* Ocupa toda a largura */
    }
}

.patient-id {
    font-size: 0.9rem;
    opacity: 0.9;
}

.patient-body {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    /* gap: 1rem; */
}

.patient-info {
    /* display: flex; */
    align-items: flex-start;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.patient-info i {
    margin-right: 0.7rem;
    color: #2c7be5;
    min-width: 1.2rem;
    text-align: center;
}

.patient-footer {
    /* background: #f8fafc; */
    padding: 1rem 1.5rem;
    border-top: 1px solid #edf2f7;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.patient-btn {
    padding: 0.3125rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    min-height: 32px;
    margin-right: 0.375rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.patient-btn:last-child {
    margin-right: 0;
}

.patient-btn i {
    margin-right: 0.25rem;
    font-size: 0.75rem;
}

.btn-edit {
    background-color: #f6ad55 !important;
    /* laranja claro */
    color: white !important;
    border: none !important;
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-edit:hover {
    background-color: #ed8936 !important;
    color: white !important;
    transform: translateY(-1px);
    text-decoration: none !important;
    border: none !important;
    box-shadow: 0 4px 8px rgba(237, 137, 54, 0.3) !important;
}



.btn-view {
    background-color: #68d391 !important;
    /* verde claro */
    color: white !important;
    border: none !important;
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-view:hover {
    background-color: #56b97d !important;
    color: white !important;
    transform: translateY(-1px);
    text-decoration: none !important;
    border: none !important;
    box-shadow: 0 4px 8px rgba(86, 185, 125, 0.3) !important;
}



.btn-delete {
    background-color: #fc8181;
    color: white;
    border: none;
    text-decoration: none;
    outline: none;
    box-shadow: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-delete:hover {
    background-color: #e76a6a;
    transform: translateY(-1px);
    border: none;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(231, 106, 106, 0.3);
}


/* Estilo para quando não há pacientes */
.no-patients {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: center;
    margin-bottom: 2rem;
}

.no-patients i {
    font-size: 3rem;
    color: #cbd5e0;
    margin-bottom: 1rem;
}

/* Botão de adicionar - versão compacta e elegante */
.add-patient-btn {
    background-color: #4299e1;
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.25s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 1rem;
    height: auto;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    min-height: 40px;
    box-shadow: 0 2px 4px rgba(66, 153, 225, 0.2);
}

.add-patient-btn:hover {
    background-color: #3182ce;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(66, 153, 225, 0.3);
    color: white;
    text-decoration: none;
}

/* Media query para celular - botão de adicionar paciente */
@media (max-width: 640px) {
    .add-patient-btn {
        display: flex;
        justify-content: center;
        width: auto;
        margin-left: auto;
        margin-right: auto;
        padding: 0.4375rem 1rem;
        min-width: 140px;
        max-width: 180px;
    }
}

/* Responsividade para botões de pacientes */
@media (max-width: 768px) {
    .patient-list-container {
        padding: 1rem;
    }

    .patient-body {
        grid-template-columns: 1fr;
    }

    .patient-search-form {
        flex-direction: column;
    }
}

/* Container das evoluções com scroll */
.progress-notes-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
    margin-top: 20px;
}

/* Estilo original dos cards que você gostou - COM CORES */
.progress-notes-list .card {
    border: none;
    border-radius: 4px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Cabeçalho AZUL como no seu original */
.card-header {
    background-color: #007bff !important;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Texto BRANCO como no seu original */
.card-header small {
    color: white !important;
    font-size: 0.85rem;
    display: flex;
    align-items: center;

}

.card-header strong {
    font-weight: 600;
    color: white;
    margin-right: 10px;
}

/* Ícones visíveis (brancos) */
.card-header i {
    color: white;
    font-size: 0.9rem;
}

/* Corpo do card (mantido igual) */
.card-body {
    padding: 1.25rem;
    /* background-color: #fff; */
}

.card-body p {
    margin-bottom: 0;
    color: #4a5568;
    white-space: pre-line;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {

    /* Empilha os elementos do cabeçalho em mobile */
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 0.75rem;
    }

    /* Ajusta o espaçamento entre itens */
    .card-header>div {
        margin-bottom: 0.3rem;
    }

    /* Aumenta um pouco o scroll em mobile */
    .progress-notes-list {
        max-height: 400px;
    }
}

/* Barra de scroll personalizada (sutil) */
.progress-notes-list::-webkit-scrollbar {
    width: 6px;
}

.progress-notes-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.progress-notes-list::-webkit-scrollbar-thumb {
    background: #a0a0a0;
    border-radius: 4px;
}



/* Ajustes para formulário em telas pequenas */
@media (max-width: 768px) {
    .form-card .row {
        flex-direction: column;
        /* Empilha os elementos verticalmente */
        margin-left: 0;
        margin-right: 0;
    }

    .form-card .row>[class*="col-"] {
        width: 100%;
        /* Faz cada coluna ocupar 100% da largura */
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .form-group {
        margin-bottom: 1rem;
        /* Espaçamento consistente entre campos */
    }

    /* Ajuste específico para os botões */
    .d-flex.gap-2 {
        flex-direction: column;
        /* Empilha os botões verticalmente */
        gap: 0.5rem !important;
        /* Espaçamento menor entre botões */
        align-items: center;
        /* Centraliza os botões */
    }

    .d-flex.gap-2 .btn {
        width: auto;
        /* Largura automática ao invés de 100% */
        min-width: 140px;
        max-width: 200px;
        margin: 0 !important;
        /* Remove margens extras */
    }
}

/* Ajustes para o main container */
main {
    width: 100%;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    main {
        padding: 0.75rem !important;
        overflow-x: hidden;
        /* Previne problemas de rolagem horizontal */
    }

    .form-card {
        padding: 1rem !important;
        margin-left: 0;
        margin-right: 0;
        /* width: calc(100% + 1.5rem); */
    }
}

/* Ajustes para o modal em telas pequenas */
@media (max-width: 768px) {
    #addProgressNoteModal .modal-dialog {
        margin: 0.5rem;
    }

    #addProgressNoteModal .modal-content {
        min-height: 100vh;
        border-radius: 0;
    }

    #addProgressNoteModal .modal-footer {
        flex-direction: column;
    }

    #addProgressNoteModal .modal-footer .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    #addProgressNoteModal .modal-footer .btn:last-child {
        margin-bottom: 0;
    }
}

/* Estilo específico para o título de evoluções */
.patient-evolutions-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f3f7;
    text-align: left;
}

/* Responsividade para telas menores */
@media (max-width: 768px) {
    .patient-evolutions-title {
        font-size: 1.25rem;
        text-align: center;
        margin: 1rem 0;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid #e2e8f0;
        /* Borda mais fina em mobile */
    }
}

/* Container principal */
.main-container {
    max-width: 1400px;
    width: 100%;
}

/* Container das colunas */
.equal-columns-container {
    display: flex;
    gap: 20px;
    /* Espaço entre colunas */
}

/* Colunas iguais */
.equal-column {
    flex: 1;
    /* Isso faz com que ambas as colunas tenham o mesmo tamanho */
    min-width: 0;
    /* Permite que as colunas encolham igualmente */
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    .equal-columns-container {
        flex-direction: column;
    }

    .equal-column {
        width: 100%;
    }
}

/* 
.swal-compact {
    max-width: 380px;
    border-radius: 8px;
    padding: 1.2rem;
} */

.swal-html-compact {
    font-size: 0.95rem;
    line-height: 1.4;
}

/*###############################################*/


/* permissions.css - Estilo para a página de gerenciamento de perfis e permissões */
.permissions-container {
    margin: 2rem;
    padding: 2rem;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.permissions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.permissions-title {
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.permissions-list {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-top: 1.5rem;
}

.permission-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

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

.permission-item:hover {
    background-color: #f8fafc;
    transform: translateX(5px);
}

.permission-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.permission-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.permission-users {
    font-size: 0.9rem;
    color: #6c757d;
}

.permission-actions {
    display: flex;
    gap: 1rem;
}

.permission-actions .btn {
    border-radius: 6px;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.25s ease;
    min-width: 140px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-height: 40px;
}

.permission-actions .btn i {
    margin-right: 0.375rem;
    font-size: 0.8125rem;
}

.btn-manage {
    background-color: #4299e1;
    color: white;
    border: none;
}

.btn-manage:hover {
    background-color: #3182ce !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(66, 153, 225, 0.3);
}


/* Efeito de zebrado moderno */
.permission-item:nth-child(even) {
    background-color: #f8f9fa;
}

.permission-item:nth-child(even):hover {
    background-color: #f1f7ff;
}

/* Botão de adicionar novo perfil */
.btn-add-permission {
    background-color: #28a745;
    color: white;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    min-height: 40px;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.btn-add-permission:hover {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
    color: white;
    text-decoration: none;
}

/* Responsividade */
@media (max-width: 992px) {
    .permissions-container {
        padding: 0 1.5rem;
    }

    .permission-item {
        padding: 1.25rem 1.5rem;
    }

    .permission-actions .btn {
        min-width: 120px;
        padding: 0.4375rem 1rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 768px) {
    .permissions-header {
        flex-direction: column;
        align-items: center;
        /* <- centraliza o título */
        text-align: center;
        gap: 1rem;
        margin-bottom: 2rem;
    }


    .permission-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .permission-info {
        width: 100%;
    }

    .permission-actions {
        width: 100%;
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }

    .permission-actions .btn {
        width: auto;
        min-width: 140px;
        max-width: 200px;
        padding: 0.4375rem 1rem;
        font-size: 0.8125rem;
        min-height: 38px;
    }

    .btn-add-permission {
        width: auto;
        min-width: 140px;
        max-width: 200px;
        margin: 0 auto;
        display: flex;
    }

    .permission-name {
        align-items: center !important;
    }
}

@media (max-width: 576px) {
    .permissions-container {
        padding: 0 1rem;
        margin: 1.5rem auto;
    }

    .permissions-title {
        font-size: 1.5rem;
    }

    .permission-item {
        padding: 1.25rem 1rem;
    }
}