/* FORÇAR FUNDO BEGE */

html {
    background: #e8e4d9 !important;
    background-color: #e8e4d9 !important;
}

body {
    background: #e8e4d9 !important;
    background-color: #e8e4d9 !important;
    background-image: linear-gradient(to bottom, #e8e4d9 0%, #d4cdb8 100%) !important;
}

/* Garantir que seções da HOME sejam transparentes */
#hero {
    background: transparent !important;
}

/* FORÇAR containers de conteúdo com fundo branco */
.auth-container,
.dashboard-area,
.form-generator-area,
.plan-view-area,
.institutional-area,
section[class*="area"],
section[class*="container"],
main,
article,
.content,
.page-content,
.main-content {
    background: rgba(255, 255, 255, 0.95) !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
}

/* Cards e features mantêm seus fundos */
.feature-item,
.card,
.box {
    background: rgba(255, 255, 255, 0.8) !important;
    background-color: rgba(255, 255, 255, 0.8) !important;
}

#features {
    background: rgba(255, 255, 255, 0.4) !important;
    background-color: rgba(255, 255, 255, 0.4) !important;
}

/* CSS COM ESTILO CADERNO */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    font-family: Arial, sans-serif;
    background-attachment: fixed !important;
    color: #333;
    min-height: 100vh;
    position: relative;
}

/* Linhas horizontais do caderno */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(
            transparent,
            transparent 30px,
            rgba(139, 69, 19, 0.1) 30px,
            rgba(139, 69, 19, 0.1) 31px
        );
    pointer-events: none;
    z-index: 0;
}

/* Linha vermelha da margem */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 80px;
    width: 2px;
    height: 100%;
    background: rgba(220, 20, 60, 0.4);
    pointer-events: none;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 0 100px;
    position: relative;
    z-index: 2;
}

/* HEADER */
#main-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 3px solid rgba(139, 69, 19, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: #8b4513;
    font-size: 24px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.logo a {
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: #333;
    padding: 8px 15px;
    transition: color 0.3s;
    position: relative;
}

nav a:hover {
    color: #8b4513;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #8b4513;
    transition: width 0.3s;
}

nav a:hover::after {
    width: 100%;
}

.nav-cta {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    color: white !important;
    border-radius: 5px;
    border: 2px solid #5d2e0f;
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.3);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.4);
}

.nav-cta::after {
    display: none;
}

/* CONTEÚDO */
#hero {
    text-align: center;
    padding: 80px 20px;
}

#hero h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #2c3e50;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.05);
}

#hero .subtitle {
    font-size: 1.2em;
    color: #555;
    margin-bottom: 30px;
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    border: 3px solid #5d2e0f;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
}

.hero-image-placeholder {
    height: 300px;
    background: rgba(255, 255, 255, 0.7);
    margin-top: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px dashed #8b4513;
    color: #8b4513;
    font-size: 20px;
}

#features {
    padding: 60px 20px;
    margin: 40px 0;
    border-top: 3px solid rgba(139, 69, 19, 0.15);
    border-bottom: 3px solid rgba(139, 69, 19, 0.15);
}

#features h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2em;
    color: #2c3e50;
}

.feature-list {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.feature-item {
    flex: 1;
    min-width: 250px;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #8b4513;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(139, 69, 19, 0.2);
}

.feature-item h3 {
    color: #8b4513;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.feature-item p {
    color: #555;
}

/* FORMULÁRIOS */
.auth-container {
    max-width: 400px;
}

.auth-container,
.dashboard-area,
.form-generator-area,
.plan-view-area,
.institutional-area {
    padding: 40px;
    margin: 40px auto;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    max-width: 1100px;
    border: 2px solid rgba(139, 69, 19, 0.15);
    position: relative;
    z-index: 2;
}

.auth-container h1, 
.auth-container h2 {
    text-align: center;
    color: #8b4513;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
}

input[type="text"], 
input[type="email"], 
input[type="password"], 
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ccc;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 1em;
    transition: border-color 0.3s;
}

input:focus, 
textarea:focus, 
select:focus {
    border-color: #8b4513;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(139, 69, 19, 0.25);
    background: #fff;
}

.login-link {
    text-align: center;
    margin-top: 15px;
}

.login-link a {
    color: #8b4513;
    text-decoration: none;
    font-weight: bold;
}

.login-link a:hover {
    text-decoration: underline;
}

/* FOOTER */
#main-footer {
    background: rgba(44, 62, 80, 0.95);
    color: white;
    padding: 40px 20px;
    margin-top: 60px;
    border-top: 3px solid #8b4513;
    position: relative;
    z-index: 2;
}

.footer-grid {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    border-bottom: 1px solid #495057;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-col h3 {
    color: #a0522d;
    margin-bottom: 15px;
}

.footer-col ul {
    list-style: none;
}

.footer-col a {
    color: #ccc;
    text-decoration: none;
    line-height: 2;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: #a0522d;
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9em;
}

/* MOBILE */
@media (max-width: 768px) {

        /* FIX password toggle no mobile */
    .password-wrapper {
        position: relative !important;
        display: block !important;
    }

    .password-wrapper input {
        padding-right: 52px !important;
    }

    .password-wrapper .password-toggle {
        position: absolute !important;
        right: 12px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 10 !important;
    }


    /* Ajustar margem do caderno no mobile */
    body::after {
        left: 30px;
    }

    .container {
        padding: 0 15px 0 50px;
    }

    /* ESCONDER HEADER NO MOBILE (COMO ERA ANTES) */
    #main-header {
        display: none !important;
    }

    /* BOTÃO HAMBURGER SEMPRE VISÍVEL */
    #menu-btn {
        display: flex !important;
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 1000;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* MENU FECHADO POR PADRÃO */
    #main-header nav {
        display: none;
    }

    /* MENU ABERTO VIA JS */
    #main-header nav.active {
        display: block;
        position: fixed;
        top: 60px;
        right: 15px;
        background: #fff;
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 8px 20px rgba(0,0,0,0.2);
        z-index: 999;
    }

    #main-header nav ul {
        flex-direction: column;
        gap: 10px;
    }

    #hero h1 {
        font-size: 1.8em;
    }

    #hero .subtitle {
        font-size: 1em;
    }

    .feature-list {
        flex-direction: column;
    }

    .footer-grid {
        flex-direction: column;
    }
}

/* DESKTOP */
@media (min-width: 769px) {

    /* GARANTIR HEADER NO DESKTOP */
    #main-header {
        display: block !important;
    }

    /* DESKTOP - Esconder botão hamburguer */
    #menu-btn,
    #mobile-menu,
    #menu-overlay {
        display: none !important;
    }
}

/* ===============================
   FIX DEFINITIVO – CARD PRIMÁRIO
   =============================== */

/* Força o fundo do card acima do container branco */
.dashboard-area .dashboard-grid .primary-module {
    background-color: #4f46e5 !important; /* cor visível */
}

/* Força o texto do card */
.dashboard-area .dashboard-grid .primary-module h2,
.dashboard-area .dashboard-grid .primary-module p,
.dashboard-area .dashboard-grid .primary-module .module-action {
    color: #ffffff !important;
}

/* css do icone de ocultar e ver senha */
/* === PASSWORD TOGGLE – FIX DEFINITIVO (DESKTOP + MOBILE) === */

.password-wrapper {
    position: relative !important;
    display: block !important;
    width: 100%;
}

.password-wrapper input {
    width: 100%;
    padding-right: 52px !important;
    box-sizing: border-box;
}

.password-wrapper .password-toggle {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999 !important;
    cursor: pointer;
}

.password-wrapper .password-toggle svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
}
