/* Estilos específicos para documentos.php */

/* Cabeçalho da secção */
section.content header h2 {
    color: #004080;
    margin-bottom: 15px;
}

/* Alertas */
.alert {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-weight: bold;
}

.alert.success {
    background: #e6ffe6;
    border: 1px solid #33cc33;
    color: #006600;
}

/* Botões gerais */
.btn {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9em;
    line-height: 1.2em; /* altura uniforme */
    min-width: 80px;    /* largura mínima */
    text-align: center;
    transition: background 0.2s ease-in-out;
}

/* Botão primário */
.btn.btn-primary {
    background: #004080;
    color: #fff;
    border: none;
}

.btn.btn-primary:hover {
    background: #0066cc;
}

/* Botão secundário */
.btn.btn-secondary {
    background: #666;
    color: #fff;
    border: none;
}

.btn.btn-secondary:hover {
    background: #444;
}

/* Botão de perigo (apagar) */
.btn.btn-danger {
    background: #cc0000;
    color: #fff;
    border: none;
}

.btn.btn-danger:hover {
    background: #990000;
}

/* Tabela de documentos */
.table-docs {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: #fff;
}

.table-docs th,
.table-docs td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}

.table-docs th {
    background: #f0f0f0;
    font-weight: bold;
}

.table-docs tr:nth-child(even) {
    background: #fafafa;
}

.table-docs tr:hover {
    background: #f5f5f5;
}

.table-docs .col-id {
    width: 5%;
}
.table-docs .col-title {
    width: 20%;
}
.table-docs .col-desc {
    width: 30%;
}
.table-docs .col-data {
    width: 15%;
}
.table-docs .col-download,
.table-docs .col-actions {
    width: 15%;
    text-align: center;
}

/* Ações dentro da tabela */
.doc-actions {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.doc-actions .btn {
    flex: 1;
}

/* Iframe para pré-visualização de documentos */
iframe {
    width: 100%;
    height: 600px; /* altura adequada para leitura */
    border: 1px solid #ccc;
    margin-top: 15px;
    border-radius: 4px;
    background: #fff;
}

@media (max-width: 768px) {
    .doc-actions {
        flex-direction: column;
    }
    .doc-actions .btn {
        width: 100%;
    }
}
