/* ============================================================================
   LAYOUT.CSS
   Estruturas globais de layout do sistema GMA · Tema GOVBR
   Utilizado em todas as páginas (header, footer, containers, seções)
   ============================================================================ */

/* ============================================================================
   HEADER GOVBR
   ============================================================================ */

.header {
    background: var(--cor-primaria);
    color: white;
    padding: 16px 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--sombra);
}

.header-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .3px;
}

.header-subtitle {
    font-size: 13px;
    opacity: .85;
}

/* Botão voltar no header */
.header button,
.btn-back {
    background: var(--cor-secundaria);
    border: none;
    color: white;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: .2s;
}

.header button:hover,
.btn-back:hover {
    background: #0a2f60;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.footer {
    background: #e9e9e9;
    color: #555;
    padding: 18px;
    text-align: center;
    font-size: 13px;
    margin-top: 50px;
}

/* ============================================================================
   CONTAINERS PRINCIPAIS
   ============================================================================ */

.container {
    max-width: 1280px;
    margin: 40px auto;
    padding: 0 22px;
}

.container-small {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 22px;
}

.section-box {
    background: white;
    padding: 26px;
    border-radius: var(--radius);
    box-shadow: var(--sombra);
    margin-bottom: 28px;
}

/* ============================================================================
   GRID UTILITÁRIOS
   ============================================================================ */

.grid {
    display: grid;
    gap: 22px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

@media(max-width: 900px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   BOXES COM TÍTULO
   ============================================================================ */

.box-title {
    margin-bottom: 14px;
    font-size: 20px;
    font-weight: 700;
    color: var(--cor-primaria);
}

/* ============================================================================
   TABS / ABAS
   ============================================================================ */

.tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 4px;
    overflow-x: auto;
}

.tab {
    padding: 12px 18px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    border-radius: var(--radius) var(--radius) 0 0;
    transition: .2s;
}

.tab:hover {
    background: #eef3ff;
}

.tab.active {
    color: var(--cor-primaria);
    border-bottom: 3px solid var(--cor-primaria);
}

/* Conteúdo da aba */
.tab-content {
    display: none;
    background: white;
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--sombra);
    margin-top: 18px;
}

.tab-content.active {
    display: block;
}

/* ============================================================================
   CAMPOS DE FORMULÁRIO
   ============================================================================ */

.form-group {
    margin-bottom: 16px;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

/* ============================================================================
   LISTAS
   ============================================================================ */

ul.list-clean {
    list-style: none;
    margin: 0;
    padding: 0;
}

ul.list-clean li {
    padding: 6px 0;
    border-bottom: 1px solid #ececec;
}

/* ============================================================================
   MODAIS (Overlay básico)
   ============================================================================ */

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99;
}

.modal-box {
    background: white;
    padding: 28px;
    width: 450px;
    max-width: 96%;
    border-radius: var(--radius);
    box-shadow: 0 8px 26px rgba(0,0,0,0.25);
}

/* ============================================================================
   FORMAS / UTILITÁRIOS
   ============================================================================ */

.rounded {
    border-radius: var(--radius);
}

.shadow {
    box-shadow: var(--sombra);
}

.bg-white {
    background: white;
}

.bg-light {
    background: #f5f5f5;
}

.text-muted {
    color: #777;
}
