/* estilo.css - Design Profissional Unificado */
/* Reset e Estilos Gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #343a40;
    line-height: 1.6;
}

/* Topo */
.topo {
    background: linear-gradient(135deg, #003366, #004080);
    color: white;
    padding: 20px;
    text-align: center;
    font-size: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.topo::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(30deg);
}

/* Menu */
.menu {
    background: #004080;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 12px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    padding: 10px 20px;
    border-radius: 30px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
}

.menu a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Containers */
.container, .conteudo {
    max-width: 1200px;
    margin: 30px auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

/* Títulos */
h1, h2 {
    color: #004080;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
    text-align: center;
}

h1::after, h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #004080, #28a745);
    border-radius: 2px;
}

/* Formulários */
form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 700px;
    margin: 0 auto;
}

label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    display: block;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    background: #f8f9fa;
}

input:focus, select:focus, textarea:focus {
    border-color: #004080;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
    background: white;
}

.linha-campos {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.linha-campos > div {
    flex: 1;
    min-width: 200px;
}

/* Botões */
button, .btn, input[type="submit"] {
    background: linear-gradient(135deg, #004080, #0066cc);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: inline-block;
    text-align: center;
    margin-top: 10px;
}

button:hover, .btn:hover, input[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #003366, #0059b3);
}

.add-link {
    display: block;
    text-align: center;
    margin: 25px 0;
    padding: 14px 20px;
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.add-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

/* Tabelas */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

th, td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

th {
    background: linear-gradient(135deg, #004080, #0066cc);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #e9f7fe;
}

/* Status */
.status-verde {
    color: #28a745;
    font-weight: 600;
}

.status-amarelo {
    color: #ffc107;
    font-weight: 600;
}

.status-destaque {
    color: #007bff;
    font-weight: 600;
    background-color: #e7f5ff;
    padding: 5px 10px;
    border-radius: 4px;
}

.status-vermelho {
    color: #dc3545;
    font-weight: 600;
}

.status-pago {
    color: #6c757d;
    font-style: italic;
}

/* Paginação */
.paginacao {
    text-align: center;
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.paginacao a, .paginacao strong {
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s;
    min-width: 40px;
    display: inline-block;
}

.paginacao a {
    background: #e9ecef;
    color: #495057;
    border: 1px solid #dee2e6;
}

.paginacao a:hover {
    background: #004080;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.paginacao strong {
    background: #004080;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Mensagens de Erro */
.erro {
    background: #fff3f3;
    color: #dc3545;
    border-left: 4px solid #dc3545;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 25px;
    font-weight: 600;
}

/* Mensagem de Sucesso */
.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin: 15px auto;
    text-align: center;
    border: 1px solid #c3e6cb;
    font-weight: bold;
    max-width: 800px;
}

/* Busca */
.busca {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    padding: 25px;
    text-align: center;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.busca input {
    padding: 12px 20px;
    width: 100%;
    max-width: 500px;
    border-radius: 8px;
    border: 1px solid #ced4da;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.busca button {
    padding: 12px 25px;
    margin-left: 10px;
    border-radius: 8px;
    background: linear-gradient(135deg, #28a745, #218838);
    font-weight: 600;
}

/* Responsividade */
@media (max-width: 992px) {
    .container, .conteudo {
        padding: 25px;
        margin: 20px 15px;
    }
    
    .menu a {
        margin: 5px;
        padding: 10px 15px;
        font-size: 15px;
    }
    
    .linha-campos {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }
    
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    tr {
        border: 1px solid #e9ecef;
        margin-bottom: 15px;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }
    
    td {
        border: none;
        border-bottom: 1px solid #e9ecef;
        position: relative;
        padding-left: 50%;
        text-align: right;
    }
    
    td:before {
        position: absolute;
        top: 14px;
        left: 16px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: 600;
        color: #004080;
    }
    
    td:nth-of-type(1):before { content: "Cidade:"; }
    td:nth-of-type(2):before { content: "Descrição:"; }
    td:nth-of-type(3):before { content: "Fornecedor:"; }
    td:nth-of-type(4):before { content: "Vencimento:"; }
    td:nth-of-type(5):before { content: "Valor:"; }
    td:nth-of-type(6):before { content: "Status:"; }
    td:nth-of-type(7):before { content: "Ações:"; }
    
    .busca {
        padding: 20px 15px;
    }
    
    .busca button {
        margin-top: 15px;
        margin-left: 0;
        width: 100%;
        max-width: 500px;
    }
}

@media (max-width: 480px) {
    .topo {
        font-size: 22px;
        padding: 15px;
    }
    
    .menu {
        flex-direction: column;
        align-items: center;
    }
    
    .menu a {
        width: 90%;
        justify-content: center;
        margin: 5px 0;
    }
    
    h2 {
        font-size: 22px;
    }
}