/* ============================================================================
   COMPONENTS.CSS
   Componentes reutilizáveis do sistema GMA — GOVBR
   ============================================================================ */

/* ============================================================================
   BOTÕES ESPECIAIS
   ============================================================================ */

.btn-acessar {
    background: var(--cor-primaria);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius);
    border: none;
    font-size: 13px;
    cursor: pointer;
    transition: .2s;
}

.btn-acessar:hover {
    background: var(--cor-secundaria);
}

.btn-outline {
    background: none;
    border: 2px solid var(--cor-primaria);
    padding: 8px 16px;
    border-radius: var(--radius);
    color: var(--cor-primaria);
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
}

.btn-outline:hover {
    background: var(--cor-primaria);
    color: white;
}

/* Botão de salvar */
.btn-save {
    background: var(--cor-primaria);
    color: white;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: .2s;
}

.btn-save:hover {
    background: var(--cor-secundaria);
}

/* ============================================================================
   BADGES (chips de status e categoria)
   ============================================================================ */

.badge {
    padding: 4px 10px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    color: white;
}

.badge-primary {
    background: var(--cor-primaria);
}

.badge-green {
    background: #1A7A3C;
}

.badge-red {
    background: #C62828;
}

.badge-yellow {
    background: #F0B400;
    color: #222;
}

/* ============================================================================
   CARDS PADRÃO (usados no dashboard)
   ============================================================================ */

.component-card {
    background: white;
    padding: 26px;
    border-radius: var(--radius);
    box-shadow: var(--sombra);
    cursor: pointer;
    transition: .2s;
}

.component-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
}

.component-card .icon {
    width: 44px;
    height: 44px;
    background: #EAF1FD;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cor-primaria);
    font-size: 24px;
    margin-bottom: 12px;
}

.component-card h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--cor-primaria);
}

.component-card p {
    color: #666;
    font-size: 13px;
    margin-top: 6px;
}

/* ============================================================================
   MODAL (overlay e caixa)
   ============================================================================ */

.gma-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.gma-modal {
    background: white;
    padding: 28px;
    width: 480px;
    max-width: 95%;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    animation: modalIn .25s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 18px;
}

/* ============================================================================
   TABELA AVANÇADA (mais refinada)
   ============================================================================ */

.table-clean {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--sombra);
}

.table-clean th {
    background: #EAF1FD;
    padding: 12px;
    font-size: 13px;
    color: var(--cor-primaria);
    border-bottom: 1px solid #d4ddec;
}

.table-clean td {
    padding: 12px;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}

.table-clean tr:hover td {
    background: #F5FAFF;
}

/* ============================================================================
   FORM COMPONENTS
   ============================================================================ */

/* Input com ícone */
.input-icon {
    position: relative;
}

.input-icon input {
    padding-left: 42px !important;
}

.input-icon i {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #777;
    font-size: 15px;
}

/* Campo desabilitado */
input[disabled],
textarea[disabled],
select[disabled] {
    background: #ececec;
    cursor: not-allowed;
}

/* ============================================================================
   PAGINAÇÃO (opcional)
   ============================================================================ */

.pagination {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.pagination button {
    background: white;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: var(--radius);
    cursor: pointer;
}

.pagination button:hover {
    background: #EAF1FD;
}

/* ============================================================================
   ALERTAS / INFO-BOX
   ============================================================================ */

.info-box {
    padding: 18px;
    background: #EAF1FD;
    border-left: 4px solid var(--cor-primaria);
    border-radius: var(--radius);
    margin-bottom: 18px;
}

.alert-box {
    padding: 18px;
    background: #FFEEEE;
    border-left: 4px solid #C62828;
    border-radius: var(--radius);
    margin-bottom: 18px;
}

.success-box {
    padding: 18px;
    background: #E7F6ED;
    border-left: 4px solid #1A7A3C;
    border-radius: var(--radius);
    margin-bottom: 18px;
}

/* ============================================================================
   SEPARADOR
   ============================================================================ */

.separator {
    margin: 26px 0;
    height: 1px;
    background: #e0e0e0;
}

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

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

.list-group li {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.list-group li:last-child {
    border-bottom: none;
}

/* ============================================================================
   TÍTULOS DE SEÇÃO
   ============================================================================ */

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

/* ============================================================================
   FIM COMPONENTS.CSS
   ============================================================================ */
