/* Importando uma fonte para um visual mais limpo e moderno */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

/* ---- CONFIGURAÇÕES GLOBAIS ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Poppins', sans-serif;
    background-color: #f4f7f6;
    color: #333;
    overflow-x: hidden; /* permite scroll vertical se necessário sem cortar footer */
}

/* ---- LAYOUT PRINCIPAL ---- */
.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* permite que o conteúdo cresça e footer apareça */
}

/* MUDANÇA: A REGRA .top-header FOI REMOVIDA */

.main-content {
    display: flex;
    flex-grow: 1;
}

.panel {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ---- PAINEL ESQUERDO ---- */
.left-panel {
    /* Fundo com escritório (central manter; bordas podem cortar) */
    background-image: linear-gradient(rgba(0,0,0,0.15), rgba(0,0,0,0.15)), url('../imagens/Nwallpaper2.png');
    background-size: cover; /* garante preenchimento total */
    background-position: center center; /* foca no centro da imagem */
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    /* Mais vida: aumenta saturação/contraste/brilho sem invadir o centro */
    filter: saturate(1.32) contrast(1.10) brightness(1.05);
    will-change: filter;
}

.left-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Vinheta e luz direita ainda mais finas/sutis */
    box-shadow: inset 0 0 60px rgba(0,0,0,0.16), 28px 0 60px -54px rgba(255,255,255,0.66);
    z-index: 1;
    pointer-events: none;
}

/* Overlay de cor para dar "vida" usando mistura suave */
.left-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background:
        /* Vida e cor central/esquerda (ainda mais contido no centro) */
        radial-gradient(46% 46% at 30% 40%, rgba(33,115,70,0.22) 0%, rgba(33,115,70,0.0) 52%),
        /* Transição suave para branco mais estreita e iniciando um pouco mais à direita */
        linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.03) 76%, rgba(255,255,255,0.20) 85%, rgba(255,255,255,0.45) 92%, rgba(255,255,255,0.75) 98%, #ffffff 100%),
        /* Tonalidade institucional leve */
        linear-gradient(115deg, rgba(33,115,70,0.15) 0%, rgba(255,200,0,0.05) 50%, rgba(0,0,0,0) 100%);
    mix-blend-mode: normal;
}

/* Borda direita extra difusa (ajustada acima no ::before) */

.logomarca {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    /* Compatível: caso mantenha imagem de logomarca */
    width: 100%;
    max-width: 640px;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.7));
}

.light-beam {
    position: absolute;
    top: 0;
    left: -150px;
    width: 100px;
    height: 110%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    animation: sweep 5s infinite ease-in-out;
    animation-delay: 2s;
    z-index: 3;
}

@keyframes sweep {
    0% { left: -150px; }
    100% { left: 120%; }
}

/* Branding da Transpare */
.brand-hero {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    padding: 2rem;
    width: 100%;
}

.brand-title {
    font-size: clamp(2.4rem, 4.5vw + 1rem, 5.4rem);
    font-weight: 800;
    letter-spacing: 0.18em;
    text-shadow: 0 8px 25px rgba(0,0,0,0.45), 0 2px 4px rgba(0,0,0,0.35);
    line-height: 1.05;
    margin-bottom: 0.4rem;
    animation: fadeInDown 800ms ease both;
}

.brand-subtitle {
    font-size: clamp(0.9rem, 1.2vw + 0.4rem, 1.4rem);
    font-weight: 500;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    opacity: 0.95;
    animation: fadeInUp 900ms 120ms ease both;
}

@keyframes fadeInDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0);} }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0);} }

/* ---- PAINEL DIREITO ---- */
.right-panel {
    background-color: #fff;
    padding: 1.5rem; /* compacta um pouco nas laterais e vertical */
}

/* MELHORIA: LOGIN-CONTAINER COMO UM "CARD" */
.login-container {
    width: 100%;
    max-width: 340px;
    background-color: #ffffff;
    padding: 1.9rem 1.6rem;
    border-radius: 12px;
    box-shadow: 0 7px 22px rgba(0, 0, 0, 0.07);
    margin: 0.6rem;
}

.login-container h2 {
    font-size: 1.72rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.45rem;
    text-align: center;
}

.input-group {
    margin-bottom: 0.95rem;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* MELHORIA: REESTILIZAÇÃO DOS INPUTS */
.input-group input {
    width: 100%;
    padding: 1rem 0.8rem;
    border: 1px solid #e0e0e0;
    border-radius: 10px; /* Mais arredondado */
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fafafa; /* Fundo levemente cinza */
}

.input-group input:focus {
    outline: none;
    border-color: #217346;
    box-shadow: 0 0 0 3px rgba(33, 115, 70, 0.2);
    background-color: #fff;
}

/* MELHORIA: ESPAÇO PARA O ÍCONE NO CAMPO DE SENHA */
input[name="senha"] {
    padding-right: 3.5rem; /* Adiciona espaço à direita para o ícone */
}

/* MELHORIA: ESTILO DO BOTÃO DE VER SENHA */
.toggle-password {
    position: absolute;
    bottom: 1px; /* Alinha com a parte de baixo do input */
    right: 1px; /* Alinha com a parte da direita do input */
    height: calc(100% - 2.5rem); /* Altura do input (altura total - label) */
    width: 50px;
    background: transparent;
    border: none;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
    color: #aaa;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #333;
}

/* MELHORIA: ESTILO DAS OPÇÕES "LEMBRAR-ME" */
.options-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.05rem;
    font-size: 0.85rem;
}

.remember-me {
    display: flex;
    align-items: center;
}

.remember-me input[type="checkbox"] {
    margin-right: 0.5rem;
    /* Estilos para o checkbox (opcional, mas recomendado) */
    width: 1em;
    height: 1em;
    accent-color: #217346;
}

.remember-me label {
    margin-bottom: 0;
    font-weight: 400;
    color: #555;
    cursor: pointer;
}

.forgot-password {
    color: #217346;
    text-decoration: none;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}


/* MELHORIA: REESTILIZAÇÃO DO BOTÃO DE LOGIN */
.login-button {
    width: 100%;
    padding: 0.75rem 0.85rem;
    border: none;
    border-radius: 10px;
    background-color: #217346;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(33, 115, 70, 0.16);
}

.login-button:hover {
    background-color: #1e663e;
    transform: translateY(-2px); /* Efeito de "levantar" */
    box-shadow: 0 6px 20px rgba(33, 115, 70, 0.3);
}

/* Botão extra abaixo do login (Área do Cliente) */
.client-button {
    width: 100%;
    margin-top: 0.65rem;
    padding: 0.75rem 0.85rem;
    border: none;
    border-radius: 10px;
    background-color: #0d6efd;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(13, 110, 253, 0.18);
    display: block;
    text-align: center;
    text-decoration: none;
}

.client-button:hover {
    background-color: #0b5ed7;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.28);
}

.client-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.28), 0 6px 20px rgba(13, 110, 253, 0.28);
}

/* ---- MODAL (ÁREA DO CLIENTE) ---- */
body.modal-open {
    overflow: hidden;
}

.client-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 9999;
    background: rgba(2, 6, 23, 0.62);
    backdrop-filter: blur(10px);
}

.client-modal.open { display: flex; }

.client-modal-panel {
    width: min(520px, 100%);
    border-radius: 18px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(255,255,255,0.55);
    box-shadow: 0 30px 85px rgba(0,0,0,0.45);
    overflow: hidden;
    transform: none;
    opacity: 1;
    animation: none;
}

/* Anima entrada apenas quando o modal estiver aberto */
.client-modal.open .client-modal-panel {
    animation: clientModalIn 220ms ease both;
}

.client-modal-panel.shake {
    animation: clientShake 300ms ease;
}

@keyframes clientShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

@keyframes clientModalIn {
    from { transform: translateY(10px) scale(0.985); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

.client-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 16px 12px 16px;
    border-bottom: 1px solid rgba(17,24,39,0.08);
    background:
        radial-gradient(680px 220px at 12% 10%, rgba(13,110,253,0.18), transparent 55%),
        radial-gradient(680px 220px at 88% 0%, rgba(33,115,70,0.16), transparent 55%),
        linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.86));
}

.client-modal-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.client-modal-badge {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(13,110,253,0.12);
    border: 1px solid rgba(13,110,253,0.18);
    color: #0b5ed7;
    flex-shrink: 0;
}

.client-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    color: #0f172a;
}

.client-modal-header p {
    margin: 2px 0 0 0;
    font-size: 0.86rem;
    color: #6b7280;
}

.client-modal-close {
    border: 1px solid rgba(17,24,39,0.12);
    background: rgba(255,255,255,0.7);
    color: #0f172a;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.08s ease, background 0.2s ease, border-color 0.2s ease;
}

.client-modal-close:hover {
    background: #fff;
    border-color: rgba(13,110,253,0.22);
}

.client-modal-close:active { transform: translateY(1px); }

.client-modal-body {
    padding: 16px;
    display: grid;
    gap: 12px;
}

.client-field label {
    display: block;
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
}

.client-input {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    border: 1px solid rgba(17,24,39,0.12);
    border-radius: 14px;
    background: rgba(249,250,251,0.95);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.client-input i {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0b5ed7;
    background: rgba(13,110,253,0.10);
    border-right: 1px solid rgba(17,24,39,0.08);
}

.client-input input {
    width: 100%;
    padding: 12px 12px;
    border: 0;
    outline: none;
    font-size: 1rem;
    background: transparent;
}

.client-input:focus-within {
    border-color: rgba(13,110,253,0.35);
    box-shadow: 0 0 0 4px rgba(13,110,253,0.14);
    background: #fff;
}

.client-pass-toggle {
    border: 0;
    background: transparent;
    padding: 0 12px;
    height: 44px;
    cursor: pointer;
    color: #64748b;
}

.client-pass-toggle:hover { color: #0f172a; }

.client-modal-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    margin-top: 2px;
}

.client-modal-submit {
    position: relative;
    width: 100%;
    border: 0;
    border-radius: 14px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #217346, #278953);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(33,115,70,0.22);
    transition: transform 0.08s ease, box-shadow 0.2s ease;
}

.client-modal-submit:hover { box-shadow: 0 14px 34px rgba(33,115,70,0.28); }
.client-modal-submit:active { transform: translateY(1px); }

.client-modal-submit .dots {
    display: none;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    gap: 4px;
}

.client-modal-submit .dots span {
    width: 5px;
    height: 5px;
    border-radius: 99px;
    background: rgba(255,255,255,0.9);
    animation: clientDot 0.9s infinite ease-in-out;
}

.client-modal-submit .dots span:nth-child(2) { animation-delay: 0.12s; }
.client-modal-submit .dots span:nth-child(3) { animation-delay: 0.24s; }

@keyframes clientDot {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(-4px); opacity: 1; }
}

.client-modal-submit.loading .txt { opacity: 0.75; }
.client-modal-submit.loading .dots { display: inline-flex; }

.client-modal-link {
    border: 1px solid rgba(13,110,253,0.20);
    background: rgba(13,110,253,0.10);
    color: #0b5ed7;
    padding: 10px 12px;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.client-modal-link:hover {
    background: rgba(13,110,253,0.14);
    border-color: rgba(13,110,253,0.28);
}

.client-help {
    border: 1px dashed rgba(17,24,39,0.18);
    border-radius: 16px;
    padding: 12px;
    background: rgba(255,255,255,0.75);
}

.client-help-title {
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.client-help-title i {
    color: #16a34a;
}

.client-help-title i.pulse {
    animation: waPulse 950ms ease-in-out 2;
}

@keyframes waPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.16); }
}

.client-help-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.client-wa {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 14px;
    text-decoration: none;
    border: 1px solid rgba(34,197,94,0.22);
    background: rgba(34,197,94,0.10);
    color: #0f172a;
    position: relative;
    overflow: hidden;
    transform: translateY(6px);
    opacity: 0;
    transition: transform 0.18s ease, opacity 0.18s ease, border-color 0.2s ease, background 0.2s ease;
}

.client-wa:hover { border-color: rgba(34,197,94,0.36); background: rgba(34,197,94,0.14); }
.client-wa .who { font-weight: 800; }
.client-wa .num { font-size: 0.86rem; color: #475569; }

.client-wa .cta {
    margin-top: 8px;
    font-size: 0.82rem;
    font-weight: 800;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.client-wa .cta i { color: #16a34a; }

.client-wa::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(360px 120px at 20% 0%, rgba(255,255,255,0.45), transparent 55%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.client-wa:hover::after { opacity: 1; }

.client-wa.in {
    transform: translateY(0);
    opacity: 1;
}

.client-wa.tap {
    transform: translateY(0) scale(0.985);
}

.client-help-note {
    margin-top: 8px;
    font-size: 0.82rem;
    color: #64748b;
}

.client-modal-error {
    min-height: 18px;
    font-size: 0.86rem;
    color: #b00020;
    text-align: center;
}

.client-modal-error.show { padding-top: 2px; }

.client-condo-choice {
    border: 1px solid rgba(17,24,39,0.10);
    border-radius: 16px;
    padding: 12px;
    background: rgba(255,255,255,0.78);
}

.client-condo-title {
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 10px;
}

.client-condo-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.client-condo-btn {
    width: 100%;
    text-align: left;
    border: 1px solid rgba(13,110,253,0.18);
    background: rgba(13,110,253,0.08);
    color: #0f172a;
    border-radius: 14px;
    padding: 12px 12px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.08s ease, background 0.2s ease, border-color 0.2s ease;
}

.client-condo-btn:hover {
    background: rgba(13,110,253,0.12);
    border-color: rgba(13,110,253,0.28);
}

.client-condo-btn:active { transform: translateY(1px); }

@media (max-width: 520px) {
    .client-help-grid { grid-template-columns: 1fr; }
    .client-modal-actions { grid-template-columns: 1fr; }
    .client-modal-link { width: 100%; }
}

/* ---- RODAPÉ ---- */
.site-footer {
    background-color: #212529;
    color: #f8f9fa;
    padding: 0.65rem 1.35rem;
    text-align: center;
    flex-shrink: 0;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem; /* leve redução */
    margin-bottom: 0.35rem;
}

.footer-content a, .footer-content span {
    color: #f8f9fa;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-content a:hover {
    color: #217346;
}

.footer-content i {
    margin-right: 8px;
}

/* MUDANÇA: Ajustes para o texto de copyright e desenvolvedor */
.developer-credit {
    font-size: 0.7rem;
    color: #adb5bd;
    margin-top: 0.4rem;
    padding-top: 0.4rem;
    border-top: 1px solid #495057;
    line-height: 1.3;
}

.developer-credit p {
    margin: 0; /* Remove margens extras dos parágrafos */
}

/* ---- AJUSTES PARA TELAS MENORES ---- */
@media (max-width: 768px) {
    html, body {
        overflow: auto;
    }
    .main-content {
        flex-direction: column;
    }
    .left-panel {
        display: none;
    }
    .right-panel {
        min-height: calc(100vh - 150px);
    }
    
    /* MELHORIA: Centraliza o card em telas móveis */
    .login-container {
        padding: 2rem 1.5rem;
        margin: 0;
        box-shadow: none;
        border-radius: 0;
    }
}

/* Fixes responsivos globais: previne scroll horizontal e garante imagens responsivas */
html, body { max-width: 100%; overflow-x: hidden; }
img, .logomarca { max-width: 100%; height: auto; display: block; }
.page-container, .main-content { box-sizing: border-box; }