/* ========================================
   BASE
   ======================================== */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    background-color: #f8f9fa;
    color: #212529;
    margin-bottom: 60px; /* Para o footer */
}

main {
    min-height: calc(100vh - 140px);
}

/* ========================================
   ACESSIBILIDADE
   ======================================== */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
}

    .skip-link:focus {
        left: 1rem;
        top: 1rem;
        z-index: 999999;
        background: #000;
        color: #fff;
        padding: .5rem .75rem;
        border-radius: .5rem;
        text-decoration: none;
    }

/* ========================================
   BOOTSTRAP - FORM FLOATING
   ======================================== */
.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ========================================
   TIPOGRAFIA
   ======================================== */
.navbar-brand {
    font-weight: 700;
    letter-spacing: .2px;
}

.page-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #212529;
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #495057;
}

/* ========================================
   COMPONENTES
   ======================================== */
.card-clean {
    border: 0;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .06);
}

    .card-clean .card-header {
        background: #fff;
        border-bottom: 1px solid #eef1f4;
        font-weight: 600;
    }

/* Campos obrigatórios */
.required::after {
    content: " *";
    color: #dc3545;
}

/* ========================================
   LOADER GLOBAL
   ======================================== */
#globalLoader {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, .72);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

    #globalLoader.show {
        display: flex;
    }

.loader-box {
    background: #fff;
    border-radius: 14px;
    padding: 18px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .10);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #343a40;
}

/* ========================================
   TOASTR
   ======================================== */
.toast-top-right {
    top: 70px;
}

/* ========================================
   FULLCALENDAR
   ======================================== */
.fc .fc-toolbar-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.fc .fc-button-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

    .fc .fc-button-primary:hover {
        background-color: #0b5ed7;
        border-color: #0a58ca;
    }

.fc .fc-daygrid-event {
    border-radius: 6px;
    padding: 2px 4px;
}

/* ========================================
   DATATABLES
   ======================================== */
div.dt-container div.dt-layout-row {
    margin-top: .75rem;
    margin-bottom: .75rem;
}

table.dataTable thead th {
    white-space: nowrap;
}

table.dataTable tbody td {
    vertical-align: middle;
}

.dt-length {
    display: none !important;
}

.table-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

/* ========================================
   DASHBOARD
   ======================================== */
.dashboard-stat {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .dashboard-stat .icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #e9f2ff;
        color: #0d6efd;
        font-size: 1.1rem;
    }

    .dashboard-stat .label {
        font-size: .85rem;
        color: #6c757d;
        margin-bottom: 2px;
    }

    .dashboard-stat .value {
        font-size: 1.35rem;
        font-weight: 700;
        color: #212529;
    }

/* ========================================
   RESPONSIVIDADE
   ======================================== */
@media (max-width: 768px) {
    .page-title {
        font-size: 1.15rem;
    }

    .loader-box {
        padding: 16px 18px;
        font-size: .95rem;
    }

    .table-actions {
        flex-direction: column;
        align-items: stretch;
    }

    /* ========================================
   Línguas
   ======================================== */


    .language-switcher {
        flex-wrap: wrap;
    }

    .language-dropdown .lang-dropdown-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        border-radius: 10px;
        font-weight: 600;
        min-width: 84px;
        justify-content: center;
    }

    .language-dropdown .flag {
        font-size: 1rem;
        line-height: 1;
    }

    .language-dropdown .lang-text {
        line-height: 1;
    }

    .language-dropdown .dropdown-item {
        display: flex;
        align-items: center;
        font-weight: 500;
    }

        .language-dropdown .dropdown-item.active,
        .language-dropdown .dropdown-item:active {
            background-color: #e9f2ff;
            color: #0d6efd;
        }

   
}
/* ========================================
   SPINNER PERSONALIZADO
   ======================================== */
.gestal-spinner {
    color: #135bad;
    width: 3rem;
    height: 3rem;
    border-width: .3em;
}

/* Versão para mobile (dentro do @media ) */
@media (max-width: 768px) {
    .gestal-spinner {
        width: 2.5rem;
        height: 2.5rem;
        border-width: .25em;
    }
}

/* ========================================
   AÇÕES - BOTÕES MONOCROMÁTICOS
   ======================================== */
.acao-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
    transition: all .2s ease;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
}

    .acao-btn:hover {
        background: #ffffff;
        color: #334155;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0,0,0,.08);
        text-decoration: none;
    }

    .acao-btn:active {
        transform: scale(0.95);
    }

    .acao-btn .fa-solid,
    .acao-btn .fa-regular {
        font-size: 16px;
    }

/* Estado Ativo (toggle on) - verde */
.acao-estado-ativo {
    color: #16a34a;
}

    .acao-estado-ativo:hover {
        color: #15803d;
        background: #f0fdf4;
    }

/* Estado Inativo (toggle off) - cinzento */
.acao-estado-inativo {
    color: #94a3b8;
}

    .acao-estado-inativo:hover {
        color: #64748b;
        background: #f8fafc;
    }

/* Container das ações */
.acoes-container {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

    /* Ajuste para os forms inline dentro das ações */
    .acoes-container form {
        display: inline-flex;
        align-items: center;
    }

/* ========================================
   AÇÕES - TABELA (para manter consistência)
   ======================================== */
.table-actions .acao-btn {
    width: 34px;
    height: 34px;
    font-size: 14px;
}

    .table-actions .acao-btn .fa-solid,
    .table-actions .acao-btn .fa-regular {
        font-size: 14px;
    }





/* ========================================
   TABELAS - AÇÕES SEM QUEBRA
   Colocar no fim do site.css
   ======================================== */

/* DataTables: preferir linha única e scroll horizontal */
table.dataTable.nowrap th,
table.dataTable.nowrap td {
    white-space: nowrap;
}

/* Coluna de ações */
.acoes-coluna,
td.acoes-coluna,
th.acoes-coluna {
    white-space: nowrap;
    width: 1%;
}

/* Container genérico de ações em tabelas */
.acoes-container,
.table-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    flex-wrap: nowrap !important;
}

    /* Links, forms e botões dentro da zona de ações */
    .acoes-container a,
    .acoes-container form,
    .acoes-container button,
    .table-actions a,
    .table-actions form,
    .table-actions button {
        flex: 0 0 auto;
    }

    /* Forms inline dentro das ações */
    .acoes-container form,
    .table-actions form {
        display: inline-flex;
        align-items: center;
        margin: 0;
    }

/* Células de ações dentro de tabelas */
.table td .acoes-container,
.table td .table-actions {
    white-space: nowrap;
}

/* Botões de ação compactos dentro de tabelas */
.table-actions .acao-btn,
.acoes-container .acao-btn {
    width: 34px;
    height: 34px;
    font-size: 14px;
}

    .table-actions .acao-btn .fa-solid,
    .table-actions .acao-btn .fa-regular,
    .acoes-container .acao-btn .fa-solid,
    .acoes-container .acao-btn .fa-regular {
        font-size: 14px;
    }

/* Mobile: manter em linha, não empilhar */
@media (max-width: 768px) {
    .table-actions,
    .acoes-container {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center;
        flex-wrap: nowrap !important;
        gap: 4px;
    }

        .table-actions .acao-btn,
        .acoes-container .acao-btn {
            width: 32px;
            height: 32px;
            font-size: 13px;
        }

            .table-actions .acao-btn .fa-solid,
            .table-actions .acao-btn .fa-regular,
            .acoes-container .acao-btn .fa-solid,
            .acoes-container .acao-btn .fa-regular {
                font-size: 13px;
            }
}