/* ===== VARIÁVEIS E RESET ===== */
:root {
    --cor-primaria: #2c3e50;
    --cor-secundaria: #3498db;
    --cor-sucesso: #2ecc71;
    --cor-perigo: #e74c3c;
    --cor-aviso: #f39c12;
    --cor-info: #9b59b6;
    --cor-texto: #333333;
    --cor-fundo: #f8f9fa;
    --cor-borda: #dee2e6;
    --cor-cabecalho: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: var(--cor-fundo);
    color: var(--cor-texto);
}

/* ===== LAYOUT ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

header {
    background-color: var(--cor-primaria);
    color: var(--cor-cabecalho);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

main {
    padding: 2rem 0;
}

/* ===== NAVEGAÇÃO ===== */
nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

nav a {
    color: var(--cor-cabecalho);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: rgba(255,255,255,0.1);
}

/* ===== BOTÕES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background-color: var(--cor-secundaria);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.btn.primary {
    background-color: var(--cor-sucesso);
}

.btn.primary:hover {
    background-color: #27ae60;
}

.btn.small {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
}

.btn.back {
    background-color: #6c757d;
}

.btn.back:hover {
    background-color: #5a6268;
}

/* ===== FILTROS ===== */
.filters-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background-color: white;
    color: var(--cor-primaria);
    border: 1px solid var(--cor-borda);
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.filter-btn:hover {
    background-color: #e9ecef;
}

.filter-btn.active {
    background-color: var(--cor-primaria);
    color: white;
    border-color: var(--cor-primaria);
}

/* ===== TABELA ===== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

table th, table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--cor-borda);
}

table th {
    background-color: var(--cor-primaria);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
}

table tr:hover td {
    background-color: rgba(52, 152, 219, 0.05);
}

/* ===== STATUS ===== */
.status {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    min-width: 100px;
}

.status.planeamento {
    background-color: var(--cor-aviso);
    color: white;
}

.status.execucao, .status.execução {
    background-color: var(--cor-secundaria);
    color: white;
}

.status.concluida, .status.concluída {
    background-color: var(--cor-sucesso);
    color: white;
}

.status.cancelada {
    background-color: var(--cor-perigo);
    color: white;
}

.status.suspensa {
    background-color: var(--cor-info);
    color: white;
}

/* ===== FORMULÁRIOS ===== */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--cor-borda);
    border-radius: 4px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--cor-secundaria);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* ===== PÁGINA DE DETALHES ===== */
.detail-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.detail-row {
    display: flex;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--cor-borda);
}

.detail-label {
    width: 200px;
    font-weight: 600;
    color: var(--cor-primaria);
}

.detail-value {
    flex: 1;
}

.detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* ===== MENSAGENS ===== */
.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        text-align: center;
    }
    
    nav {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .filters-container {
        flex-direction: column;
    }
    
    .filters {
        justify-content: center;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .detail-label {
        width: 100%;
    }
    
    .form-container,
    .detail-container {
        padding: 1.5rem;
    }
}
/* ===== PÁGINA DE LOGIN ===== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f7fa;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: var(--cor-primaria);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #6c757d;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--cor-primaria);
}

.login-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--cor-borda);
    border-radius: 4px;
    font-size: 1rem;
}

.login-form input:focus {
    outline: none;
    border-color: var(--cor-secundaria);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.login-actions {
    margin-top: 2rem;
}

.login-actions .btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: #6c757d;
}

.login-footer a {
    color: var(--cor-secundaria);
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Mensagens de erro no login */
.login-error {
    color: var(--cor-perigo);
    background-color: #f8d7da;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    border: 1px solid #f5c6cb;
}