/*
    styles.css
    (código completo e atualizado)
*/

body {
    background-color: #000080;
    font-family: Arial, sans-serif;
    color: #f0f0f0;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-y: auto;
}

.logo-container {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
}

.logo {
    max-width: 300px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.header-container {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
}

.logout-btn {
    color: #f0f0f0;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.logout-btn:hover {
    color: #007bff;
}

/* --- Estilos para o menu inicial --- */

.main-menu {
    text-align: center;
    margin-top: 250px;
    background-color: #000060;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.main-menu h1 {
    font-size: 1.5em;
    margin-bottom: 25px;
}

.login-button {
    display: block;
    width: 250px;
    padding: 15px;
    margin: 15px auto;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.login-button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* --- Estilos para o Painel do Cliente --- */

.dashboard-main {
    max-width: 1200px;
    width: 90%;
    margin-top: 250px;
    background-color: #000060;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin-bottom: 50px;
}

.dashboard-main h1 {
    color: #f0f0f0;
    margin-bottom: 10px;
}

.project-message {
    font-size: 1.2em;
    font-style: italic;
    color: #b3b3e6;
    margin-bottom: 30px;
}

.project-card {
    background-color: #00004d;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: left;
}

.project-card h3 {
    border-bottom: 2px solid #0056b3;
    padding-bottom: 10px;
}

.status-pendente {
    color: #ffc107;
}
.status-em-andamento {
    color: #17a2b8;
}
.status-concluido {
    color: #28a745;
}

.milestones-section {
    margin-top: 20px;
    border-top: 1px solid #0056b3;
    padding-top: 15px;
}

.milestone-list {
    list-style: none;
    padding: 0;
}

.milestone-item {
    margin: 5px 0;
    padding: 8px 12px;
    border-radius: 4px;
    background-color: #000033;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.milestone-item i {
    margin-right: 10px;
}

.milestone-item.status-a-fazer {
    opacity: 0.6;
}

.milestone-item.status-em-progresso {
    background-color: #004d66;
    opacity: 1;
}

.milestone-item.status-concluido {
    background-color: #1a5c2d;
    opacity: 1;
}

.milestone-form select {
    background-color: #00004d;
    color: #f0f0f0;
    border: 1px solid #0056b3;
    border-radius: 4px;
    padding: 4px;
}

.message-section {
    margin-top: 20px;
    border-top: 1px solid #0056b3;
    padding-top: 15px;
}

.message-history {
    max-height: 200px;
    overflow-y: auto;
    background-color: #000033;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.message {
    margin-bottom: 10px;
    word-wrap: break-word;
}

.client-message {
    text-align: right;
    color: #c2c2f0;
}

.team-message {
    text-align: left;
    color: #a4e4ff;
}

.sender {
    font-weight: bold;
}

.message-form textarea {
    width: 100%;
    height: 60px;
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid #0056b3;
    background-color: #000033;
    color: #f0f0f0;
    border-radius: 4px;
}

.message-form button {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* --- Estilos para formulário de login --- */

.login-form {
    background-color: #000060;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
}

.login-form h1 {
    color: #f0f0f0;
    margin-bottom: 20px;
}

.login-form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #0056b3;
    background-color: #00004d;
    color: #f0f0f0;
    border-radius: 4px;
}

.login-form button {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.login-form button:hover {
    background-color: #0056b3;
}

/* --- Estilos para o painel da equipe --- */

.project-card h3 {
    border-bottom: none;
}

.project-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #0056b3;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.actions a,
.actions button {
    color: #f0f0f0;
    text-decoration: none;
    background-color: transparent;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.edit-btn {
    background-color: #007bff;
}

.edit-btn:hover {
    background-color: #0056b3;
}

.delete-btn {
    background-color: #dc3545;
}

.delete-btn:hover {
    background-color: #c82333;
}

.status-form-section {
    margin-top: 20px;
    border-top: 1px solid #0056b3;
    padding-top: 15px;
}
.status-form select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #0056b3;
    background-color: #00004d;
    color: #f0f0f0;
}
.status-form button {
    background-color: #007bff;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
}

.new-milestone-form {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #0056b3;
}
.new-milestone-form h4 {
    margin-bottom: 10px;
}
.new-milestone-form input,
.new-milestone-form select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #0056b3;
    background-color: #00004d;
    color: #f0f0f0;
    margin-right: 5px;
}
.new-milestone-form button {
    padding: 8px 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.financial-summary {
    margin-top: 20px;
    border-top: 1px solid #0056b3;
    padding-top: 15px;
    text-align: center;
}

.financial-summary h4 {
    margin-bottom: 10px;
}

.expense-section {
    margin-top: 20px;
    border-top: 1px solid #0056b3;
    padding-top: 15px;
    text-align: left;
}

.expense-form-add input {
    width: calc(33% - 10px);
    margin-right: 10px;
    padding: 8px;
    border: 1px solid #0056b3;
    background-color: #00004d;
    color: #f0f0f0;
    border-radius: 4px;
}

.expense-form-add button {
    padding: 8px 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.expenses-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background-color: #00004d;
    border-radius: 8px;
    overflow: hidden;
}

.expenses-table th, .expenses-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #000060;
}

.expenses-table th {
    background-color: #000060;
    color: #f0f0f0;
    font-weight: bold;
}

.expenses-table tr:last-child td {
    border-bottom: none;
}

/* --- Estilos para o Formulário de Proposta de Custos --- */
.proposal-form {
    text-align: left;
}
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.proposal-form input,
.proposal-form select {
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #0056b3;
    background-color: #00004d;
    color: #f0f0f0;
}
.proposal-form button {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
}
.proposal-result {
    margin-top: 30px;
    padding: 20px;
    background-color: #00004d;
    border-radius: 8px;
}
.proposal-result h3 {
    text-align: center;
    border-bottom: 1px solid #0056b3;
    padding-bottom: 10px;
}
.proposal-result .highlight {
    font-size: 1.2em;
    font-weight: bold;
    color: #a4e4ff;
    text-align: center;
}

/* --- Estilos para a lista de clientes --- */
table {
    width: 120%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #00004d;
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #000060;
}

th {
    background-color: #000060;
    color: #f0f0f0;
    font-weight: bold;
}

tr:last-child td {
    border-bottom: none;
}

.delete-button-styled {
    background-color: #e74c3c;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.delete-button-styled:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.delete-button-styled i {
    margin-right: 5px;
}

/* --- Estilos para a página de configurações --- */
.settings-main {
    max-width: 600px;
    width: 90%;
    margin-top: 250px;
    background-color: #000060;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-align: center;
}
.settings-form {
    text-align: left;
}
.settings-form label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: bold;
}
.settings-form input {
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #0056b3;
    background-color: #00004d;
    color: #f0f0f0;
}
.settings-form button {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
}
.back-link {
    display: block;
    margin-top: 20px;
    color: #007bff;
    text-decoration: none;
}
/* Container de cada item da lista de arquivos */
.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between; /* link de um lado, botão do outro */
    gap: 0.5rem;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 6px;
    background: #fafafa;
    transition: background 0.2s ease;
}

.file-item:hover {
    background: #f0f0f0;
}

/* Botão de excluir arquivos */
.delete-btn {
    background: #dc3545;       /* vermelho */
    color: white;
    border: none;
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s ease, transform 0.1s ease;
}

.delete-btn:hover {
    background: #b02a37;       /* vermelho mais escuro */
    transform: scale(1.05);
}

.delete-btn i {
    pointer-events: none;      /* ícone não "captura" clique */
}

/* Ajuste nos links dos arquivos */
.file-item a {
    flex: 1;                   /* ocupa todo o espaço restante */
    text-decoration: none;
    color: #004085;
    font-weight: 500;
    word-break: break-word;    /* quebra nomes longos */
}

.file-item a:hover {
    text-decoration: underline;
}

/* ===== FIX GLOBAL DE TAMANHO E LEGIBILIDADE (aplique no final do styles.css) ===== */

/* Base confortável em todas as páginas */
html, body {
    font-size: 16px;           /* garante 16px como base */
    line-height: 1.4;
}

/* Containers principais mais largos */
.container,
.main-container,
.page-container {
    max-width: 1280px;         /* antes devia estar 960px */
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Cartões/caixas padrão com mais respiro */
.card,
.panel,
.section,
.box {
    border-radius: 12px;
    padding: 20px;
}

/* Botões padrão mais “clicáveis” */
button,
.btn,
.btn-outline,
.btn-gold,
.btn-danger {
    font-size: 1rem;
    padding: 10px 16px;
    border-radius: 10px;
}

/* --------- Tabelas: fundo CINZA CLARO, nunca azul --------- */
table {
    width: 100%;
    border-collapse: collapse;
    background: #f8fafc;                /* cinza clarinho */
    color: #0f172a;                      /* cinza-azulado escuro para texto */
    font-size: 1rem;
}

th, td {
    padding: 10px 8px;
    border: 1px solid #e2e8f0;          /* borda leve */
    background: #f8fafc;                /* força o cinza claro nas células */
}

thead th {
    background: #f1f5f9;                /* cabeçalho um pouco mais marcado */
    font-weight: 700;
}

tbody tr:nth-child(even) td {
    background: #f9fafb;                /* listrado suave */
}

/* Caso algum tema antigo pinte o corpo da tabela de azul escuro */
table .row,
table tr,
table tbody {
    background: transparent !important;
}

/* Inputs padrão legíveis */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="file"],
select,
textarea {
    font-size: 1rem;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #003366;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.15); /* CINZA CLARO translúcido */
}

/* Tags e badges suaves (evita azuis muito escuros) */
.tag,
.badge {
    background: #e2e8f0;
    color: #0f172a;
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 700;
    font-size: .85rem;
}

/* Links em cards/tabelas: visíveis sobre cinza claro */
a {
    color: #0b5ea8;
}
a:hover {
    filter: brightness(1.1);
}

/* Mantém o fundo geral azul marinho já existente, sem levar o azul para dentro das caixas */

#team-panel input[name="discount_fixed"] {
    max-width: 130px;
}

#team-panel input[name="value"] {
    max-width: 160px;
}
