table caption+thead tr:first-child td, table caption+thead tr:first-child th, table colgroup+thead tr:first-child td, table colgroup+thead tr:first-child th, table thead:first-child tr:first-child td, table thead:first-child tr:first-child th {
    border-block-start: none !important;
}
table td, table th {
    border: none !important;
}
.flowbite-scope {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
    color: #1e293b;
    /*background-color: #f8fafc;*/
    padding: 1rem;
    /*border-radius: 0.75rem;
    border: 1px solid #e2e8f0;*/
}
.flowbite-scope *, .flowbite-scope *::before, .flowbite-scope *::after {
    box-sizing: border-box;
}

.fb-tabs-border {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    /*border-bottom: 1px solid #e2e8f0;*/
}
.fb-tab-item {
    margin-right: 0.5rem;
}
.fb-tab-btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem !important;
    border-bottom: 2px solid transparent;
	border-radius: 0px !important;
    /*border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;*/
    font-size: 0.75rem !important;
	text-transform: uppercase;
    font-weight: 500;
    text-align: center;
    color: #64748b;
    background: none;
    border-top: 0;
    border-left: 0;
    border-right: 0;
    cursor: pointer;
    transition: all 0.2s;
}
.fb-tab-btn:hover {
    color: #3C4854 !important;
    border-color: #3C4854 !important;
	background: none !important;
}
.fb-tab-btn.active {
    color: #3C4854;
    border-color: #3C4854;
    font-weight: 700;
    background-color: #ffffff;
}

.fb-tab-content {
    display: none;
/*    background: #ffffff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);*/
}
.fb-tab-content.active {
    display: block;
}

.fb-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.fb-card {
    padding: 1.25rem;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1);
}
.fb-card-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.25rem;
}
.fb-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

/* Ajuste do container da tabela para evitar scroller duplo */
.fb-table-container {
    max-height: calc(100vh - 340px) !important;
    overflow-y: auto !important;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}
.fb-table {
    width: 100%;
    font-size: 0.875rem;
    text-align: left;
    color: #64748b;
    border-collapse: collapse;
    text-transform: uppercase;
}
.fb-table thead {
    font-size: 0.75rem;
    color: #475569;
    text-transform: uppercase;
    background-color: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}
.fb-table th, .fb-table td {
    padding: 0.75rem 1rem;
}
.fb-table tbody tr {
    background-color: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s;
}
.fb-table tbody tr:hover {
    background-color: #f8fafc;
}

.fb-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #0f172a;
}
.fb-input, .fb-select {
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    font-size: 0.875rem !important;
    border-radius: 0.5rem !important;
    display: block !important;
    width: 100% !important;
    padding: 0.625rem !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
}
.fb-textarea {
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    font-size: 0.875rem !important;
    border-radius: 0.5rem !important;
    display: block !important;
    width: 100% !important;
	height: 150px !important;
    padding: 0.625rem !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
}
.fb-input:focus, .fb-select:focus, .fb-textarea:focus {
    border-color: #1d4ed8;
    outline: none;
    box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.15);
    background-color: #ffffff;
}
.fb-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.fb-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.fb-btn {
    text-align: center;
    font-weight: 500;
    border-radius: 999px;
    font-size: 0.875rem;
    padding: 0.525rem 0.825rem;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.15s;
}
.fb-btn-blue { color: #ffffff !important; background-color: #1d4ed8 !important; }
.fb-btn-blue:hover { background-color: #1e40af !important; }
.fb-btn-green { color: #ffffff !important; background-color: #16a34a !important; }
.fb-btn-green:hover { background-color: #15803d !important; }
.fb-btn-gray { color: #ffffff !important; background-color: #475569 !important; }
.fb-btn-gray:hover {color: #ffffff !important; background-color: #334155 !important; }
.fb-btn-red { color: #ffffff !important; background-color: #dc2626 !important; }
.fb-btn-red:hover { background-color: #b91c1c !important; }
.fb-btn-purple { color: #ffffff !important; background-color: #7c3aed !important; }
.fb-btn-purple:hover { background-color: #6d28d9 !important; }

.fb-badge {
    font-size: 0.55rem !important;
    font-weight: 500 !important;
    padding: 0.125rem 0.625rem !important;
    border-radius: 999px !important;
    display: inline-block !important;
	white-space: nowrap !important;
}
.fb-badge-yellow { background-color: #fef9c3; color: #854d0e; border: 1px solid #fef08a; }
.fb-badge-purple { background-color: #f3e8ff; color: #6b21a8; border: 1px solid #e9d5ff; }
.fb-badge-green { background-color: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.fb-badge-gray { background-color: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.fb-badge-black { background-color: #242B32; color: #f8fafc; border: none; }

/* MODAIS E BARRA DE ROLAGEM */
.fb-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    background-color: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}
.fb-modal-overlay.active { display: flex; }
.fb-modal-container {
    position: relative;
    width: 100%;
    max-width: 56rem;
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Adicionada a transição suave de largura para o Sliding Panel */
    transition: max-width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.fb-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.fb-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1 1 auto;
    overflow-x: hidden; /* Importante para o Sliding Panel */
}
.fb-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    background-color: #f8fafc;
    flex-shrink: 0;
}
.fb-modal-form {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 85vh;
    overflow: hidden;
}
/* ESTILOS DO COMPONENTE AUTOCOMPLETE */
.fb-autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.fb-autocomplete-input-box {
    position: relative;
    display: flex;
    align-items: center;
}

.fb-autocomplete-input-box .fb-input {
    padding-right: 2.5rem;
}

.fb-autocomplete-icon {
    position: absolute;
    right: 0.75rem;
    pointer-events: none;
    color: #64748b;
}

.fb-autocomplete-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    max-height: 15rem;
    overflow-y: auto;
    z-index: 999999;
}

.fb-autocomplete-dropdown.active {
    display: block;
}

.fb-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s;
}

.fb-autocomplete-item:last-child {
    border-bottom: none;
}

.fb-autocomplete-item:hover {
    background-color: #f8fafc;
}

.fb-autocomplete-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background-color: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #bfdbfe;
}

.fb-autocomplete-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fb-autocomplete-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fb-autocomplete-sub {
    font-size: 0.75rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Preserva a caixa baixa/original para campos de e-mail e senhas */
.flowbite-scope input[type="email"],
.flowbite-scope input[type="password"],
.gac-input-field[type="email"],
.gac-input-field[type="password"] {
    text-transform: none !important;
}

/* Header Fixo Unificado no Topo */
.gac-header-topo {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.5rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    margin: -1.5rem -1.5rem 1.5rem -1.5rem; /* Expande para as bordas do container */
}

/* Ajuste da barra de abas dentro do header unificado */
.gac-header-topo .fb-tabs-border {
    margin-bottom: 0;
    border-bottom: none;
}

.gac-header-topo .fb-tab-btn {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
}

/* Uniformização visual das caixas de seleção nativas para combinar com o Autocomplete */
.fb-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' fill='none' stroke='%2364748b' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 16px;
    padding-right: 2.5rem !important;
    cursor: pointer;
}

/* Ajuste para remover a borda de foco que alguns navegadores aplicam */
.fb-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #3b82f6;
}

/* ========================================================= */
/* ENGINE DO SLIDING PANEL (Dossiê Master-Detail)            */
/* ========================================================= */
.gac-slider-viewport {
    overflow: hidden;
    position: relative;
    width: 100%;
}
.gac-slider-track {
    display: flex;
    width: 300%; /* Comporta 3 telas: Main(0%), Acordo(33.3%), Editar(66.6%) */
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    align-items: flex-start;
}
.gac-slider-panel {
    width: 33.3333%;
    flex-shrink: 0;
    padding: 0 0.5rem; /* Margem interna para evitar corte nas sombras dos blocos */
    transition: opacity 0.3s;
}