body {
    background-color: #f5f7fb;
    overflow-x: hidden;
    /* Apenas esconder overflow horizontal */
    overflow-y: visible;
    /* Permitir overflow vertical para modais */
}

/* Responsividade para anexos em justificativas */
.anexo-actions {
    flex-wrap: nowrap;
    gap: 0.25rem !important;
}

.btn-icon-sm {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    flex-shrink: 0;
}

/* Container dos anexos com overflow controlado */
.anexo-container {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

.anexo-container .d-flex {
    min-width: fit-content;
    flex-wrap: nowrap;
}

/* Ajustes específicos para mobile */
@media (max-width: 576px) {
    .anexo-actions {
        gap: 0.2rem !important;
    }

    .btn-icon-sm {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 0.7rem;
    }

    .btn-icon-sm i {
        font-size: 0.75rem;
    }

    /* Forçar altura consistente para links e botões */
    .anexo-actions .btn-icon-sm {
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
    }

    .anexo-container {
        scrollbar-width: thin;
        scrollbar-color: #dee2e6 transparent;
    }

    .anexo-container::-webkit-scrollbar {
        height: 4px;
    }

    .anexo-container::-webkit-scrollbar-track {
        background: transparent;
    }

    .anexo-container::-webkit-scrollbar-thumb {
        background-color: #dee2e6;
        border-radius: 2px;
    }

    /* Permitir quebra de linha dos botões em telas muito pequenas */
    @media (max-width: 320px) {
        .anexo-actions {
            flex-wrap: wrap !important;
        }
    }

    /* Correções para home do profissional em mobile */
    .home-company-selector-form {
        flex-direction: column;
        gap: .85rem !important;
    }

    .home-company-selector-form .flex-grow-1 {
        width: 100%;
    }

    .home-company-selector-btn {
        width: 100%;
        align-self: stretch !important;
    }

    /* Melhorar cards de resumo para mobile */
    /* Melhorar espaçamento entre cards de resumo */
    /* Melhorar espaçamento dos cards lado a lado */
    /* Melhorar layout das listas com design mais limpo */
    /* Melhorar informações densas em mobile */
    /* Melhorar badges com design mais moderno */
    /* Badges de status específicos */
    .badge.bg-danger {
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    }

    .badge.bg-warning {
        background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    }

    .badge.bg-light {
        font-size: 0.65rem !important;
        padding: 0.3rem 0.55rem !important;
        min-height: 20px !important;
        background: #f8fafc !important;
        color: #64748b !important;
        border: 1px solid #e2e8f0 !important;
    }

    /* Melhorar protocolos e números */
    /* Melhorar separadores visuais com design moderno */
    /* Melhorar visualização de badges em mobile - MELHORADO */
    .badge.bg-light {
        font-size: 0.65rem !important;
        padding: 0.25rem 0.5rem !important;
        min-height: 18px !important;
    }

    /* Ajustar texto pequeno em mobile */
    /* Melhorar botões de responder - CORRIGIDO */
    /* Garantir espaço para botões responder nas listas */
    /* Ajustar seção de financeiro em mobile - MELHORADO */
    .generic .d-flex {
        flex-wrap: wrap !important;
        gap: 0.75rem !important;
        padding: 0.5rem !important;
    }

    /* Melhorar cards de meses */
    .generic[style*="cursor: pointer"] {
        min-width: 70px !important;
        max-width: 85px !important;
        text-align: center !important;
        padding: 0.75rem 0.5rem !important;
        border-radius: 0.5rem !important;
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        transition: all 0.2s ease !important;
    }

    .generic[style*="cursor: pointer"]:hover {
        background: #f1f5f9 !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    }

    .generic[style*="cursor: pointer"] b {
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
        color: #334155 !important;
    }

    .generic[style*="cursor: pointer"] br {
        display: none !important;
    }

    /* Ajustar indicadores de percentual */
    .generic .d-flex .generic:last-child {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.5rem !important;
        border-radius: 0.25rem !important;
        background: #f0f9ff !important;
        color: #0369a1 !important;
        font-weight: 600 !important;
    }

    /* Container financeiro com scroll compacto */
    .generic {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: thin !important;
        scrollbar-color: #cbd5e1 transparent !important;
    }

    .generic::-webkit-scrollbar {
        height: 4px !important;
    }

    .generic::-webkit-scrollbar-track {
        background: #f1f5f9 !important;
        border-radius: 2px !important;
    }

    .generic::-webkit-scrollbar-thumb {
        background-color: #cbd5e1 !important;
        border-radius: 2px !important;
    }

    .generic::-webkit-scrollbar-thumb:hover {
        background-color: #94a3b8 !important;
    }

    /* Melhorar aproveitamento do card financeiro */
    /* Chart financeiro com melhor aproveitamento */
    /* Ajustar altura do container do chart */
    /* Corrigir espaçamento na base do card financeiro - DESKTOP */
    @media (min-width: 577px) {

        /* Forçar card financeiro a ocupar altura total */
        /* Container do conteúdo com flex */
    }

    /* Melhorar espaçamento geral */
    main .generic {
        padding: 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }

    /* Adicionar separadores entre seções */
    /* Melhorar espaçamento do header */
    /* Ajustar específico para o header com tutoriais e data */
    /* Ajustar títulos em mobile */
    /* Melhorar navegação mobile */
    .navbar-brand {
        font-size: 1rem !important;
    }

    /* Ajustar botão de tutoriais */
    /* Melhorias para páginas de listagem em mobile */
    .accordion .btn {
        font-size: 0.9rem !important;
        padding: 0.75rem 1rem !important;
        text-align: left !important;
        justify-content: space-between !important;
    }

    .accordion .btn .badge {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.5rem !important;
    }

    /* Ajustar cards de listagem */
    .list-group-item {
        padding: 0.75rem 1rem !important;
        border-left: 0 !important;
        border-right: 0 !important;
    }

    .list-group-item:first-child {
        border-top-left-radius: 0.5rem !important;
        border-top-right-radius: 0.5rem !important;
    }

    .list-group-item:last-child {
        border-bottom-left-radius: 0.5rem !important;
        border-bottom-right-radius: 0.5rem !important;
    }

    /* Melhorar filtros em mobile */
    .card .card-body .row .col-md-3,
    .card .card-body .row .col-md-6 {
        margin-bottom: 1rem !important;
    }

    .card .card-body .row .col-md-3:last-child,
    .card .card-body .row .col-md-6:last-child {
        margin-bottom: 0 !important;
    }

    /* Ajustar badges de status */
    .badge.bg-secondary,
    .badge.bg-warning,
    .badge.bg-info {
        font-size: 0.65rem !important;
        padding: 0.2rem 0.4rem !important;
    }

    /* Melhorar navegação por breadcrumb em mobile */
    .breadcrumb {
        margin-bottom: 1rem !important;
        padding: 0.5rem 0 !important;
    }

    .breadcrumb .breadcrumb-item {
        font-size: 0.8rem !important;
    }

    /* Ajustar títulos de página */
    .d-flex.justify-content-between.align-items-center {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
    }

    .d-flex.justify-content-between.align-items-center .btn {
        width: 100% !important;
    }

    /* Melhorar cards de estatísticas */
    .d-flex.gap-3 .text-center {
        min-width: 80px !important;
        flex: 1 !important;
    }

    .d-flex.gap-3 .text-center h5 {
        font-size: 1.25rem !important;
        margin-bottom: 0.25rem !important;
    }

    .d-flex.gap-3 .text-center small {
        font-size: 0.7rem !important;
    }

    /* Ajustar conteúdo dentro dos accordions */
    .accordion-collapse .list-group-item {
        border-left: 0 !important;
        border-right: 0 !important;
        font-size: 0.75rem !important;
        padding: 0.25rem 0.5rem !important;
        min-height: auto !important;
    }
}

/* Estilos para botões de ações rápidas */
.action-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1) !important;
}

.action-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2) !important;
    color: #ffffff !important;
}

.action-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.1) !important;
}

.action-btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.2) !important;
    color: #ffffff !important;
}

.action-btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.1) !important;
}

.action-btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.2) !important;
    color: #ffffff !important;
}

.action-btn-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(6, 182, 212, 0.1) !important;
}

.action-btn-info:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(6, 182, 212, 0.2) !important;
    color: #ffffff !important;
}

/* Melhorias para mobile nos botões de ação */
@media (max-width: 576px) {

    .action-btn-primary,
    .action-btn-success,
    .action-btn-warning,
    .action-btn-info {
        min-height: 44px !important;
        font-size: 0.75rem !important;
        padding: 0.5rem 0.75rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 1 !important;
        min-width: 0 !important;
        white-space: nowrap !important;
    }

    .action-btn-primary i,
    .action-btn-success i,
    .action-btn-warning i,
    .action-btn-info i {
        font-size: 0.85rem !important;
        margin-right: 0.25rem !important;
    }

    /* Container dos botões de ações rápidas em mobile */
    .col-12 .d-flex.flex-wrap.gap-2 {
        gap: 0.5rem !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        width: 100% !important;
        align-items: stretch !important;
        align-content: flex-start !important;
    }

    .col-12 .d-flex.flex-wrap.gap-2 .action-btn-primary,
    .col-12 .d-flex.flex-wrap.gap-2 .action-btn-success,
    .col-12 .d-flex.flex-wrap.gap-2 .action-btn-warning,
    .col-12 .d-flex.flex-wrap.gap-2 .action-btn-info {
        flex: 0 0 calc(50% - 0.25rem) !important;
        min-width: calc(50% - 0.25rem) !important;
        max-width: calc(50% - 0.25rem) !important;
        margin: 0 !important;
        align-self: stretch !important;
    }

    /* Garantir que o primeiro botão não tenha margens diferentes */
    .col-12 .d-flex.flex-wrap.gap-2 .action-btn-primary:first-child {
        margin: 0 !important;
        flex: 0 0 calc(50% - 0.25rem) !important;
        min-width: calc(50% - 0.25rem) !important;
        max-width: calc(50% - 0.25rem) !important;
        align-self: stretch !important;
    }

    /* Para telas muito pequenas, manter 2x2 */
    @media (max-width: 320px) {
        .col-12 .d-flex.flex-wrap.gap-2 {
            justify-content: flex-start !important;
            gap: 0.5rem !important;
        }

        .col-12 .d-flex.flex-wrap.gap-2 .action-btn-primary,
        .col-12 .d-flex.flex-wrap.gap-2 .action-btn-success,
        .col-12 .d-flex.flex-wrap.gap-2 .action-btn-warning,
        .col-12 .d-flex.flex-wrap.gap-2 .action-btn-info {
            flex: 0 0 100% !important;
            min-width: 100% !important;
            max-width: 100% !important;
            font-size: 0.7rem !important;
            padding: 0.6rem 0.75rem !important;
        }
    }
}

/* Timer da Sessão */
.session-timer {
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.session-timer:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.session-timer.border-warning {
    border-color: #ffc107 !important;
    background-color: #fffdf7;
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

.session-timer #timerDisplay {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
}

/* Card de informações da unidade */
#cardInfoUnidade {
    border-left: 4px solid var(--bs-primary);
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
}

#cardInfoUnidade .badge {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

#cardInfoUnidade .card-title {
    color: var(--bs-dark);
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

#cardInfoUnidade .text-muted.small {
    font-size: 0.875rem;
    line-height: 1.4;
}

#cardInfoUnidade i {
    width: 16px;
    text-align: center;
}

/* Cards de seleção de unidade */
.unidade-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid #e8eef6;
    background: #ffffff;
}

.unidade-card:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.unidade-card.selected {
    border-color: var(--bs-primary);
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
}

.unidade-card .badge {
    font-size: 0.7rem;
    padding: 0.35rem 0.65rem;
}

.unidade-card .card-title {
    color: #1a2b3c;
    line-height: 1.3;
}

#listaEmpresas .list-group-item {
    border-left: 0;
    border-right: 0;
}

#listaEmpresas .list-group-item-action {
    transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}

#listaEmpresas .list-group-item-action:hover {
    background-color: #eef3ff;
}

#listaEmpresas .list-group-item.active {
    background-color: #e7f1ff;
    border-color: #b6d4fe;
    color: #0b5ed7;
}

/*#listaEmpresas .list-group-item.active small,
#listaEmpresas .list-group-item.active .text-muted {
    color: rgba(11, 94, 215, .75) !important;
}*/

#listaEmpresas .list-group-item.active .badge {
    border: 1px solid rgba(11, 94, 215, .15);
}

#cardDetalheEmpresa .nav-tabs {
    background-color: #fbfcff;
    border-radius: .75rem .75rem 0 0;
    padding: .25rem .5rem 0;
    border: 1px solid #e6edf7;
    border-bottom: 0;
}

#cardDetalheEmpresa .nav-tabs .nav-link {
    color: #6c757d;
    border: 1px solid transparent;
    border-bottom: 1px solid transparent;
    padding: .5rem .75rem;
    border-radius: .65rem .65rem 0 0;
}

#cardDetalheEmpresa .nav-tabs .nav-link:hover {
    color: #0b5ed7;
    background-color: #f3f6ff;
    border-color: rgba(11, 94, 215, .15);
    border-bottom-color: #e6edf7;
}

#cardDetalheEmpresa .nav-tabs .nav-link.active {
    color: #0b5ed7;
    background-color: #ffffff;
    border-color: #e6edf7;
    border-bottom-color: #ffffff;
}

#cardDetalheEmpresa .empresa-tab-pane {
    background-color: #ffffff;
    border: 1px solid #e6edf7;
    border-top: 0;
    border-radius: 0 0 .75rem .75rem;
    padding: 1rem;
}

#cardDetalheEmpresa .empresa-tab-pane .border.rounded-3 {
    border: 0 !important;
    background-color: transparent !important;
}

#cardDetalheEmpresa .empresa-tab-pane .border.rounded-3+.border.rounded-3 {
    border-top: 1px solid #eef3ff !important;
    border-radius: 0 !important;
}

#cardDetalheEmpresa .empresa-tab-pane .table-responsive {
    border-top: 1px solid #eef3ff;
    padding-top: .5rem;
}

#cardDetalheEmpresa .border.rounded-3 {
    border-color: #e6edf7 !important;
    background-color: #ffffff;
}

#cardDetalheEmpresa .table {
    --bs-table-border-color: #e6edf7;
}

#cardDetalheEmpresa .table,
#cardDetalheEmpresa .table th,
#cardDetalheEmpresa .table td {
    font-size: .875rem;
}

#cardDetalheEmpresa .table td {
    color: #212529;
}

#cardDetalheEmpresa .table code {
    color: #0b5ed7;
    background-color: rgba(11, 94, 215, .06);
    padding: .1rem .35rem;
    border-radius: .35rem;
}

#cardDetalheEmpresa .table> :not(caption)>*>* {
    border-color: #e6edf7;
}

#cardDetalheEmpresa .table thead th {
    color: #6c757d;
    font-weight: 600;
    background-color: #fbfcff;
}

#cardDetalheEmpresa .table tbody tr:hover {
    background-color: #fbfdff;
}

#cardDetalheEmpresa .btn-outline-primary,
#cardDetalheEmpresa .btn-outline-secondary {
    background-color: #ffffff;
}

#cardDetalheEmpresa .btn-outline-primary:hover,
#cardDetalheEmpresa .btn-outline-secondary:hover {
    background-color: #f3f6ff;
}

/* ===== Cards de Vagas - Design Moderno ===== */
.vaga-card {
    border: 1px solid #e8eef6;
    border-radius: 1rem;
    background: #ffffff;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.vaga-card-header {
    border-radius: 1rem 1rem 0 0;
}

.vaga-card-footer {
    border-radius: 0 0 1rem 1rem;
}

.vaga-card:hover {
    border-color: #c5d4e8;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.vaga-card.vaga-inativa {
    background: linear-gradient(135deg, #f1f3f5 0%, #e9ecef 100%);
    border-color: #dee2e6;
}

.vaga-card.vaga-inativa .vaga-card-header {
    background: linear-gradient(135deg, #e9ecef 0%, #f1f3f5 100%);
}

.vaga-card.vaga-inativa .vaga-card-title,
.vaga-card.vaga-inativa .vaga-card-subtitle,
.vaga-card.vaga-inativa .vaga-info-value {
    color: #868e96;
}

.vaga-card.vaga-inativa .vaga-card-body,
.vaga-card.vaga-inativa .vaga-card-footer {
    opacity: 0.5;
    pointer-events: none;
}

.vaga-card.vaga-inativa .vaga-action-btn:not(:disabled) {
    pointer-events: auto;
}

.vaga-card.vaga-inativa .vaga-switch {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.vaga-card.vaga-inativa:hover {
    transform: none;
    box-shadow: none;
}

.vaga-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f0f4f8;
    background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
}

.vaga-card-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.vaga-card-title-area {
    min-width: 0;
}

.vaga-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a2b3c;
    margin: 0;
    line-height: 1.4;
}

.vaga-card-subtitle {
    font-size: 0.8rem;
    color: #6b7c93;
    margin-top: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.vaga-card-subtitle a {
    color: #4a7cc9;
    text-decoration: none;
    transition: color 0.15s ease;
}

.vaga-card-subtitle a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.vaga-card-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.vaga-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.vaga-badge-carga {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
}

.vaga-badge-ativo {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.vaga-badge-inativo {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.vaga-card-body {
    padding: 1rem 1.25rem;
    flex: 1;
}

.vaga-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.vaga-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.vaga-info-label {
    font-size: 0.7rem;
    color: #94a3b8;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.vaga-info-value {
    font-size: 0.85rem;
    color: #334155;
    font-weight: 500;
}

/* ===== Resumo de Profissionais no Card de Vaga ===== */
.vaga-prof-section {
    margin-top: 0.875rem;
    padding-top: 0.7rem;
    border-top: 1px dashed #e2e8f0;
}

.vaga-prof-label {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    font-size: 0.67rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.vaga-prof-label-icon {
    color: #6366f1;
    font-size: 0.72rem;
}

.vaga-prof-row {
    display: flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.26rem 0;
    min-width: 0;
}

.vaga-prof-row+.vaga-prof-row {
    border-top: 1px solid #f1f5f9;
}

.vaga-prof-icon {
    font-size: 0.82rem;
    color: #6366f1;
    flex-shrink: 0;
}

.vaga-prof-nome {
    font-size: 0.77rem;
    color: #1e293b;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vaga-prof-crm {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.66rem;
    color: #6366f1;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 0.3rem;
    padding: 0.06rem 0.32rem;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 500;
}

.vaga-prof-exp {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.66rem;
    color: #0369a1;
    background: #e0f2fe;
    border: 1px solid #7dd3fc;
    border-radius: 0.3rem;
    padding: 0.06rem 0.32rem;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 500;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vaga-prof-sem-exp {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.66rem;
    color: #94a3b8;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.3rem;
    padding: 0.06rem 0.32rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.vaga-prof-ciclo {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.66rem;
    color: #16a34a;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 0.3rem;
    padding: 0.06rem 0.32rem;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 500;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vaga-prof-mais {
    font-size: 0.69rem;
    color: #6366f1;
    margin-top: 0.25rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.vaga-card-footer {
    padding: 0.875rem 1.25rem;
    background: #f8fafc;
    border-top: 1px solid #f0f4f8;
}

.vaga-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vaga-metric {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    cursor: pointer;
}

.vaga-metric:hover {
    transform: scale(1.02);
}

.vaga-metric-ocupacao {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}

.vaga-metric-livres {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #bbf7d0;
}

.vaga-metric-livres.sem-vagas {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.vaga-metric-valor {
    background: #fefce8;
    color: #ca8a04;
    border-color: #fef08a;
}

.vaga-metric-medicos {
    background: #f5f3ff;
    color: #7c3aed;
    border-color: #ddd6fe;
}

.vaga-metric-contrato {
    background: #fff7ed;
    color: #ea580c;
    border-color: #fed7aa;
}

.vaga-card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vaga-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    cursor: pointer;
}

.vaga-action-btn:hover {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

.vaga-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vaga-switch {
    position: relative;
}

.vaga-switch .form-check-input {
    width: 2.5rem;
    height: 1.25rem;
    cursor: pointer;
}

.vaga-switch .form-check-input:checked {
    background-color: #22c55e;
    border-color: #22c55e;
}

.vaga-switch .form-check-input:not(:checked) {
    background-color: #94a3b8;
    border-color: #94a3b8;
}

/* Responsivo */
@media (max-width: 767.98px) {
    .vaga-info-grid {
        grid-template-columns: 1fr;
    }

    .vaga-card-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.75rem;
    }

    .vaga-card-badges {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ===== Modal de Médicos na Vaga - Design Moderno ===== */
.medicos-vaga-container {
    padding: 0;
}

.medicos-vaga-section {
    background: #ffffff;
    border: 1px solid #e8eef6;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.medicos-vaga-section.passo-1 {
    border-color: #bfdbfe;
    border-top: 3px solid #3b82f6;
}

.medicos-vaga-section.passo-1 .medicos-vaga-section-header {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

.medicos-vaga-section.passo-2 {
    border-color: #bbf7d0;
    border-top: 3px solid #22c55e;
}

.medicos-vaga-section.passo-2 .medicos-vaga-section-header {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.medicos-vaga-section-header {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid #f0f4f8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.medicos-vaga-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.medicos-vaga-section-title i {
    color: #64748b;
}

.medicos-vaga-section-badge {
    font-size: 0.7rem;
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.medicos-vaga-section-body {
    padding: 1.25rem;
}

/* Lista de médicos disponíveis */
.medicos-lista-container {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid #e8eef6;
    border-radius: 0.75rem;
    background: #fafbfc;
}

.medico-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #f0f4f8;
    background: #ffffff;
    transition: background 0.15s ease;
    cursor: pointer;
}

.medico-item:last-child {
    border-bottom: none;
}

.medico-item:hover {
    background: #f8fafc;
}

.medico-item.selected {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.medico-item-checkbox {
    margin-top: 0.15rem;
}

.medico-item-info {
    flex: 1;
    min-width: 0;
}

.medico-item-nome {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.medico-item-detalhes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #64748b;
}

.medico-item-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    background: #f1f5f9;
    border-radius: 0.375rem;
    font-size: 0.75rem;
}

.medico-item-tag.vinculado {
    background: #fef3c7;
    color: #92400e;
}

.medico-item-tag.novo {
    background: #dcfce7;
    color: #166534;
}

/* Cards de vínculos atuais */
.vinculo-card {
    background: #ffffff;
    border: 1px solid #e8eef6;
    border-radius: 0.875rem;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    transition: all 0.15s ease;
}

.vinculo-card:last-child {
    margin-bottom: 0;
}

.vinculo-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.vinculo-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.vinculo-card-nome {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
}

.vinculo-card-especialidade {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.3rem;
}

.vinculo-card-especialidade .vinculo-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.73rem;
    padding: 0.12rem 0.45rem;
    border-radius: 0.35rem;
    background: #f1f5f9;
    color: #475569;
    white-space: nowrap;
}

.vinculo-card-status {
    padding: 0.3rem 0.65rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.vinculo-card-status.ativo {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
}

.vinculo-card-status.inativo {
    background: #94a3b8;
    color: #ffffff;
}

.vinculo-card-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.vinculo-metric {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.65rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    color: #475569;
}

.vinculo-metric i {
    color: #94a3b8;
}

.vinculo-metric.valor {
    background: #fefce8;
    border-color: #fef08a;
    color: #854d0e;
}

.vinculo-metric.valor i {
    color: #ca8a04;
}

.vinculo-exp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #0369a1;
    background: #e0f2fe;
    border: 1px solid #7dd3fc;
    border-radius: 0.35rem;
    padding: 0.15rem 0.5rem;
    white-space: nowrap;
    font-weight: 500;
}

.vinculo-exp-badge.sem {
    color: #94a3b8;
    background: #f8fafc;
    border-color: #e2e8f0;
    font-weight: 400;
}

.vinculo-exp-badge.ciclo {
    color: #16a34a;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.vinculo-card-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
    justify-content: space-between;
}

.vinculo-card-actions .formRemoverVagaMedico {
    margin-left: auto;
}

.vinculo-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.35rem 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.73rem;
    font-weight: 500;
    border: 1px solid;
    transition: all 0.15s ease;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.vinculo-action-btn.expediente {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
}

.vinculo-action-btn.expediente:hover {
    background: #dbeafe;
}

.vinculo-action-btn.valor {
    background: #fefce8;
    border-color: #fef08a;
    color: #ca8a04;
}

.vinculo-action-btn.valor:hover {
    background: #fef9c3;
}

.vinculo-action-btn.ciclo {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #16a34a;
}

.vinculo-action-btn.ciclo:hover {
    background: #dcfce7;
}

.vinculo-action-btn.atividades {
    background: #f5f3ff;
    border-color: #ddd6fe;
    color: #7c3aed;
}

.vinculo-action-btn.atividades:hover {
    background: #ede9fe;
}

.vinculo-action-btn.remover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.vinculo-action-btn.remover:hover {
    background: #fee2e2;
}

/* ===== Offcanvas de Expediente e Valores - Design Moderno ===== */
.offcanvas-modern {
    width: min(720px, 94vw) !important;
    z-index: 1056 !important;
}

.offcanvas-backdrop {
    z-index: 1056 !important;
}

.offcanvas-modern .offcanvas-header {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid #e8eef6;
    padding: 1.25rem 1.5rem;
}

.offcanvas-modern .offcanvas-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.offcanvas-modern .offcanvas-subtitle {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.offcanvas-modern .offcanvas-body {
    padding: 1.5rem;
    background: #fafbfc;
}

/* Cards dentro do offcanvas */
.offcanvas-card {
    background: #ffffff;
    border: 1px solid #e8eef6;
    border-radius: 0.875rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.offcanvas-card-header {
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid #f0f4f8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.offcanvas-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.offcanvas-card-title i {
    color: #64748b;
}

.offcanvas-card-body {
    padding: 1.25rem;
}

/* Tabela de expediente */
.expediente-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.expediente-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e8eef6;
}

.expediente-table tbody td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
    color: #334155;
}

.expediente-table tbody tr:last-child td {
    border-bottom: none;
}

.expediente-table tbody tr:hover {
    background: #fafbfc;
}

/* Badges de informação */
.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    color: #475569;
}

.info-badge i {
    color: #94a3b8;
}

.info-badge.primary {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
}

.info-badge.primary i {
    color: #3b82f6;
}

.info-badge.success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #16a34a;
}

.info-badge.success i {
    color: #22c55e;
}

.info-badge.warning {
    background: #fefce8;
    border-color: #fef08a;
    color: #ca8a04;
}

.info-badge.warning i {
    color: #eab308;
}

/* Grid de preview de valores */
.valor-preview-modern {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.valor-preview-card {
    background: #f8fafc;
    border: 1px solid #e8eef6;
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    text-align: center;
}

.valor-preview-label {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.35rem;
}

.valor-preview-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
}

.valor-preview-result {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 0.5rem;
}

/* Dias da semana - expediente */
.dias-semana-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dia-semana-check {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.875rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dia-semana-check:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.dia-semana-check input:checked+span {
    color: #2563eb;
    font-weight: 600;
}

.dia-semana-check:has(input:checked) {
    border-color: #3b82f6;
    background: #eff6ff;
}

/* Responsivo para modais */
@media (max-width: 767.98px) {
    .valor-preview-modern {
        grid-template-columns: 1fr;
    }

    .vinculo-card-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .vinculo-card-actions {
        gap: 0.3rem;
    }
}

/* ===== Estilos da Página Inicial - Home ===== */
.hover-lift {
    transition: all 0.2s ease-in-out;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

.bg-opacity-10 {
    --bs-bg-opacity: 0.1;
}

.bg-opacity-25 {
    --bs-bg-opacity: 0.25;
}

/* ===== Navbar compacta no desktop ===== */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .navbar .navbar-nav .nav-link {
        font-size: 0.82rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        white-space: nowrap;
    }

    .navbar .navbar-brand {
        font-size: 0.9rem;
        margin-right: 0.5rem;
    }
}

/* ===== Navbar em telas grandes (≥1200px) ===== */
@media (min-width: 1200px) and (max-width: 1439.98px) {
    .navbar .navbar-nav .nav-link {
        font-size: 0.9rem;
        padding-left: 0.6rem;
        padding-right: 0.6rem;
    }

    .navbar .navbar-brand {
        font-size: 1rem;
    }

    .navbar .dropdown-menu {
        font-size: 0.9rem;
    }
}

/* ===== Navbar em telas extra-grandes (≥1440px) ===== */
@media (min-width: 1440px) {
    .navbar .navbar-nav .nav-link {
        font-size: 0.95rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .navbar .navbar-brand {
        font-size: 1.05rem;
    }

    .navbar .dropdown-menu {
        font-size: 0.95rem;
    }
}

/* ===== Fix para ícones em menus ativos ===== */
/* FORÇA MÁXIMA: Garantir que TODOS os ícones apareçam SEMPRE */

/* Remover classes de cor em items ativos que podem esconder ícones */
.dropdown-menu .dropdown-item.active .text-primary,
.dropdown-menu .dropdown-item.active .text-success,
.dropdown-menu .dropdown-item.active .text-danger,
.dropdown-menu .dropdown-item.active .text-warning,
.dropdown-menu .dropdown-item.active .text-info,
.dropdown-menu .dropdown-item.active .text-secondary {
    color: #ffffff !important;
}

/* Forçar todos os ícones a aparecerem */
.navbar-nav .nav-link i,
.navbar-nav .nav-link .bi,
.dropdown-menu .dropdown-item i,
.dropdown-menu .dropdown-item .bi {
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-block !important;
    font-size: 1em !important;
    width: auto !important;
    height: auto !important;
    margin-right: 0.5rem !important;
    vertical-align: middle !important;
}

/* Ícones em items ATIVOS - BRANCO SEMPRE */
.navbar-nav .nav-link.active i,
.navbar-nav .nav-link.active .bi,
.dropdown-menu .dropdown-item.active i,
.dropdown-menu .dropdown-item.active .bi,
.dropdown-item.active i.bi,
.dropdown-item.active i[class*="bi-"] {
    color: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-block !important;
}

/* Garantir renderização do pseudo-elemento ::before */
.bi::before,
i.bi::before {
    display: inline-block !important;
    font-family: "bootstrap-icons" !important;
    font-style: normal !important;
    font-weight: normal !important;
    font-variant: normal !important;
    text-transform: none !important;
    line-height: 1 !important;
    vertical-align: -0.125em !important;
}

/* Fix específico para navbar dark */
.navbar-dark .dropdown-menu .dropdown-item.active i,
.navbar-dark .dropdown-menu .dropdown-item.active .bi,
[data-bs-theme="dark"] .dropdown-menu .dropdown-item.active i,
[data-bs-theme="dark"] .dropdown-menu .dropdown-item.active .bi {
    color: #ffffff !important;
    opacity: 1 !important;
    filter: none !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Prevenir que qualquer estilo sobrescreva */
.dropdown-item.active>i,
.dropdown-item.active>.bi {
    color: #ffffff !important;
}

/* ===== CORREÇÃO PARA MODAIS ===== */
/* Prevenir flickering sem quebrar interatividade */
.modal-content {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(0, 0, 0, 0.175) !important;
}

.modal .card {
    transform: none !important;
    box-shadow: none !important;
}

.modal .card:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Garantir que modais apareçam sobre tudo */
.modal {
    z-index: 1060 !important;
}

.modal-backdrop {
    z-index: 1055 !important;
}

.modal-dialog {
    z-index: 1061 !important;
}

/* Garantir que dropdowns apareçam sobre tudo */
.dropdown-menu {
    z-index: 1050 !important;
}

/* Dropdowns do navbar - garantir posicionamento correto */
.navbar .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    margin-top: 0.125rem !important;
    transform: none !important;
    will-change: transform !important;
}

/* Prevenir corte de conteúdo em dropdowns */
.dropdown-menu {
    overflow: visible !important;
    max-height: none !important;
}

/* Container principal não deve limitar altura de modais */
main {
    overflow: visible !important;
}

.container-fluid {
    overflow: visible !important;
}

/* Garantir que cards com tabelas não tenham altura limitada */
.card .table-responsive {
    overflow-x: auto !important;
    overflow-y: visible !important;
    max-height: none !important;
}

/* Garantir que card body não limite conteúdo */
.card-body {
    overflow: visible !important;
    max-height: none !important;
}

/* Tabelas dentro de cards devem ser totalmente visíveis */
.card .table {
    margin-bottom: 0 !important;
}

/* Login container adjustments */
.container-sm {
    padding: 1rem !important;
    max-width: 100% !important;
}

/* Login card adjustments */
.container-sm>div {
    padding: 1.5rem !important;
    margin: 0.5rem 0;
    border-radius: 1rem !important;
}

/* Form inputs for better touch targets */
.form-control-lg {
    font-size: 16px !important;
    /* Prevents zoom on iOS */
    padding: 0.75rem 1rem !important;
    min-height: 48px !important;
    /* WCAG touch target size */
}

/* Input group for password field */
.input-group-lg .form-control {
    font-size: 16px !important;
    padding: 0.75rem 1rem !important;
    min-height: 48px !important;
}

.input-group-lg .btn {
    min-height: 48px !important;
    padding: 0.75rem 1rem !important;
}

/* Submit button improvements */
.btn-lg {
    font-size: 1.1rem !important;
    padding: 0.875rem 1.5rem !important;
    min-height: 52px !important;
    font-weight: 600 !important;
}

/* Labels styling */
.form-label {
    font-size: 0.9rem !important;
    margin-bottom: 0.5rem !important;
}

/* Title adjustments */
h2 {
    font-size: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

/* Better spacing for touch */
.mb-3 {
    margin-bottom: 1rem !important;
}

/* Ensure proper viewport handling */
body {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* ===== CORREÇÃO PARA POPOVERS DE MARCADORES ===== */
/* Garantir que popovers de marcadores apareçam sobre tudo */
.marcador-popover-wrap {
    position: relative !important;
}

.marcacao-popover-panel {
    background: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 0.375rem !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* A lista interna precisa rolar sem invadir o rodapé do popover. */
.marcacao-popover-panel .label-list {
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

/* Garantir que popovers não sejam cortados por containers */
.marcador-popover-wrap .marcacao-popover-panel {
    overflow: visible !important;
}

/* Impedir que containers pai cortem o popover */
.list-group-item {
    overflow: visible !important;
}

.card-body {
    overflow: visible !important;
}

.list-group {
    overflow: visible !important;
}

/* ===== Mobile Improvements for Login Page ===== */
@media (max-width: 767.98px) {

    /* Home page cards improvements */
    .home-stats-card {
        margin-bottom: 1rem !important;
    }

    .home-company-selector-form {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .home-company-selector-form>.flex-grow-1 {
        width: 100%;
    }

    .home-company-selector-form .btn {
        width: 100%;
        justify-content: center;
    }

    .home-stats-card .card-body {
        padding: 1rem !important;
        min-height: 80px !important;
    }

    .home-stats-card .h2 {
        font-size: 1.75rem !important;
        font-weight: 700 !important;
    }

    .home-stats-card .fs-4 {
        font-size: 1.25rem !important;
    }

    /* Quick actions cards */
    .quick-action-card {
        margin-bottom: 1rem !important;
    }

    .quick-action-card .card-body {
        padding: 1rem !important;
        min-height: 90px !important;
    }

    .quick-action-card .fs-2 {
        font-size: 1.5rem !important;
    }

    .quick-action-card .h6 {
        font-size: 0.95rem !important;
        font-weight: 600 !important;
    }

    .quick-action-card .small {
        font-size: 0.75rem !important;
        line-height: 1.3 !important;
    }

    /* Action buttons */
    .home-action-btn {
        padding: 0.875rem 1rem !important;
        font-size: 0.9rem !important;
        min-height: 48px !important;
        font-weight: 600 !important;
    }

    .home-action-btn i {
        font-size: 1rem !important;
    }

    /* Welcome section */
    .welcome-section h1 {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    .welcome-section p {
        font-size: 0.9rem !important;
    }

    .date-display {
        font-size: 0.8rem !important;
    }
}

@media (max-width: 575.98px) {

    /* Extra small mobile optimizations */
    .home-stats-card .card-body {
        padding: 0.875rem !important;
        min-height: 70px !important;
    }

    .home-stats-card .h2 {
        font-size: 1.5rem !important;
    }

    .quick-action-card .card-body {
        padding: 0.875rem !important;
        min-height: 80px !important;
    }

    .quick-action-card .fs-2 {
        font-size: 1.25rem !important;
    }

    .quick-action-card .h6 {
        font-size: 0.875rem !important;
    }

    .quick-action-card .small {
        font-size: 0.7rem !important;
    }

    .home-action-btn {
        padding: 0.75rem 0.875rem !important;
        font-size: 0.85rem !important;
    }

    .welcome-section h1 {
        font-size: 1.25rem !important;
    }
}

/* ===== Gestão Pages Mobile Optimizations ===== */
@media (max-width: 767.98px) {

    /* Usuarios page optimizations */
    .usuarios-sidebar {
        margin-bottom: 1rem !important;
    }

    .usuarios-header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .usuarios-header-actions .btn {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 0;
    }

    .usuarios-filtros-ativos {
        align-items: flex-start !important;
    }

    .usuarios-filtros-ativos .badge,
    .usuarios-filtros-ativos a.badge {
        white-space: normal;
        text-align: left;
        line-height: 1.2;
    }

    .usuarios-sidebar .card {
        margin-bottom: 0.75rem !important;
    }

    .usuarios-sidebar .card-header {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.875rem !important;
    }

    .usuarios-sidebar .list-group-item {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.875rem !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
    }

    .usuarios-sidebar .badge {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.5rem !important;
    }

    .usuarios-list {
        max-height: 250px !important;
    }

    .usuarios-list .list-group-item {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8rem !important;
        min-height: 44px !important;
    }

    .usuarios-form {
        padding: 1rem !important;
    }

    .usuarios-form .form-label {
        font-size: 0.875rem !important;
        margin-bottom: 0.5rem !important;
    }

    .usuarios-form .form-control,
    .usuarios-form .form-select {
        font-size: 16px !important;
        /* Prevents zoom on iOS */
        min-height: 48px !important;
        padding: 0.75rem !important;
    }

    .usuarios-form .btn {
        min-height: 48px !important;
        font-weight: 600 !important;
    }

    .usuarios-form-actions {
        flex-direction: column;
        align-items: stretch !important;
    }

    .usuarios-form-actions .btn,
    .usuarios-form-actions a.btn {
        width: 100%;
        margin-left: 0 !important;
    }

    .usuarios-vaga-topo {
        flex-direction: column;
        gap: 0.5rem;
    }

    .usuarios-vaga-trilha {
        width: 100%;
        word-break: break-word;
    }

    .usuarios-vinculos-empresas>div {
        width: 100%;
        justify-content: space-between;
    }

    /* Form rows optimization */
    .usuarios-form .row.g-3>[class*="col-"] {
        margin-bottom: 0.75rem !important;
    }

    /* Input groups */
    .usuarios-form .input-group .form-control {
        border-top-right-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }

    .usuarios-form .input-group .btn {
        border-top-left-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
    }
}

@media (max-width: 575.98px) {

    /* Extra small mobile optimizations */
    .usuarios-header-actions .btn {
        flex: 1 1 100%;
    }

    .usuarios-sidebar .card-header {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.6rem !important;
    }

    .usuarios-sidebar .list-group-item {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.8rem !important;
    }

    .usuarios-list {
        max-height: 200px !important;
    }

    .usuarios-list .list-group-item {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.75rem !important;
    }

    .usuarios-form {
        padding: 0.75rem !important;
    }

    .usuarios-form .form-label {
        font-size: 0.8rem !important;
    }

    .usuarios-form .form-control,
    .usuarios-form .form-select {
        padding: 0.625rem !important;
        min-height: 44px !important;
    }

    .usuarios-form .btn {
        min-height: 44px !important;
        font-size: 0.875rem !important;
    }
}

/* ===== Global Touch Targets Optimization (44px minimum) ===== */
@media (max-width: 767.98px) {

    /* Ensure interactive elements meet WCAG touch target guidance */
    .btn,
    button,
    input[type="button"],
    input[type="submit"],
    .form-control,
    .form-select,
    .nav-link,
    .dropdown-item,
    .pagination .page-link,
    .btn-group .btn,
    .input-group .btn,
    .table .btn,
    .modal .btn,
    .offcanvas .btn {
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0.75rem 1rem !important;
        font-weight: 600 !important;
    }

    .nav-link,
    .dropdown-item {
        justify-content: flex-start !important;
    }

    a.btn,
    a[class*="btn"],
    .btn-link {
        min-height: 44px !important;
        padding: 0.75rem 1rem !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .table .btn-sm {
        min-height: 40px !important;
        padding: 0.5rem 0.75rem !important;
        font-size: 0.875rem !important;
    }

    .table .action-buttons .btn {
        min-height: 36px !important;
        padding: 0.5rem !important;
        margin: 0.25rem !important;
    }

    .form-control-sm,
    .form-select-sm {
        min-height: 44px !important;
        padding: 0.75rem !important;
        font-size: 16px !important;
    }

    .input-group-sm .form-control,
    .input-group-sm .btn {
        min-height: 44px !important;
        padding: 0.75rem !important;
    }

    .navbar-nav .nav-link {
        min-height: 44px !important;
        padding: 0.75rem 1rem !important;
    }

    .dropdown-menu .dropdown-item {
        min-height: 44px !important;
        padding: 0.75rem 1rem !important;
    }

    .pagination .page-link {
        min-height: 44px !important;
        min-width: 44px !important;
        padding: 0.75rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .nav-tabs .nav-link,
    .nav-pills .nav-link {
        min-height: 44px !important;
        padding: 0.75rem 1rem !important;
        display: flex !important;
        align-items: center !important;
    }

    .badge[class*="btn-"] {
        min-height: 44px !important;
        min-width: 44px !important;
        padding: 0.75rem !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .touch-target {
        min-height: 44px !important;
        min-width: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .btn[class*="btn-outline"]:only-child,
    .btn[class*="btn-"]:only-child {
        min-width: 44px !important;
        min-height: 44px !important;
    }

    .btn-xs {
        min-height: 36px !important;
        padding: 0.5rem !important;
        font-size: 0.75rem !important;
    }

    .btn+.btn,
    .btn+.dropdown-toggle,
    .input-group .btn+.btn {
        margin-left: 0.5rem !important;
    }
}

@media (max-width: 575.98px) {

    .btn-sm {
        min-height: 40px !important;
        padding: 0.625rem 0.875rem !important;
        font-size: 0.875rem !important;
    }

    .btn-xs {
        min-height: 32px !important;
        padding: 0.375rem 0.5rem !important;
        font-size: 0.75rem !important;
    }

    .form-control-sm,
    .form-select-sm {
        min-height: 40px !important;
        padding: 0.625rem !important;
    }
}

/* ===== Mobile Navigation Improvements ===== */
@media (max-width: 767.98px) {

    /* Navbar mobile optimizations */
    .navbar {
        padding: 0.5rem 1rem !important;
        min-height: 60px !important;
    }

    .navbar-brand {
        font-size: 1rem !important;
        padding: 0.5rem 0 !important;
        flex-wrap: nowrap !important;
        gap: 0.5rem !important;
    }

    .navbar-brand img {
        height: 24px !important;
    }

    .navbar-brand .badge {
        font-size: 0.65rem !important;
        padding: 0.25rem 0.5rem !important;
        display: none !important;
        /* Hide badge on mobile */
    }

    /* Improved hamburger button */
    .navbar-toggler {
        border: none !important;
        padding: 0.5rem !important;
        min-height: 44px !important;
        min-width: 44px !important;
        border-radius: 0.5rem !important;
        background: rgba(255, 255, 255, 0.1) !important;
        transition: all 0.3s ease !important;
    }

    .navbar-toggler:hover {
        background: rgba(255, 255, 255, 0.2) !important;
        transform: scale(1.05) !important;
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25) !important;
    }

    .navbar-toggler-icon {
        width: 24px !important;
        height: 24px !important;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    }

    /* Mobile menu container */
    .navbar-collapse {
        background: rgba(33, 37, 41, 0.98) !important;
        backdrop-filter: blur(10px) !important;
        border-radius: 0 0 1rem 1rem !important;
        margin: 0 -1rem !important;
        padding: 1rem !important;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    }

    /* Mobile navigation items */
    .navbar-nav {
        gap: 0.25rem !important;
    }

    .navbar-nav .nav-link {
        padding: 0.875rem 1rem !important;
        border-radius: 0.5rem !important;
        transition: all 0.2s ease !important;
        margin-bottom: 0.25rem !important;
        font-weight: 500 !important;
        display: flex !important;
        align-items: center !important;
        min-height: 48px !important;
    }

    .navbar-nav .nav-link:hover {
        background: rgba(255, 255, 255, 0.1) !important;
        transform: translateX(4px) !important;
    }

    .navbar-nav .nav-link.active {
        background: rgba(255, 255, 255, 0.15) !important;
        color: #fff !important;
        font-weight: 600 !important;
    }

    .navbar-nav .nav-link i {
        font-size: 1.1rem !important;
        width: 20px !important;
        text-align: center !important;
    }

    /* Mobile dropdown menus */
    .navbar-nav .dropdown-menu {
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        border-radius: 0.5rem !important;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
        margin: 0.25rem 0 !important;
        padding: 0.5rem !important;
    }

    .navbar-nav .dropdown-item {
        padding: 0.75rem 1rem !important;
        border-radius: 0.375rem !important;
        transition: all 0.2s ease !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        font-weight: 500 !important;
        color: #212529 !important;
    }

    .navbar-nav .dropdown-item:hover {
        background: rgba(13, 110, 253, 0.1) !important;
        color: #0d6efd !important;
        transform: translateX(2px) !important;
    }

    .navbar-nav .dropdown-item.active {
        background: rgba(13, 110, 253, 0.15) !important;
        color: #0d6efd !important;
        font-weight: 600 !important;
    }

    .navbar-nav .dropdown-item i {
        font-size: 1rem !important;
        width: 18px !important;
        text-align: center !important;
        margin-right: 0.75rem !important;
    }

    .navbar-nav .dropdown-header {
        padding: 0.5rem 1rem !important;
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        color: #6c757d !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
        margin-bottom: 0.5rem !important;
    }

    /* User menu in mobile */
    .navbar-nav .dropdown-menu.show {
        animation: slideDown 0.3s ease !important;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Mobile specific adjustments */
    .navbar-dark .navbar-nav .nav-link {
        color: rgba(255, 255, 255, 0.9) !important;
    }

    .navbar-dark .navbar-nav .nav-link:hover,
    .navbar-dark .navbar-nav .nav-link:focus {
        color: #fff !important;
    }

    .navbar-dark .navbar-nav .nav-link.active {
        color: #fff !important;
    }

    /* Improved spacing for touch */
    .navbar-nav .nav-item {
        margin-bottom: 0.125rem !important;
    }

    /* Mobile dropdown toggle improvements */
    .navbar-nav .dropdown-toggle {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        min-height: 48px !important;
    }

    .navbar-nav .dropdown-toggle::after {
        margin-left: auto !important;
        transition: transform 0.3s ease !important;
    }

    .navbar-nav .dropdown-toggle[aria-expanded="true"]::after {
        transform: rotate(180deg) !important;
    }
}

@media (max-width: 575.98px) {

    /* Extra small mobile adjustments */
    .navbar {
        padding: 0.375rem 0.75rem !important;
        min-height: 56px !important;
    }

    .navbar-brand {
        font-size: 0.9rem !important;
        gap: 0.375rem !important;
    }

    .navbar-brand img {
        height: 20px !important;
    }

    .navbar-toggler {
        padding: 0.375rem !important;
        min-height: 40px !important;
        min-width: 40px !important;
    }

    .navbar-collapse {
        margin: 0 -0.75rem !important;
        padding: 0.75rem !important;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 0.875rem !important;
        font-size: 0.9rem !important;
        min-height: 44px !important;
    }

    .navbar-nav .dropdown-item {
        padding: 0.625rem 0.875rem !important;
        font-size: 0.875rem !important;
        min-height: 40px !important;
    }

    .navbar-nav .dropdown-header {
        padding: 0.375rem 0.875rem !important;
        font-size: 0.75rem !important;
    }
}

/* ===== Loading States and Visual Feedback ===== */
/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

.loading-spinner-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.loading-spinner-lg {
    width: 32px;
    height: 32px;
    border-width: 4px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Button loading states */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn-loading .btn-text {
    opacity: 0;
}

/* Form loading states */
.form-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.form-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.form-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

/* Card loading states */
.card-loading {
    position: relative;
    overflow: hidden;
}

.card-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
    z-index: 1;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-text-sm {
    height: 0.75rem;
    width: 60%;
}

.skeleton-text-lg {
    height: 1.5rem;
    width: 80%;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-card {
    height: 200px;
    border-radius: 8px;
}

/* Progress indicators */
.progress-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #28a745, #17a2b8, #ffc107, #dc3545, #007bff);
    background-size: 200% 100%;
    animation: progress 2s linear infinite;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.progress-indicator.active {
    opacity: 1;
}

@keyframes progress {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 200% 0%;
    }
}

/* Success feedback */
.success-feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 9999;
    animation: slideInRight 0.3s ease;
}

.success-feedback i {
    font-size: 1.25rem;
}

/* Error feedback */
.error-feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #dc3545;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 9999;
    animation: slideInRight 0.3s ease;
}

.error-feedback i {
    font-size: 1.25rem;
}

/* Warning feedback */
.warning-feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ffc107;
    color: #212529;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 9999;
    animation: slideInRight 0.3s ease;
}

.warning-feedback i {
    font-size: 1.25rem;
}

/* Info feedback */
.info-feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #17a2b8;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 9999;
    animation: slideInRight 0.3s ease;
}

.info-feedback i {
    font-size: 1.25rem;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Hover effects */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hover-scale {
    transition: transform 0.2s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: box-shadow 0.2s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.5);
}

/* Focus states */
.focus-ring {
    transition: box-shadow 0.2s ease;
}

.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* Mobile optimizations for feedback */
@media (max-width: 767.98px) {

    .success-feedback,
    .error-feedback,
    .warning-feedback,
    .info-feedback {
        top: 10px;
        right: 10px;
        left: 10px;
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }

    .success-feedback i,
    .error-feedback i,
    .warning-feedback i,
    .info-feedback i {
        font-size: 1rem;
    }

    .progress-indicator {
        height: 4px;
    }

    .btn-loading::before {
        width: 16px;
        height: 16px;
        margin: -8px 0 0 -8px;
    }

    .form-loading::before {
        width: 24px;
        height: 24px;
        margin: -12px 0 0 -12px;
    }
}

@media (max-width: 575.98px) {

    .success-feedback,
    .error-feedback,
    .warning-feedback,
    .info-feedback {
        top: 5px;
        right: 5px;
        left: 5px;
        padding: 0.75rem 0.875rem;
        font-size: 0.875rem;
    }

    .success-feedback i,
    .error-feedback i,
    .warning-feedback i,
    .info-feedback i {
        font-size: 0.875rem;
    }
}

/* ===== Smooth Animations and Transitions ===== */
/* Page transitions */
.page-transition {
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button animations */
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
    transform: translateY(-1px);
}

.btn-success {
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
    transform: translateY(-1px);
}

.btn-danger {
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
    transform: translateY(-1px);
}

.btn-warning {
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.4);
    transform: translateY(-1px);
}

.btn-info {
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}

.btn-info:hover {
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.4);
    transform: translateY(-1px);
}

/* Form animations */
.form-control,
.form-select {
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.form-label {
    transition: color 0.2s ease;
}

.form-control:focus+.form-label,
.form-select:focus+.form-label {
    color: #007bff;
}

/* Table animations */
.table {
    transition: opacity 0.3s ease;
}

.table tbody tr {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
    transform: translateX(2px);
}

/* Modal animations */
.modal {
    transition: opacity 0.3s ease;
}

.modal-dialog {
    transition: transform 0.3s ease;
    transform: scale(0.9);
    opacity: 0;
}

.modal.show .modal-dialog {
    transform: scale(1);
    opacity: 1;
}

/* ===== MODAL DE CROP — DESKTOP ===== */
.modal-crop-body {
    max-height: 70vh;
    overflow: hidden;
}

/* ===== MODAL DE CROP — MOBILE ===== */
@media (max-width: 576px) {

    /* Dialog: ocupa a tela visível real (dvh para iOS Safari/Chrome) */
    #modalCrop .modal-dialog,
    #modalCropDoc .modal-dialog {
        margin: 0 !important;
        padding: 0.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        display: flex !important;
        flex-direction: column !important;
    }

    #modalCrop .modal-content,
    #modalCropDoc .modal-content {
        flex: 1 !important;
        max-height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    #modalCrop .modal-header,
    #modalCropDoc .modal-header {
        flex-shrink: 0 !important;
    }

    /* Body: ocupa o espaço restante, sem empurrar footer */
    #modalCrop .modal-crop-body,
    #modalCropDoc .modal-crop-body {
        flex: 1 1 0% !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow: hidden !important;
    }

    /* Footer: nunca sai da tela */
    #modalCrop .modal-footer,
    #modalCropDoc .modal-footer {
        flex-shrink: 0 !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
        padding: 0.5rem 0.75rem !important;
    }

    #modalCrop .modal-footer>div,
    #modalCropDoc .modal-footer>div {
        display: flex;
        gap: 0.5rem;
        width: 100%;
        justify-content: center;
        margin-left: 0 !important;
    }

    #modalCrop .modal-footer .btn,
    #modalCropDoc .modal-footer .btn {
        flex: 1;
        min-width: 0;
    }
}

/* Dropdown animations */
.dropdown-menu {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.dropdown-menu.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Fix: inside collapsed navbar on mobile, dropdowns render inline without .show animation */
@media (max-width: 991.98px) {
    .navbar-nav .dropdown-menu {
        opacity: 1;
        transform: none;
        pointer-events: auto;
        transition: none;
    }
}

/* Tab animations */
.nav-tabs .nav-link {
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    transform: translateY(-2px);
}

/* Badge animations */
.badge {
    transition: transform 0.2s ease;
}

.badge:hover {
    transform: scale(1.1);
}

/* Alert animations */
.alert {
    transition: all 0.3s ease;
    animation: slideInDown 0.3s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progress bar animations */
.progress-bar {
    transition: width 0.6s ease;
}

/* Tooltip animations */
.tooltip {
    transition: opacity 0.2s ease;
}

/* Pagination animations */
.pagination .page-link {
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* List group animations */
.list-group-item {
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Accordion animations */
.accordion-button {
    transition: all 0.3s ease;
}

.accordion-button:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.accordion-collapse {
    transition: height 0.3s ease;
}

/* Navbar animations */
.navbar {
    transition: all 0.3s ease;
}

.navbar-brand {
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

/* Footer animations */
footer {
    transition: all 0.3s ease;
}

/* Scroll animations */
.fade-in {
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.bounce-in {
    animation: bounceIn 0.8s ease;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

/* Pulse animation for important elements */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

/* Shake animation for errors */
.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

/* Mobile-specific animation optimizations */
@media (max-width: 767.98px) {

    /* Reduce animation duration for better performance on mobile */
    * {
        transition-duration: 0.15s !important;
    }

    .card {
        transition-duration: 0.2s !important;
    }

    .btn {
        transition-duration: 0.2s !important;
    }

    .form-control,
    .form-select {
        transition-duration: 0.2s !important;
    }

    /* Disable hover animations on touch devices */
    @media (hover: none) {
        .card:hover {
            transform: none;
        }

        .btn:hover {
            transform: none;
        }

        .table tbody tr:hover {
            transform: none;
        }

        .list-group-item:hover {
            transform: none;
        }
    }
}

@media (max-width: 575.98px) {

    /* Further reduce animations for very small screens */
    * {
        transition-duration: 0.1s !important;
    }

    /* Disable non-essential animations */
    .btn::before {
        display: none;
    }

    .navbar-brand:hover {
        transform: none;
    }

    .badge:hover {
        transform: none;
    }
}

/* ===== Breadcrumb Centralizado - Design Moderno ===== */
.sys-breadcrumb-wrapper {
    padding: 0.625rem 0;
    margin-bottom: 0.25rem;
}

.sys-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0;
}

.sys-breadcrumb-item {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #94a3b8;
}

.sys-breadcrumb-item+.sys-breadcrumb-item::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-right: 1.5px solid #cbd5e1;
    border-bottom: 1.5px solid #cbd5e1;
    transform: rotate(-45deg);
    margin: 0 0.55rem;
    flex-shrink: 0;
}

.sys-breadcrumb-item a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #64748b;
    text-decoration: none;
    padding: 0.15rem 0.35rem;
    border-radius: 0.35rem;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.sys-breadcrumb-item a:hover {
    color: #2563eb;
    background-color: #eff6ff;
}

.sys-breadcrumb-item a .bi {
    font-size: 0.82rem;
    flex-shrink: 0;
}

.sys-breadcrumb-item.active {
    color: #334155;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.sys-breadcrumb-item.active .bi {
    font-size: 0.82rem;
    color: #64748b;
    flex-shrink: 0;
}

@media (max-width: 767.98px) {
    .sys-breadcrumb-wrapper {
        padding: 0.5rem 0;
    }

    .sys-breadcrumb-item {
        font-size: 0.75rem;
    }

    .sys-breadcrumb-item+.sys-breadcrumb-item::before {
        margin: 0 0.35rem;
    }
}

/* Botões de tipo de ocorrência - altura e largura uniforme */
.btn-tipo.btn-tipo {
    min-height: 74px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    margin-left: 0 !important;
}

.btn-tipo.btn-tipo i {
    flex-shrink: 0;
}

.btn-tipo.btn-tipo span {
    text-align: left;
}

/* Dropdown de profissionais (filtro justificativas/listar) */
#listaProfissionais .dropdown-item.active,
#listaProfissionais .dropdown-item:active {
    background-color: #0d6efd !important;
    color: #fff !important;
}

#listaProfissionais .dropdown-item:hover:not(.active) {
    background-color: #e9ecef;
}

/* ===== Design System: Home Dashboard ===== */
:root {
    --sj-bg-canvas: #eef4fb;
    --sj-bg-canvas-soft: #f7fafe;
    --sj-surface: #ffffff;
    --sj-surface-soft: rgba(255, 255, 255, 0.78);
    --sj-border: rgba(148, 163, 184, 0.22);
    --sj-border-strong: rgba(100, 116, 139, 0.24);
    --sj-text-strong: #0f172a;
    --sj-text-muted: #475569;
    --sj-text-soft: #64748b;
    --sj-shadow-sm: 0 16px 34px rgba(15, 23, 42, 0.06);
    --sj-shadow-md: 0 22px 48px rgba(15, 23, 42, 0.1);
    --sj-shadow-lg: 0 28px 56px rgba(15, 23, 42, 0.14);
    --sj-radius-lg: 26px;
    --sj-radius-md: 20px;
    --sj-radius-sm: 16px;
    --sj-primary: #2563eb;
    --sj-primary-soft: rgba(37, 99, 235, 0.12);
    --sj-warning: #d97706;
    --sj-warning-soft: rgba(245, 158, 11, 0.14);
    --sj-info: #0891b2;
    --sj-info-soft: rgba(6, 182, 212, 0.14);
    --sj-success: #059669;
    --sj-success-soft: rgba(16, 185, 129, 0.14);
    --sj-danger: #dc2626;
    --sj-danger-soft: rgba(239, 68, 68, 0.14);
    --sj-violet: #7c3aed;
    --sj-violet-soft: rgba(124, 58, 237, 0.14);
    --sj-neutral: #64748b;
    --sj-neutral-soft: rgba(148, 163, 184, 0.16);
}

body {
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.09), transparent 28rem),
        radial-gradient(circle at top right, rgba(6, 182, 212, 0.08), transparent 22rem),
        linear-gradient(180deg, var(--sj-bg-canvas-soft) 0%, var(--sj-bg-canvas) 100%);
    color: var(--sj-text-strong);
}

.sj-home-shell {
    position: relative;
    padding-bottom: 1rem;
}

.sj-home-shell::before {
    content: none;
}

.sj-home-shell>* {
    position: relative;
    z-index: 1;
}

.sj-home-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(1.2rem, 2vw, 1.55rem) !important;
    border-radius: var(--sj-radius-lg);
    border: 1px solid rgba(191, 219, 254, 0.8);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.8) 62%, rgba(219, 234, 254, 0.8) 100%);
    box-shadow: var(--sj-shadow-md);
    backdrop-filter: blur(12px);
}

.sj-home-hero::before,
.sj-home-hero::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.sj-home-hero::before {
    width: 14rem;
    height: 14rem;
    top: -8rem;
    right: -4rem;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.18), transparent 66%);
}

.sj-home-hero::after {
    width: 12rem;
    height: 12rem;
    left: -5rem;
    bottom: -7rem;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.16), transparent 66%);
}

.welcome-section__row {
    margin-bottom: 0 !important;
}

.welcome-section__column {
    margin-bottom: 0.9rem !important;
}

.welcome-section--home {
    gap: 0.9rem !important;
}

.welcome-section--home .welcome-section__copy {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-width: 42rem;
}

.welcome-section--home .welcome-section__title {
    position: relative;
    z-index: 1;
    margin-bottom: 0 !important;
    font-size: clamp(2rem, 2.4vw, 2.45rem);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.welcome-section--home .welcome-section__subtitle {
    color: var(--sj-text-soft) !important;
    font-size: 1rem;
}

.welcome-section--home .welcome-section__contract-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.5rem 0.78rem !important;
    border-radius: 999px !important;
    font-size: 0.84rem !important;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.38), 0 14px 30px rgba(37, 99, 235, 0.08);
}

.welcome-section--home .welcome-section__contract-label {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
}

.welcome-section--home .welcome-section__meta {
    position: relative;
    z-index: 1;
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.welcome-section--home .welcome-section__aside {
    align-items: center !important;
    justify-content: flex-end;
    gap: 0.6rem !important;
    max-width: none !important;
}

.welcome-section--home .welcome-section__meta-row {
    display: flex;
    flex-wrap: wrap;
}

.welcome-section--home .welcome-section__meta-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.85rem;
    padding: 0 1rem;
    border-radius: 999px;
    border: 1px solid rgba(191, 219, 254, 0.85);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 12px 24px rgba(15, 23, 42, 0.06);
    color: var(--sj-text-muted);
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.welcome-section--home .welcome-section__meta-chip i {
    font-size: 0.9rem;
    line-height: 1;
}

.welcome-section--home .welcome-section__meta-chip span {
    line-height: 1.1;
}

.welcome-section--home .welcome-section__meta-chip--action {
    color: var(--sj-primary) !important;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.welcome-section--home .welcome-section__meta-chip--action:hover,
.welcome-section--home .welcome-section__meta-chip--action:focus,
.welcome-section--home .welcome-section__meta-chip--action:active {
    color: #1d4ed8 !important;
    border-color: rgba(96, 165, 250, 0.9) !important;
    background: rgba(219, 234, 254, 0.92) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 14px 26px rgba(37, 99, 235, 0.14);
    transform: translateY(-1px);
}

.welcome-section--home .welcome-section__meta-chip--action:focus {
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 14px 26px rgba(37, 99, 235, 0.14);
}

.welcome-section--home .welcome-section__meta-chip--neutral {
    color: var(--sj-text-muted) !important;
}

.welcome-section--home .welcome-section__meta-note {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 1.5rem;
}

.welcome-section--home .welcome-section__meta-note-content {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--sj-text-muted);
    font-size: 0.84rem;
    line-height: 1.2;
    white-space: nowrap;
}

.welcome-section--home .welcome-section__meta-note-content i {
    font-size: 0.82rem;
    opacity: 0.9;
}

.sj-home-filter-card {
    border-radius: var(--sj-radius-lg);
    border: 1px solid rgba(191, 219, 254, 0.72);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--sj-shadow-sm);
    backdrop-filter: blur(10px);
}

.sj-home-filter-card__body {
    padding: 1.18rem 1.2rem;
}

.sj-home-filter-form {
    gap: 1rem !important;
}

.sj-home-filter-label {
    color: var(--sj-text-muted);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sj-home-filter-form .form-select {
    min-height: 3rem;
    border-radius: var(--sj-radius-sm);
    border-color: rgba(148, 163, 184, 0.28);
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.sj-home-filter-form .form-select:focus {
    border-color: rgba(37, 99, 235, 0.42);
    box-shadow: 0 0 0 0.24rem rgba(37, 99, 235, 0.11);
}

.sj-home-filter-btn {
    min-height: 3rem;
    padding: 0.72rem 1.22rem !important;
    border: none !important;
    border-radius: var(--sj-radius-sm) !important;
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.2);
    font-weight: 700 !important;
}

.sj-home-filter-btn:hover,
.sj-home-filter-btn:focus {
    transform: translateY(-1px);
    box-shadow: 0 20px 38px rgba(37, 99, 235, 0.24);
}

.sj-home-filter-banner {
    display: flex;
    align-items: center;
    gap: 0.72rem;
    padding: 0.9rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--sj-radius-sm);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.sj-home-filter-banner i {
    font-size: 1rem;
}

.sj-home-filter-banner small {
    font-size: 0.92rem;
    color: inherit;
}

.sj-home-filter-banner--success {
    color: #0f766e;
    border-color: rgba(45, 212, 191, 0.28);
    background: linear-gradient(135deg, rgba(204, 251, 241, 0.88), rgba(240, 253, 250, 0.98));
}

.sj-home-filter-banner--info {
    color: #0c4a6e;
    border-color: rgba(56, 189, 248, 0.28);
    background: linear-gradient(135deg, rgba(224, 242, 254, 0.92), rgba(240, 249, 255, 0.98));
}

.home-admin-status-row > .col {
    display: flex;
}

.home-admin-status-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100% !important;
    align-self: stretch;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 1.5rem !important;
    box-shadow: var(--sj-shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.home-admin-status-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.home-admin-status-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sj-shadow-lg) !important;
    border-color: rgba(255, 255, 255, 0.9);
}

.home-admin-status-card .card-body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.52rem;
    height: 100%;
    padding: 1rem 1rem 0.94rem !important;
}

.home-admin-status-card .text-muted.small.mb-1 {
    margin-bottom: 0.4rem !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sj-text-soft) !important;
}

.home-admin-status-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
}

.home-admin-status-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.home-admin-status-card .h4 {
    font-size: clamp(1.95rem, 2.25vw, 2.28rem);
    font-weight: 700;
    letter-spacing: -0.04em;
}

.home-admin-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 3rem;
    height: 3rem;
    border-radius: 1.15rem !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 12px 22px rgba(15, 23, 42, 0.08);
}

.home-admin-chart-shell {
    width: 100%;
    margin: 0;
}

.home-admin-chart-heading {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.36rem;
}

.home-admin-chart-caption {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(71, 85, 105, 0.92);
}

.home-admin-chart-caption--summary {
    padding: 0.18rem 0.56rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: none;
}

.home-admin-mini-chart {
    display: flex;
    align-items: center;
    gap: 0.22rem;
    min-height: 1rem;
    padding: 0.22rem;
    margin-bottom: 0.56rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.15);
}

.home-admin-mini-chart-segment {
    min-width: 0;
    height: 0.58rem;
    border-radius: 999px;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.3);
    transition: flex 0.25s ease, opacity 0.2s ease;
}

.home-admin-mini-chart-empty {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.36rem;
    width: 100%;
    min-height: 0.78rem;
    font-size: 0.71rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #64748b;
}

.home-admin-mini-chart-empty i {
    font-size: 0.72rem;
    opacity: 0.72;
}

.home-admin-mini-chart.is-empty {
    justify-content: center;
    border: 1px dashed rgba(148, 163, 184, 0.22);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(248, 250, 252, 0.9));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.home-admin-mini-chart.is-empty .home-admin-mini-chart-segment {
    display: none !important;
}

.home-admin-chart-legend {
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
}

.home-admin-chart-legend.is-empty {
    display: flex;
}

@media (min-width: 1200px) {
    .home-admin-status-card--usuarios .home-admin-chart-legend {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.38rem;
    }

    .home-admin-status-card--usuarios .home-admin-chart-pill {
        padding: 0.44rem 0.5rem;
    }

    .home-admin-status-card--usuarios .home-admin-chart-pill-head {
        gap: 0.32rem;
    }

    .home-admin-status-card--usuarios .home-admin-chart-pill-label {
        font-size: 0.68rem;
        letter-spacing: -0.01em;
    }

    .home-admin-status-card--usuarios .home-admin-chart-pill-values {
        gap: 0.26rem;
    }

    .home-admin-status-card--usuarios .home-admin-chart-pill-percent {
        min-width: 1.9rem;
        padding-inline: 0.26rem;
        font-size: 0.66rem;
    }

    .home-admin-status-card--usuarios .home-admin-chart-pill-number {
        font-size: 0.76rem;
    }

    .home-admin-status-card--usuarios .home-admin-chart-dot {
        width: 0.62rem;
        height: 0.62rem;
    }

    .home-admin-status-card--usuarios .home-admin-chart-legend.is-empty {
        display: flex;
    }

    .home-admin-status-card--usuarios .home-admin-chart-empty-state {
        grid-column: 1 / -1;
    }
}

.home-admin-chart-pill {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 0;
    overflow: hidden;
    isolation: isolate;
    padding: 0.52rem 0.68rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.64);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16);
    color: #0f172a;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.home-admin-chart-pill>* {
    position: relative;
    z-index: 1;
}

.home-admin-chart-pill-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--chart-fill, 0%);
    min-width: 0;
    opacity: 0.16;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    transition: width 0.22s ease, opacity 0.22s ease;
}

.home-admin-chart-pill:hover {
    color: #0f172a;
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.18), 0 10px 18px rgba(15, 23, 42, 0.08);
}

.home-admin-chart-pill-head {
    display: flex;
    align-items: center;
    gap: 0.52rem;
    flex: 1 1 auto;
    min-width: 0;
}

.home-admin-chart-dot {
    width: 0.7rem;
    height: 0.7rem;
    flex: 0 0 auto;
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 5px 10px rgba(15, 23, 42, 0.12);
}

.home-admin-chart-pill-label {
    min-width: 0;
    font-size: 0.77rem;
    font-weight: 650;
    line-height: 1.2;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-admin-chart-pill-values {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    flex: 0 0 auto;
    margin-left: auto;
    white-space: nowrap;
}

.home-admin-chart-pill-number {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.home-admin-chart-pill-percent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.35rem;
    padding: 0.16rem 0.38rem;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.82);
    color: #475569;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}

.home-admin-chart-empty-state {
    display: none;
    align-items: center;
    justify-content: flex-start;
    gap: 0.78rem;
    width: 100%;
    min-height: 4.15rem;
    padding: 0.86rem 0.96rem;
    border: 1px dashed rgba(148, 163, 184, 0.32);
    border-radius: 1.1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.66), rgba(248, 250, 252, 0.78));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
    color: var(--sj-text-soft);
}

.home-admin-chart-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16);
    color: #64748b;
    flex: 0 0 auto;
}

.home-admin-chart-empty-icon i {
    font-size: 1rem;
}

.home-admin-chart-empty-copy {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    min-width: 0;
}

.home-admin-chart-empty-title {
    font-size: 0.8rem;
    line-height: 1.15;
    color: #475569;
}

.home-admin-chart-empty-text {
    font-size: 0.72rem;
    line-height: 1.35;
    color: #64748b;
}

.tone-open {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.tone-progress {
    background: linear-gradient(90deg, #60a5fa, #2563eb);
}

.tone-closed {
    background: linear-gradient(90deg, #94a3b8, #64748b);
}

.tone-admin-empresa {
    background: linear-gradient(90deg, #facc15, #f59e0b);
}

.tone-admin-financeiro {
    background: linear-gradient(90deg, #38bdf8, #0ea5e9);
}

.tone-gestor {
    background: linear-gradient(90deg, #60a5fa, #2563eb);
}

.tone-escalista {
    background: linear-gradient(90deg, #22d3ee, #06b6d4);
}

.tone-profissional {
    background: linear-gradient(90deg, #34d399, #10b981);
}

.tone-neutral {
    background: linear-gradient(90deg, #cbd5e1, #94a3b8);
}

.sj-home-section {
    margin-bottom: 1.25rem !important;
}

.sj-home-section-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.8rem !important;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sj-text-muted);
}

.sj-home-section-title i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: inset 0 0 0 1px var(--sj-border), 0 10px 22px rgba(15, 23, 42, 0.07);
    color: var(--sj-primary);
}

.sj-nav-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
    box-shadow: var(--sj-shadow-sm), inset 0 0 0 1px var(--sj-border);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.sj-nav-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.sj-nav-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--sj-shadow-md), inset 0 0 0 1px var(--sj-border-strong);
}

.sj-nav-card .card-body {
    position: relative;
    z-index: 1;
    gap: 1rem;
    padding: 1.22rem 1.25rem;
    min-height: 7rem;
}

.sj-nav-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    padding: 0 !important;
    border-radius: 1.2rem !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 14px 26px rgba(15, 23, 42, 0.06);
    flex-shrink: 0;
}

.sj-nav-card__title {
    margin-bottom: 0.2rem !important;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.sj-nav-card__text {
    color: var(--sj-text-muted) !important;
    font-size: 0.92rem !important;
}

.sj-nav-card h2.h6 {
    margin-bottom: 0.2rem !important;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.sj-nav-card p.text-muted.small.mb-0 {
    color: var(--sj-text-muted) !important;
    font-size: 0.92rem !important;
}

.sj-nav-card--violet {
    border-left-color: var(--sj-violet) !important;
}

.sj-nav-card__icon--violet {
    background: var(--sj-violet-soft);
}

.sj-nav-card__icon--violet i {
    color: var(--sj-violet) !important;
}

@keyframes refresh-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.refresh-spinner {
    animation: refresh-spin 1.1s linear infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.animate-pulse {
    animation: pulse 0.5s ease-in-out 2;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.5) !important;
}

.animate-pulse-pulse {
    animation: none;
    background: linear-gradient(135deg, #dc3545, #c82333);
    border: none;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    font-size: 0.7rem;
    padding: 0.35rem 0.65rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.home-stats-card {
    animation: none;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hover-lift-action {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.hover-lift-action:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 193, 7, 0.1);
}

.hover-lift-action:hover .card-body {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 193, 7, 0.03));
}

@media (max-width: 991.98px) {
    .sj-nav-card .card-body {
        min-height: auto;
    }
}

@media (max-width: 767.98px) {
    .sj-home-shell {
        padding-bottom: 0.25rem;
    }

    .welcome-section__column {
        margin-bottom: 0.6rem !important;
    }

    .sj-home-hero,
    .sj-home-filter-card,
    .home-admin-status-card,
    .sj-nav-card {
        border-radius: 1.35rem !important;
    }

    .welcome-section--home {
        gap: 0.55rem !important;
        align-items: flex-start !important;
    }

    .welcome-section--home .welcome-section__copy {
        width: 100%;
    }

    .welcome-section--home .welcome-section__title {
        font-size: 1.72rem;
    }

    .welcome-section--home .welcome-section__subtitle {
        font-size: 0.96rem;
    }

    .welcome-section--home .welcome-section__contract {
        margin-top: 0.2rem !important;
    }

    .welcome-section--home .welcome-section__contract-badge {
        display: grid;
        width: 100%;
        gap: 0.24rem;
        padding: 0.68rem 0.82rem !important;
        border-radius: 1.15rem !important;
        white-space: normal;
        line-height: 1.25;
        text-align: left;
    }

    .welcome-section--home .welcome-section__meta {
        width: 100%;
        margin-left: 0;
        align-items: stretch;
        gap: 0.5rem;
    }

    .welcome-section--home .welcome-section__meta-row {
        width: 100%;
        display: flex !important;
        flex-wrap: wrap;
        align-items: stretch !important;
        gap: 0.55rem !important;
    }

    .welcome-section--home .welcome-section__meta-chip {
        min-height: 2.72rem;
        padding: 0 0.92rem;
    }

    .welcome-section--home .welcome-section__tutorial-btn {
        width: auto;
        flex: 0 0 auto;
    }

    .welcome-section--home .welcome-section__date {
        width: auto;
        flex: 1 1 12rem;
        min-width: 0;
        justify-content: flex-start;
        font-size: 0.88rem !important;
    }

    .welcome-section--home .welcome-section__meta-note {
        width: 100%;
        justify-content: center;
    }

    .welcome-section--home .welcome-section__meta-note-content {
        justify-content: center;
        text-align: center;
        white-space: normal;
    }

    .sj-home-filter-card__body {
        padding: 1rem;
    }

    .sj-home-filter-banner {
        align-items: flex-start;
        padding: 0.82rem 0.9rem;
    }

    .home-admin-status-card .card-body {
        padding: 0.98rem !important;
    }

    .home-admin-status-card .h4 {
        font-size: 1.75rem;
    }

    .home-admin-chart-heading {
        align-items: flex-start;
    }

    .home-admin-chart-legend {
        gap: 0.4rem;
    }

    .home-admin-chart-pill {
        padding: 0.5rem 0.62rem;
    }

    .home-admin-chart-pill-label {
        font-size: 0.76rem;
    }

    .home-admin-chart-pill-percent {
        min-width: 2.35rem;
    }

    .sj-home-section-title {
        margin-bottom: 0.68rem !important;
        font-size: 0.78rem;
    }

    .sj-nav-card .card-body {
        padding: 1rem 1.02rem;
        gap: 0.85rem;
    }

    .sj-nav-card__icon {
        width: 3.45rem;
        height: 3.45rem;
        border-radius: 1rem !important;
    }

    .sj-nav-card__title {
        font-size: 1.02rem;
    }

    .sj-nav-card__text {
        font-size: 0.86rem !important;
    }

    .sj-nav-card h2.h6 {
        font-size: 1.02rem;
    }

    .sj-nav-card p.text-muted.small.mb-0 {
        font-size: 0.86rem !important;
    }
}
