:root {
    --primary-color: #00003c;
    --secondary-color: #d4ad68;
    --terciary-color: #486f99;
    --white: #FFFFFF;
    
    --text-gray: #555555;
    --border-color: #e0e0e0;
    --bg-light: #f9f9f9;

    --bg-overlay: rgba(5, 5, 15, 0.6);
    --bg-overlay-deep: rgba(0, 0, 10, 0.65);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-image:
        radial-gradient(circle at 80% 20%, rgba(0, 0, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(0, 0, 60, 0.2) 0%, transparent 40%),
        linear-gradient(var(--bg-overlay), var(--bg-overlay-deep)),
        url('../img/bg.jpg'); /* Substitua pela imagem da nova marca */
    background-size: cover;
    background-position: center;
    color: var(--white);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Container Principal */
.login-container {
    display: flex;
    width: 90%;
    max-width: 1100px;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
}

/* Lado Esquerdo */
.login-left {
    flex: 1;
}

 .logo img{
    width:220px;
    max-width:100%;
    margin-bottom:25px;
}

.login-left h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    line-height: 1.2;
}

.login-left p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.5;
}

/* Lado Direito (Card) */
.login-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.login-card {
    background-color: var(--white);
    color: var(--primary-color);
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.login-card h3 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.4rem;
    color: var(--primary-color);
}

/* Botões CPF / CNPJ */
.toggle-buttons {
    display: flex;
    margin-bottom: 25px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.btn-toggle {
    flex: 1;
    padding: 12px;
    border: none;
    background: var(--white);
    color: var(--text-gray);
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-toggle.active {
    background: var(--secondary-color);
    color: var(--white);
}

/* Inputs do Formulário */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: var(--secondary-color);
}

/* Botão Acessar */
.btn-submit {
    width: 100%;
    padding: 15px;
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

.btn-submit:hover {
    background-color: #b89556; /* Tom levemente mais escuro do secundário */
}

.btn-submit:active {
    transform: scale(0.98);
}


/* ------------------------------------------------------------------------------------------------- */

/* --- ESTILOS DO PAINEL LOGADO (CONTRATOS, PARCELAS, ETC) --- */

/* Fundo cinza claro para destacar os cards brancos, diferente da tela de login */
body.bg-gray {
    background-color: #f4f5f7;
    background-image: none;
    display: block; /* Remove o flex do login para o fluxo normal da página */
    height: auto;
    min-height: 100vh;
}

/* Header */
.main-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 20px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header-content {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* .logo-text {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 1px;
} */

/* Remova a classe .logo-text antiga e adicione esta: */
.logo-img {
    max-width: 150px; /* Ajuste este valor de acordo com o tamanho real do seu logo */
    height: auto;
    display: block;
}

.user-info p {
    font-size: 0.9rem;
    color: #e0e0e0;
    margin-bottom: 3px;
}

/* .btn-logout {
    background-color: var(--white);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-logout:hover {
    background-color: var(--secondary-color);
    color: var(--white);
} */

.btn-logout {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--white);
}

.btn-logout:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

/* .header-actions i {
    color: red;
} */

/* Container Principal (Miolo da página) */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 40px auto;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-gray);
    font-size: 1.1rem;
}



/* ------------------------------------ Caixa de Contato ------------------------------------ */

.contact-box{
    margin-top:20px;
    text-align:center;
    width:100%;
    max-width:450px;
}

.contact-box p{
    font-size:1rem;
    margin-bottom:12px;
    opacity:0.9;
}

/* Botões */

.contact-buttons{
    display:flex;
    gap:10px;
    justify-content:center;
    flex-wrap:wrap;
}

.contact-btn{
    display:flex;
    align-items:center;
    gap:8px;
    
    padding:10px 16px;
    font-size:1rem;
    font-weight:600;

    text-decoration:none;

    border-radius:6px;

    background:rgba(255,255,255,0.08);
    border:1px solid rgba(255,255,255,0.2);

    color:var(--white);

    transition:all .2s ease;
}

/* Hover */

.contact-btn:hover{
    background:var(--secondary-color);
    border-color:var(--secondary-color);
}

/* Ícone */

.contact-btn .icon{
    font-size:1rem;
}

/* --- LAYOUT DO DASHBOARD --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

/* Cards Gerais */
.card {
    background: var(--white);
    border-radius: 10px;
    padding: 25px;
    /* box-shadow: 0 2px 10px rgba(0,0,0,0.05); */
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.card-header h2 {
    font-size: 1.2rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* Informações do Contrato */
.contract-info {
    display: flex;
    gap: 60px;
}

.contract-info div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contract-info span {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.contract-info strong {
    font-size: 1.1rem;
    color: var(--primary-color);
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-warning {
    background-color: #fdf3eb;
    color: #c84040;
}

/* Lista de Parcelas */
.parcel-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
}

.parcel-icon {
    width: 40px;
    height: 40px;
    background-color: #f4f5f7;
    color: #c84040;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    margin-right: 15px;
}

/* .parcel-item:last-child .parcel-icon {
    color: var(--terciary-color);
} */

.parcel-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.parcel-details strong {
    color: var(--primary-color);
    font-size: 1rem;
}

.parcel-details span {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-top: 3px;
}

.parcel-value {
    text-align: right;
    display: flex;
    flex-direction: column;
}

.parcel-value strong {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.parcel-value .status {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 3px;
}

.status.atrasada { color: #c84040; }
.status.atual { color: var(--terciary-color); }

/* --- CARD DE RESUMO (DIREITA) --- */
.summary-card {
    background: var(--white);
    border-radius: 12px;
    /* box-shadow: 0 5px 15px rgba(0,0,0,0.08); */
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.summary-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 30px 20px;
    text-align: center;
    position: relative;
}

/* Detalhe visual de círculos no fundo escuro */
.summary-header::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -20px;
    width: 150px;
    height: 150px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 50%;
}

.summary-header span {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    opacity: 0.9;
}

.summary-header h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-top: 10px;
}

.summary-body {
    padding: 25px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: var(--text-gray);
}

.summary-row strong {
    color: var(--primary-color);
}

.btn-boleto {
    width: 100%;
    padding: 16px;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s;
}

.btn-boleto:hover {
    background-color: #b89556;
}

.summary-footer {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.summary-footer i {
    font-size: 1.2rem;
    color: var(--text-gray);
}

.summary-footer p {
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 1.4;
}

/* Responsividade Básica */
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* ################################################################################## */

/* --- ESTADO DE SUCESSO DO BOLETO --- */
.success-box {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: #166534;
    margin-bottom: 25px;
}

.success-box i {
    font-size: 2rem;
    color: #22c55e;
    margin-bottom: 10px;
}

.success-box h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.success-box p {
    font-size: 0.9rem;
    color: #15803d;
}

.barcode-section {
    margin-bottom: 20px;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.barcode-box {
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

#linha-digitavel {
    font-family: 'Courier New', Courier, monospace;
    /* font-size: 1.05rem; */
    font-size: 0.95rem;
    color: #1f2937;
    margin-bottom: 15px;
    word-break: break-all;
    font-weight: 600;
}

.btn-copy {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.btn-copy:hover {
    background-color: #000020; /* Tom mais escuro do azul do Safra */
}

.btn-download-pdf {
    width: 100%;
    padding: 14px;
    background-color: transparent;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-download-pdf:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

/* ========================================= */
/* RESPONSIVIDADE - TELA DE LOGIN            */
/* ========================================= */

/* Ajustes para Tablets e telas médias */
@media (max-width: 992px) {
    /* Remove a altura fixa do body na tela de login para permitir rolagem se necessário */
    body:not(.bg-gray) {
        height: auto;
        min-height: 100vh;
        padding: 40px 0;
    }

    /* Empilha o lado esquerdo (textos) e o direito (card) */
    .login-container {
        flex-direction: column;
        gap: 40px;
        text-align: center;
        justify-content: center;
    }

    .login-left {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .login-right {
        width: 100%;
        align-items: center;
    }
}

/* Ajustes para Celulares (Telas pequenas) */
@media (max-width: 768px) {
    .login-container {
        gap: 25px;
    }

    /* Diminui o espaçamento interno do card para ganhar espaço na tela */
    .login-card {
        /* Reduz o padding interno (ex: 20px em cima/embaixo e 15px nas laterais) */
        padding: 20px 15px; 
        
        /* Remove ou diminui qualquer margem externa extra */
        margin: 0; 
        
        /* Opcional: diminuir um pouco o arredondamento das bordas para combinar com o tamanho menor */
        border-radius: 8px; 
    }

    /* Ajusta os tamanhos de fonte do texto de boas-vindas do card */
    .login-card h3 {
        /* font-size: 1.2rem; */
        margin-bottom: 10px;
    }

    /* Ajusta os tamanhos de fonte do texto de boas-vindas */
    .login-left h2 {
        font-size: 1.6rem;
    }

    .login-left p {
        font-size: 1rem;
    }

    /* Empilha os botões de contato (WhatsApp, Telefone, Email) */
    /* .contact-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .contact-btn {
        justify-content: center;
    } */
}