/* Reset e normalização */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
/* =========================================================
   APPA LICITAÇÕES - TEMA SAAS (GLASSMORPHISM)
   ========================================================= */

/* 1. VARIÁVEIS DE CORES (Facilita a mudança de tema no futuro) */
:root {
    --primary-blue: #0d6efd;
    --primary-hover: #0b5ed7;
    --accent-yellow: #ffc107;
    --background-dark: #121212;
    --text-light: #f8fafc;
    --text-muted: #cbd5e1;
    --glass-bg: rgba(15, 23, 42, 0.75); /* Azul muito escuro e translúcido */
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* 2. RESET GERAL */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: var(--text-light);
    min-height: 100vh;
    /* Imagem de fundo deve ser declarada no HTML ou aqui.
       Usei um fallback escuro caso a imagem demore a carregar */
    background-color: var(--background-dark);
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
}

/* 3. NAVBAR TOP */
.navbar {
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    text-decoration: none;
    letter-spacing: 0.5px;
}

.navbar-brand span {
    color: var(--accent-yellow);
}

.navbar-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    margin-left: 1.5rem;
    transition: color 0.3s ease;
}

.navbar-links a:hover {
    color: var(--accent-yellow);
}

/* 4. SESSÃO HERO (Títulos de impacto) */
.hero-section {
    text-align: center;
    max-width: 800px;
    margin: 3rem auto 2rem;
    padding: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    animation: fadeInDown 0.8s ease-out;
}

.hero-section h1 {
    font-size: 2.5rem;
    color: var(--accent-yellow);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-section p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* 5. FORMULÁRIO DJANGO (O Painel Principal) */
.form-container {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 2.5rem;
    border-radius: 16px;
    max-width: 600px;
    margin: 0 auto 4rem;
    animation: fadeInUp 0.8s ease-out;
}

.form-container h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--text-light);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

/* Mágica para o {{ form.as_p }} do Django ficar perfeito */
.form-container p {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.2rem;
}

.form-container label {
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    color: var(--text-light);
}

.form-container input,
.form-container select,
.form-container textarea {
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-container input:focus,
.form-container select:focus,
.form-container textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    background-color: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

/* Textos de ajuda e erros gerados pelo Django */
.form-container span.helptext {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.errorlist {
    color: #ff6b6b;
    list-style: none;
    font-size: 0.85rem;
    margin-top: 0.3rem;
    font-weight: bold;
}

/* 6. BOTÕES PRINCIPAIS */
.btn-primary {
    display: inline-block;
    width: 100%;
    background-color: var(--primary-blue);
    color: #fff;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s;
    margin-top: 1rem;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* 7. MENSAGENS (Sucesso / Erro) */
.messages-container {
    max-width: 600px;
    margin: 1rem auto;
}

.message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 600;
    text-align: center;
    backdrop-filter: blur(8px);
}

.message.success {
    background-color: rgba(25, 135, 84, 0.2);
    border: 1px solid #198754;
    color: #4ade80;
}

.message.error {
    background-color: rgba(220, 53, 69, 0.2);
    border: 1px solid #dc3545;
    color: #ff8a8a;
}

/* 8. ANIMAÇÕES SUAVES */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

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