﻿/* ============================================================
   FAETEC DESIGN SYSTEM
   ============================================================ */

:root {
    --faetec-primary: #0d47a1;
    --faetec-primary-light: #1976d2;
    --faetec-secondary: #ffb300;
    --faetec-secondary-light: #ffca28;
    --faetec-bg: #f5f7fb;
    --faetec-border: #cfd8dc;
    --faetec-radius: 16px;
    --faetec-shadow-soft: 0 10px 25px rgba(0,0,0,0.08);
    --faetec-shadow-strong: 0 20px 60px rgba(0,0,0,0.3);
    --faetec-font: "Segoe UI", system-ui, sans-serif;

    --sector-blue: #0b61c9;
    --sector-navy: #073b7a;
    --sector-soft: #eaf3ff;
    --sector-text: #17243a;
    --sector-muted: #68778d;
    --sector-border: #dce5f0;
}

/* ============================================================
   BASE
   ============================================================ */

.faetec-page {
    padding: 14px;
    font-family: var(--faetec-font);
    min-height: 100vh;
}

/* ============================================================
   HEADER
   ============================================================ */

.faetec-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--faetec-primary), var(--faetec-primary-light));
    color: white;
    padding: 18px 28px;
    border-radius: var(--faetec-radius);
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
    margin-bottom: 25px;
}

    .faetec-header h2 {
        margin: 0;
        font-weight: 800;
        display: flex;
        align-items: center;
        gap: 12px;
    }

/* ============================================================
   CARD
   ============================================================ */

.faetec-card {
    background: white;
    border-radius: var(--faetec-radius);
    padding: 28px;
    box-shadow: var(--faetec-shadow-soft);
}

/* ============================================================
   SEARCH BAR
   ============================================================ */

.faetec-search {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

    .faetec-search input {
        border-radius: 10px;
        padding: 10px 14px;
        border: 1px solid var(--faetec-border);
        transition: all 0.25s ease;
    }

        .faetec-search input:focus {
            border-color: var(--faetec-primary-light);
            box-shadow: 0 0 0 3px rgba(25,118,210,0.25);
        }

/* ============================================================
   TABLE
   ============================================================ */

.faetec-table th {
    color: var(--faetec-primary);
    font-weight: 700;
    border-bottom: 2px solid #e3f2fd;
}

.faetec-table td {
    vertical-align: middle;
}

.faetec-table tr {
    transition: all 0.2s ease;
}

    .faetec-table tr:hover {
        background: rgba(13,71,161,0.05);
        transform: scale(1.002);
    }

/* ============================================================
   BADGES
   ============================================================ */

.badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
}

/* ============================================================
   PRIMARY BUTTON
   ============================================================ */

.btn-faetec {
    background: linear-gradient(135deg, var(--faetec-primary), var(--faetec-primary-light));
    border: none;
    color: white;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(13,71,161,0.35);
    transition: all 0.25s ease;
}

    .btn-faetec:hover {
        background: linear-gradient(135deg, #0b3c91, #1565c0);
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(13,71,161,0.45);
        color: white;
    }

    .btn-faetec:active {
        transform: scale(0.96);
    }

/* ============================================================
   BOTÃO DE DETALHES DA TELA DE AGENDA DE CONTATO
   ============================================================ */

.btn-detalhes {
    background: white;
    border: 2px solid var(--faetec-primary);
    color: var(--faetec-primary);
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(13,71,161,0.35);
    transition: all 0.25s ease;
    /*display: inline-flex;
    align-items: center;
    gap: 8px;*/
}

    .btn-detalhes:hover {
        background: linear-gradient(135deg, var(--faetec-primary), var(--faetec-primary-light));
        border: none;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(13,71,161,0.25);
    }

    .btn-detalhes:active {
        transform: scale(0.96);
    }

    /* Variante com ícone */
    .btn-detalhes i {
        font-size: 1.1rem;
        transition: transform 0.2s ease;
    }

    .btn-detalhes:hover i {
        transform: translateX(3px);
    }


/* ============================================================
   SECONDARY "NEW" BUTTON
   ============================================================ */

.btn-novo {
    background: #ffffff;
    color: var(--faetec-primary);
    border: 2px solid rgba(255, 255, 255, 0.8);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 9px 18px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.25s ease;
}

    .btn-novo i {
        font-size: 1.05rem;
        font-weight: bold;
    }

    .btn-novo:hover {
        background: #f5f7fb;
        color: var(--faetec-primary-light);
        transform: translateY(-2px);
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
    }

    .btn-novo:active {
        transform: translateY(0) scale(0.97);
    }

.btn-novo2 {
    background: var(--faetec-primary);
    color:white;
    border: 2px solid rgba(255, 255, 255, 0.8);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 9px 18px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.25s ease;
}

    .btn-novo2 i {
        font-size: 1.05rem;
        font-weight: bold;
    }

    .btn-novo2:hover {
        background: #1f5f9e;
        color: white;
        transform: translateY(-2px);
        
    }

    .btn-novo2:active {
        transform: translateY(0) scale(0.97);
    }


.btn-buscar {
    border: 1px solid #0868d7;
    color: #0868d7;
    background: #fff;
    min-height: 2.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .55rem .85rem;
    border-radius: .6rem;
    font-weight: 700
}

    .btn-buscar:hover {
        border-color: #0868d7;
        background: #f4f8fd;
        transform: translateY(-2px);
    }

/* ============================================================
   BOTÃO DE CANCELAR
   ============================================================ */

.btn-cancelar {
    background: #ffffff;
    color: #6c757d;
    border: 2px solid #6c757d;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 9px 18px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.25s ease;
}

    .btn-cancelar:hover {
        background: #6c757d;
        color: white;
        transform: translateY(-2px);
    }

/* ============================================================
   BOTÃO DE FECHAR MODAL
   ============================================================ */

.modal-header-faetec {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.4rem;
    border-bottom: 1px solid #d9e4f0;
    background: linear-gradient(135deg, #0d47a1, #1976d2);
}

.modal-title-faetec {
    margin: 0;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.2;
}

.btn-modal-close {
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: .65rem;
    color: #fff;
    background: transparent;
    cursor: pointer;
}

    .btn-modal-close:hover {
        color: #0868d7;
        background: #eaf3ff;
    }

/* ============================================================
   BOTÃO DE CHECKBOX DOS AVISOS E FAQ
   ============================================================ */

.btn-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: .95rem;
    padding: .8rem;
    border-radius: .7rem;
    background: #eaf3ff;
}

    .btn-switch > span {
        min-width: 0;
    }

    .btn-switch strong {
        display: block;
        color: #263b58;
        font-size: .8rem;
        font-weight: 600;
    }

    .btn-switch small {
        display: block;
        margin-top: .2rem;
        color: #68778d;
        font-size: .72rem;
        line-height: 1.4;
    }

/* SWITCH */
.btn-switch-input {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 2.7rem !important;
    height: 1.5rem !important;
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background-color: #bdcada !important;
    /* bolinha branca */
    background-image: radial-gradient( circle, #fff 0, #fff .48rem, transparent .5rem ) !important;
    background-repeat: no-repeat !important;
    background-size: 1rem 1rem !important;
    background-position: .25rem center !important;
    cursor: pointer;
    transition: background-color .2s ease, background-position .2s ease;
}

    /* Quando estiver marcado */
    .btn-switch-input:checked {
        background-color: #0868d7 !important;
        background-position: 1.45rem center !important;
    }

    /* Foco */
    .btn-switch-input:focus {
        outline: none !important;
        box-shadow: 0 0 0 .15rem rgba(8, 104, 215, .15) !important;
    }

    .btn-switch-input-desativar {
        appearance: none !important;
        -webkit-appearance: none !important;
        width: 2.7rem !important;
        height: 1.5rem !important;
        flex: 0 0 auto;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 999px !important;
        background-color: #bdcada !important;
        /* bolinha branca */
        background-image: radial-gradient( circle, #fff 0, #fff .48rem, transparent .5rem ) !important;
        background-repeat: no-repeat !important;
        background-size: 1rem 1rem !important;
        background-position: .25rem center !important;
        cursor: pointer;
        transition: background-color .2s ease, background-position .2s ease;
    }

    .btn-switch-input-desativar:checked {
        background-color: #f44336 !important;
        background-position: 1.45rem center !important;
    }

    /* Foco */
    .btn-switch-input-desativar:focus {
        outline: none !important;
        box-shadow: 0 0 0 .15rem rgba(8, 104, 215, .15) !important;
    }
    

.checkbox-bordered .form-check-input {
    border: 2px solid #adb5bd; /* cinza Bootstrap */
    width: 1.15em;
    height: 1.15em;
}

    .checkbox-bordered .form-check-input:checked {
        background-color: #0d6efd; /* azul Bootstrap */
        border-color: #0d6efd;
    }

    .checkbox-bordered .form-check-input:focus {
        box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, .25);
    }


/* ============================================================
   SEARCH BUTTON
   ============================================================ */

.faetec-search .btn-outline-primary {
    border-radius: 10px;
    border: 2px solid var(--faetec-primary-light);
    color: var(--faetec-primary-light);
    font-weight: 700;
    padding: 8px 18px;
    transition: all 0.25s ease;
}

    .faetec-search .btn-outline-primary:hover {
        background: var(--faetec-primary-light);
        color: white;
        box-shadow: 0 6px 15px rgba(21,101,192,0.45);
    }

/* ============================================================
   TABLE BUTTONS
   ============================================================ */

.faetec-table .btn {
    border-radius: 10px;
    padding: 6px 12px;
    transition: all 0.2s ease;
}

.faetec-table .btn-primary {
    background: linear-gradient(135deg, #1976d2, #42a5f5);
    border: none;
}

.faetec-table .btn-secondary {
    background: linear-gradient(135deg, #455a64, #78909c);
    border: none;
}

.faetec-table .btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

/* ============================================================
   MODAL
   ============================================================ */

/* ===== MODAL FAETEC RESPONSIVO ===== */
.faetec-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1199;
}

/* Card do modal */
.faetec-modal-card {
    background: #fff;
    width: 90%;
    max-width: 1100px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
}

.faetec-modal-header {
    padding: 1rem 1.5rem;
    margin: 0;
    color: white;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, var(--faetec-primary), var(--faetec-primary-light));

    display: flex; /* 🔥 ativa flex */
    justify-content: space-between; /* título esquerda / botão direita */
    align-items: center; /* alinhamento vertical */
}
    /* HEADER fixo */
    .faetec-modal-card > h4 {
        padding: 1rem 1.5rem;
        margin: 0;
        color:white;
        border-bottom: 1px solid #e5e7eb;
        background: linear-gradient(135deg, var(--faetec-primary), var(--faetec-primary-light));
    }

    /* Área que vai rolar */
    .faetec-modal-card form {
        flex: 1;
        overflow-y: auto; /* 👈 scroll */
        padding: 25px 30px;
    }

        /* Barra de rolagem elegante */
        .faetec-modal-card form::-webkit-scrollbar {
            width: 8px;
        }

        .faetec-modal-card form::-webkit-scrollbar-thumb {
            background: rgba(13,71,161,0.4);
            border-radius: 10px;
        }

        .faetec-modal-card form::-webkit-scrollbar-track {
            background: #f1f1f1;
        }

/* Rodapé fixo */
.faetec-modal-actions {
    padding: 15px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

    .faetec-modal-actions .btn-secondary {
        background: #e0e0e0;
        border: none;
        color: #444;
        font-weight: 700;
        border-radius: 10px;
    }

        .faetec-modal-actions .btn-secondary:hover {
            background: #d5d5d5;
        }

.faetec-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
}

/* ============================================================
   TAMANHOS DO MODAL
   ============================================================ */

/* Pequeno */
.faetec-modal-card.modal-p {
    max-width: 470px;
    max-height: 70vh;
}

/* Médio (padrão) */
.faetec-modal-card.modal-m {
    max-width: 700px;
    max-height: 70vh;
}

/* Grande */
.faetec-modal-card.modal-g {
    max-width: 1000px;
    max-height: 85vh;
}

/* Extra grande */
.faetec-modal-card.modal-gg {
    max-width: 1200px;
    max-height: 92vh;
}


/* FOOTER fixo */

/* ============================================================
   ANIMATION
   ============================================================ */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* Cores de Status para o Usuário Final */
.badge-status-registrada {
    background-color: #e3f2fd;
    color: #0d47a1;
    border: 1px solid #bbdefb;
}

.badge-status-respondida {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.badge-status-cancelada {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.text-protocolo {
    font-family: monospace;
    color: #607d8b;
    font-size: 0.9rem;
}

.duvida-meta {
    font-size: 0.85rem;
    color: #78909c;
    display: flex;
    gap: 15px;
}

.card-duvida {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--faetec-border);
    border-left: 5px solid var(--faetec-primary);
}

    .card-duvida:hover {
        transform: translateY(-5px);
        box-shadow: var(--faetec-shadow-strong);
    }


/* ============================================================
   TABELAS
   ============================================================ */

.sectors-panel {
    overflow: hidden;
    border: 1px solid var(--sector-border);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 .75rem 2rem rgba(7,59,122,.09);
}

.sectors-search {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: 1.2rem;
    border-bottom: 1px solid var(--sector-border);
}

.sectors-search-field {
    position: relative;
    width: min(31rem,100%);
}

    .sectors-search-field > i {
        position: absolute;
        z-index: 1;
        top: 50%;
        left: .85rem;
        color: var(--sector-muted);
        transform: translateY(-50%);
        pointer-events: none;
    }

    .sectors-search-field > .form-control {
        padding-left: 2.5rem;
    }

    .sectors-search-field ::deep .form-control {
        height: 2.75rem;
        padding-left: 3rem;
        border: 1px solid var(--sector-border);
        border-radius: .65rem;
        box-shadow: none;
    }

        .sectors-search-field ::deep .form-control:focus {
            border-color: var(--sector-blue);
            box-shadow: 0 0 0 .2rem rgba(11,97,201,.13);
        }

.auditoria-search {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) 3rem;
    align-items: start;
    gap: .65rem;
    width: 100%;
    padding: 1.2rem;
    border-bottom: 1px solid var(--sector-border);
}

.auditoria-search-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.auditoria-search-label {
    margin-bottom: .4rem;
    color: var(--sector-navy);
    font-size: .82rem;
    font-weight: 500;
}

.auditoria-search-field ::deep .auditoria-search-input {
    display: block;
    width: 100%;
    min-width: 0;
    height: 2.75rem;
    padding: 0 .7rem;
    border: 1px solid var(--sector-border);
    border-radius: .55rem;
    background-color: #fff;
    color: var(--sector-navy);
    font-family: inherit;
    font-size: .85rem;
    box-shadow: none;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

    .auditoria-search-field ::deep .auditoria-search-input:focus {
        border-color: var(--sector-blue);
        box-shadow: 0 0 0 .2rem rgba(11, 97, 201, .13);
    }

.auditoria-search-field ::deep .validation-message {
    margin-top: .2rem;
    color: #dc3545;
    font-size: .75rem;
    line-height: 1.35;
}

.auditoria-search-action {
    padding-top: 1.60rem;
}

.auditoria-search-button {
    width: 100%;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--sector-blue);
    border-radius: .55rem;
    background: #fff;
    color: var(--sector-blue);
    font-size: .9rem;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}

    .auditoria-search-button:hover {
        background: var(--sector-blue);
        color: #fff;
    }

    .auditoria-search-button:focus,
    .auditoria-search-button:active {
        outline: none;
        box-shadow: none;
    }

.sectors-footer {
    min-height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem 1.2rem;
    color: var(--sector-muted);
    font-size: .76rem;
}

    .sectors-footer ::deep .pagination {
        margin: 0;
    }

    .sectors-footer ::deep .page-link {
        min-width: 2rem;
        min-height: 2rem;
        display: grid;
        place-items: center;
        border: 0;
        border-radius: .5rem !important;
        color: var(--sector-blue);
    }

    .sectors-footer ::deep .page-item.active .page-link {
        color: #fff;
        background: var(--sector-blue);
    }

.table-wrap {
    margin-top: 1rem;
    padding: 0 1.2rem;
}

.padrao-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    /* Cabeçalho */
    .padrao-table th {
        padding: .85rem .9rem;
        color: var(--sector-navy);
        background: #f4f7fb;
        border-top: 1px solid var(--sector-border);
        border-bottom: 2px solid #d7e2ef;
        font-size: .72rem;
        font-weight: 800;
        letter-spacing: .06em;
        text-align: left;
        text-transform: uppercase;
        white-space: nowrap;
    }

        .padrao-table th:first-child {
            border-top-left-radius: .65rem;
        }

        .padrao-table th:last-child {
            border-top-right-radius: .65rem;
        }

    /* Conteúdo */
    .padrao-table td {
        padding: 1rem .9rem;
        border-bottom: 1px solid var(--sector-border);
        font-size: .86rem;
        text-align: left;
        color: #344054;
    }

    .padrao-table tbody tr {
        transition: background-color .15s ease;
    }

        .padrao-table tbody tr:hover {
            background: var(--sector-soft);
        }

    .padrao-table tr.is-disabled {
        background: #fff3f3;
    }

/* Colunas */
.padrao-type-column {
    text-align: center !important;
}

.padrao-actions-column {
    text-align: center !important;
}

/* Tipo */
.padrao-type {
    display: inline-flex;
    align-items: center;
    padding: .32rem .6rem;
    border-radius: 999px;
    color: var(--sector-blue);
    background: var(--sector-soft);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Ativo */
.padrao-type-ativo {
    display: inline-flex;
    align-items: center;
    padding: .32rem .6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    color: #16803c;
    background: #e8f7ee;
}

/* Desativado */
.padrao-type-desativado {
    display: inline-flex;
    align-items: center;
    padding: .32rem .6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    color: #c62828;
    background: #fdecec;
}

/* Ações */
.padrao-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    white-space: nowrap;
}

.padrao-action {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border: 1px solid var(--sector-border);
    border-radius: .55rem;
    color: var(--sector-navy);
    background: #fff;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease, transform .15s ease;
}

    .padrao-action:hover {
        color: var(--sector-blue);
        background: var(--sector-soft);
        border-color: #b9cde5;
        transform: translateY(-1px);
    }

/* Status */
.padrao-status, .padrao-destaque {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    white-space: nowrap;
    font-size: .75rem;
    font-weight: 700;
    min-height: 1.7rem;
    padding: .3rem .55rem;
    border-radius: 1rem
}


    .padrao-status.published {
        color: #087a49;
        background: #e9f8f0
    }

    .padrao-status.draft {
        color: #9a570b;
        background: #fff4e2
    }

    .padrao-status.expired {
        color: #b42318;
        background: #fff0ee
    }

    .padrao-status.neutral {
        color: #68778d;
        background: #eff3f7
    }

    .padrao-status.atendimento {
        color: #fff !important;
        background: #0878f9;
    }

    .padrao-status.solicitante {
        color: black !important;
        background: #f5a900;
    }

    .padrao-status.concluido {
        color: black !important;
        background: #08b8d4;
    }

    .padrao-status.cancelado {
        color: #fff !important;
        background: #d92d20;
    }

.padrao-destaque {
    color: #68778d;
    background: #eff3f7
}

    .padrao-destaque.featured {
        color: #0868d7;
        background: #eaf3ff;
    }


.faq-pergunta-resposta {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.faq-pergunta {
    display: block;
    color: #17243a;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.35;
}

.faq-resposta {
    display: block;
    max-width: 55rem;
    color: #68778d;
    font-size: .8rem;
    font-weight: 400;
    line-height: 1.45;
}

/* ============================================================
   TABELAS MOBILE
   ============================================================ */
.padrao-mobile-list {
    display: none;
}

.padrao-empty {
    padding: 2rem;
    color: var(--sector-muted);
    text-align: center;
}

.padrao-footer {
    min-height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem 1.2rem;
    color: var(--sector-muted);
    font-size: .76rem;
}

    .padrao-footer ::deep .pagination {
        margin: 0;
    }

    .padrao-footer ::deep .page-link {
        min-width: 2rem;
        min-height: 2rem;
        display: grid;
        place-items: center;
        border: 0;
        border-radius: .5rem !important;
        color: var(--sector-blue);
    }

.padrao-footer ::deep .page-item.active .page-link {
    color: #fff;
    background: var(--sector-blue);
}


/* ============================================================
   HEADER DO MODAL
   ============================================================ */

.padrao-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.4rem;
    border-bottom: 1px solid #d9e4f0;
    background: linear-gradient(135deg, #0d47a1, #1976d2);
}

.padrao-modal-header h2 {
    font-size: 1.5rem;
    color: white;
}

    .padrao-modal-header p {
        margin: .3rem 0 0;
        color: white;
        font-size: .8rem
    }

.padrao-modal-heading {
    display: flex;
    align-items: flex-start;
    gap: .8rem
}

.padrao-modal-icon {
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: .75rem;
    color: #0868d7;
    background: #eaf3ff;
    font-size: 1.15rem
}


/* ============================================================
   DADOS DO MODAL
   ============================================================ */
.padrao-data-body {
    padding: 1.35rem
}

.padrao-form-section + .padrao-form-section {
    margin-top: 1.5rem;
    padding-top: 1.35rem;
    border-top: 1px solid #e0e8f2
}

.padrao-section-title {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: 0 0 1rem;
    color: #12396a;
    font-size: 1rem;
    font-weight: 700
}

    .padrao-section-title span {
        width: 2rem;
        height: 2rem;
        display: grid;
        place-items: center;
        border-radius: .55rem;
        color: #0868d7;
        background: #e8f2ff
    }

.padrao-form-grid {
    display: grid;
    grid-template-columns: repeat(12,minmax(0,1fr));
    gap: 1rem
}

.padrao-field-full {
    grid-column: 1/-1
}

.padrao-field-cep {
    grid-column: span 3
}

.padrao-field {
    grid-column: span 4;
    min-width: 0
}

.padrao-field-half {
    grid-column: span 6
}

.padrao-field-full {
    grid-column: 1/-1
}

.padrao-field-cep {
    grid-column: span 3
}

.padrao-field label {
    display: block;
    margin-bottom: .4rem;
    color: #263b58;
    font-size: .86rem;
    font-weight: 700
}

.padrao-field .form-control {
    min-height: 2.75rem;
    border-color: #cedae8;
    border-radius: .6rem;
    color: #142b49;
    background: #fff
}

    .padrao-field .form-control:focus {
        border-color: #2a7ed8;
        box-shadow: 0 0 0 .2rem rgba(8,104,215,.12)
    }

.padrao-field .validation-message {
    display: block;
    margin-top: .35rem;
    color: #b42318;
    font-size: .8rem
}

.padrao-data-footer {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 1.35rem;
    border-top: 1px solid #e0e8f2;
    background: #fbfcfe
}


/* ============================================================
   BOTÕES DA PAGINAÇÃO
   ============================================================ */

.padrao-footer {
    min-height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem 1.2rem;
    color: var(--sector-muted);
    font-size: .76rem;
}

    .padrao-footer ::deep .pagination {
        margin: 0;
    }

    .padrao-footer ::deep .page-link {
        min-width: 2rem;
        min-height: 2rem;
        display: grid;
        place-items: center;
        border: 0;
        border-radius: .5rem !important;
        color: var(--sector-blue);
    }

    .padrao-footer ::deep .page-item.active .page-link {
        color: #fff;
        background: var(--sector-blue);
    }




/* ============================================================
   RESPONSIVIDADE
   ============================================================ */

/* Tablets */
@media (max-width: 992px) {

    .faetec-header {
        padding: 16px 20px;
    }

        .faetec-header h2 {
            font-size: 1.4rem;
        }

    .faetec-card {
        padding: 20px;
    }

    .faetec-search {
        flex-wrap: wrap;
    }

        .faetec-search input {
            width: 100%;
        }

    .padrao-field, .padrao-field-half, .padrao-field-cep {
        grid-column: span 6
    }

    .padrao-field-full {
        grid-column: 1/-1
    }

    .auditoria-search {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auditoria-search-action {
        grid-column: 1 / -1;
        padding-top: 0;
    }

    .auditoria-search-button {
        width: 100%;
    }
}

@media (max-width:900px) {
    .padrao-table-wrap {
        padding: 0 .85rem;
    }

    .padrao-table th, .padrao-table td {
        padding-right: .5rem;
        padding-left: .5rem;
    }

    .padrao-actions {
        gap: .2rem;
    }

    .padrao-action {
        width: 2.05rem;
        height: 2.05rem;
    }

    .padrao-field-full {
        grid-column: 1/-1
    }
}

/* Celulares */
@media (max-width: 768px) {

    .faetec-page {
        padding: 10px;
    }

    /* Header */
    .faetec-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 18px;
    }

        .faetec-header h2 {
            font-size: 1.2rem;
            justify-content: center;
            flex-wrap: wrap;
        }

    .btn-novo {
        width: 100%;
        justify-content: center;
    }

    .padrao-data-body {
        padding: 1rem .875rem
    }

    .padrao-form-section + .padrao-form-section {
        margin-top: 1.25rem;
        padding-top: 1.1rem
    }

    .padrao-form-grid {
        grid-template-columns: 1fr;
        gap: .9rem
    }

    .padrao-field, .padrao-field-half, .padrao-field-full, .padrao-field-cep {
        grid-column: 1
    }

        .padrao-field .form-control {
            min-height: 2.9rem;
            font-size: 1rem
        }

    /* Busca */
    .faetec-search {
        flex-direction: column;
    }

        .faetec-search input,
        .faetec-search button {
            width: 100%;
        }

    /* Card */
    .faetec-card {
        padding: 15px;
    }

    /* Tabela com scroll horizontal */
    .table-responsive-faetec {
        overflow-x: auto;
        width: 100%;
    }

    .faetec-table {
        min-width: 700px;
    }

    /* Botões */
    .btn-faetec,
    .btn-detalhes,
    .btn-novo {
        font-size: 0.9rem;
        padding: 8px 14px;
    }

    .sectors-search {
        padding: .9rem;
    }

    .sectors-search-field {
        width: auto;
        flex: 1;
        min-width: 0;
    }

        .sectors-search-field ::deep .form-control {
            height: 2.8rem;
            font-size: 1rem;
        }

    .sectors-search-button {
        width: 2.8rem;
        height: 2.8rem;
        justify-content: center;
        padding: 0;
    }

        .sectors-search-button span {
            display: none;
        }

    .sectors-footer {
        align-items: flex-start;
        flex-direction: column;
        padding: 1rem;
    }

    .padrao-data-footer {
        padding: .875rem
    }
}

@media (max-width:640px) {
    .padrao-heading {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 1rem;
    }

        .padrao-heading h2 {
            font-size: 1.65rem;
        }

        .padrao-heading p {
            font-size: .82rem;
        }

    .sectors-panel {
        border-radius: .85rem;
    }

    .padrao-new {
        width: 100%;
    }

    .padrao-panel {
        border-radius: .85rem;
    }

    .padrao-search {
        padding: .9rem;
    }

    .padrao-search-field {
        width: auto;
        flex: 1;
        min-width: 0;
    }

        .padrao-search-field ::deep .form-control {
            height: 2.8rem;
            font-size: 1rem;
        }

    .padrao-search-button {
        width: 2.8rem;
        height: 2.8rem;
        justify-content: center;
        padding: 0;
    }

        .padrao-search-button span {
            display: none;
        }


    .padrao-modal-header {
        padding: 1rem .9rem
    }

        .padrao-modal-header h2 {
            font-size: 1.15rem
        }

        .padrao-modal-header p {
            font-size: .72rem;
            line-height: 1.35
        }

    .padrao-modal-heading {
        gap: .65rem
    }

    .padrao-modal-icon {
        width: 2.5rem;
        height: 2.5rem
    }

    .table-wrap {
        display: none;
    }

    .padrao-mobile-list {
        display: grid;
        gap: .75rem;
        padding: .85rem;
        background: #f7f9fc;
    }

    .padrao-mobile-card {
        padding: 1rem;
        border: 1px solid var(--sector-border);
        border-radius: .85rem;
        background: #fff;
        box-shadow: 0 .45rem 1.2rem rgba(7,59,122,.07);
    }

        .padrao-mobile-card.is-disabled {
            background: #ffeded;
        }

    .padrao-mobile-heading {
        display: grid;
        grid-template-columns: auto minmax(0,1fr) auto;
        align-items: center;
        gap: .65rem;
    }

    .padrao-mobile-icon {
        width: 2.2rem;
        height: 2.2rem;
        display: grid;
        place-items: center;
        border-radius: .65rem;
        color: var(--sector-blue);
        background: var(--sector-soft);
    }

    .padrao-mobile-heading strong, .padrao-mobile-heading small {
        display: block;
    }

    .padrao-mobile-heading strong {
        overflow: hidden;
        font-size: .84rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .padrao-mobile-heading small {
        margin-top: .15rem;
        color: var(--sector-muted);
        font-size: .68rem;
    }

    .padrao-mobile-email {
        display: flex;
        align-items: center;
        gap: .45rem;
        margin: .85rem 0;
        color: var(--sector-muted);
        font-size: .75rem;
    }

    .padrao-mobile-actions {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .4rem;
        padding-top: .75rem;
        border-top: 1px solid var(--sector-border);
    }

        .padrao-mobile-actions button {
            width: 3.1rem;
            height: 2.75rem;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid var(--sector-border);
            border-radius: .65rem;
            color: var(--sector-navy);
            background: #fff;
            padding: 0;
        }

    .padrao-footer {
        align-items: flex-start;
        flex-direction: column;
        padding: 1rem;
    }
}

@media (max-width: 575.98px) {

    .auditoria-search {
        grid-template-columns: minmax(0, 1fr);
        gap: .85rem;
        padding: 1rem;
    }

    .auditoria-search-action {
        grid-column: auto;
    }
}


/* Celulares pequenos */
@media (max-width: 480px) {

    .faetec-header h2 {
        font-size: 1rem;
        line-height: 1.4;
    }

    .btn-faetec,
    .btn-detalhes,
    .btn-novo {
        width: 100%;
        font-size: 0.85rem;
    }

    .faetec-modal-card {
        width: 95%;
        max-height: 95vh;
    }

    .faetec-modal-content {
        padding: 1rem;
    }

    .faetec-modal-actions {
        flex-direction: column;
    }

        .faetec-modal-actions button {
            width: 100%;
        }
}

.filter-buttons .btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-buttons .btn {
    white-space: nowrap;
}

/* Tablet */
@media (max-width: 768px) {
    .filter-buttons .btn-group {
        width: 100%;
        justify-content: center;
    }

    .filter-buttons .btn {
        flex: 1 1 calc(50% - 8px);
        min-width: 140px;
    }
}

/* Celular pequeno */
@media (max-width: 576px) {
    .filter-buttons .btn {
        flex: 1 1 100%;
        width: 100%;
    }
}
