@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

*{
margin:0;
padding:0;
box-sizing:border-box;
}

body{
font-family:'Inter',sans-serif;
background:#f5f7fb;
color:#1e293b;
}

/* LOGIN */

.auth-container{
min-height:100vh;
display:flex;
align-items:center;
justify-content:center;
padding:30px;
}

.auth-card{
width:100%;
max-width:500px;
background:#fff;
border-radius:24px;
padding:40px;
box-shadow:0 20px 50px rgba(0,0,0,.08);
}

.logo{
text-align:center;
margin-bottom:10px;
}

.auth-logo-img{
max-height:110px;
width:auto;
}

.subtitle{
color:#64748b;
margin-top:8px;
margin-bottom:30px;
}

.form-control{
width:100%;
height:55px;
padding:0 15px;
border:1px solid #e2e8f0;
border-radius:14px;
margin-bottom:15px;
font-size:15px;
}

.password-wrap{
position:relative;
}

.password-wrap .form-control{
padding-right:50px;
}

.password-toggle{
position:absolute;
right:14px;
top:0;
height:55px;
background:none;
border:none;
cursor:pointer;
font-size:18px;
line-height:1;
}

.blocked-icon{
text-align:center;
font-size:48px;
margin-bottom:5px;
}

.form-control:focus{
outline:none;
border-color:#ff6b00;
}

.btn-primary{
width:100%;
height:55px;
background:#ff6b00;
border:none;
border-radius:14px;
color:white;
font-weight:700;
cursor:pointer;
transition:.2s;
}

.btn-primary:hover{
background:#e85f00;
}

/* DASHBOARD */

.sidebar{
position:fixed;
left:0;
top:0;
width:260px;
height:100vh;
background:#111827;
padding:25px;
}

.sidebar-logo{
margin-bottom:40px;
}

.sidebar-logo-img{
max-height:64px;
width:auto;
display:block;
}

.sidebar a{
display:block;
padding:14px 18px;
border-radius:12px;
color:#cbd5e1;
text-decoration:none;
margin-bottom:8px;
font-weight:600;
}

.sidebar a:hover{
background:#1f2937;
color:#fff;
}

.main{
margin-left:260px;
padding:35px;
}

.page-title{
font-size:32px;
font-weight:800;
}

.page-subtitle{
color:#64748b;
margin-top:5px;
}

.welcome-hero{
margin-top:40px;
background:linear-gradient(135deg,#fff7f0,#ffffff);
border:1px solid #ffe4cc;
border-radius:28px;
padding:70px 40px;
text-align:center;
max-width:640px;
margin-left:auto;
margin-right:auto;
}

.welcome-hero-icon{
font-size:56px;
margin-bottom:10px;
}

.welcome-hero h1{
font-size:28px;
font-weight:800;
color:#1e293b;
margin-bottom:16px;
}

.welcome-hero p{
color:#64748b;
font-size:16px;
line-height:1.6;
max-width:460px;
margin:0 auto 30px;
}

.welcome-hero-btn{
display:inline-block;
width:auto;
padding:0 32px;
text-decoration:none;
line-height:55px;
}

.upload-box{
margin-top:20px;
border:2px dashed #cbd5e1;
padding:40px;
border-radius:20px;
text-align:center;
background:#fafafa;
}

.upload-box:hover{
border-color:#ff6b00;
}

.upload-box input[type=file]{

margin-top:20px;

padding:12px;

background:white;

border-radius:12px;

width:100%;
}

.upload-box h3{

margin-bottom:20px;
}

.alert-success{

background:#dcfce7;

color:#166534;

padding:18px;

border-radius:14px;

margin-top:20px;

font-weight:600;

}

.alert-error{

background:#fee2e2;

color:#991b1b;

padding:18px;

border-radius:14px;

margin-top:20px;

font-weight:600;

}

.trial-banner{

background:#fff4ec;
border:1px solid #ffd9b3;
color:#c2410c;
padding:14px 18px;
border-radius:14px;
margin-top:20px;
font-weight:600;
font-size:14px;

}

.trial-banner-urgente{

background:#fee2e2;
border-color:#fecaca;
color:#991b1b;

}

.insight-grid{

    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
    gap:22px;
    margin-top:25px;

}

.insight-card{

    background:#fff;
    border-radius:16px;
    padding:24px;
    border-left:6px solid #cbd5e1;
    box-shadow:
        0 2px 5px rgba(0,0,0,.04),
        0 12px 30px rgba(0,0,0,.05);

}

.insight-titulo{

    font-size:16px;
    font-weight:700;
    color:#222;
    margin-bottom:10px;

}

.insight-valor{

    font-size:32px;
    font-weight:800;
    letter-spacing:-1px;
    margin-bottom:10px;

}

.insight-mensagem{

    color:#475569;
    font-size:14px;
    line-height:1.5;

}

.insight-ok{ border-left-color:#16A34A; }
.insight-ok .insight-valor{ color:#16A34A; }

.insight-atencao{ border-left-color:#f59e0b; }
.insight-atencao .insight-valor{ color:#d97706; }

.insight-critico{ border-left-color:#DC2626; }
.insight-critico .insight-valor{ color:#DC2626; }

.insight-info{ border-left-color:#3b82f6; }
.insight-info .insight-valor{ color:#2563eb; }

.upload-grid{

    display:block;

    width:100%;

}

.upload-card{

    width:100%;

    background:#fff;

    border-radius:24px;

    padding:45px;

    box-shadow:0 12px 30px rgba(0,0,0,.06);

}

.upload-icon{

    font-size:42px;

    margin-bottom:15px;

}

.upload-title{

    font-size:24px;

    font-weight:700;

}

.upload-status{

    margin-top:10px;

    font-weight:600;

}

.status-ok{

    color:#16a34a;

}

.status-pending{

    color:#f59e0b;

}

.custom-file{

    display:none;

}

.file-button{

    margin-top:20px;

    display:inline-block;

    background:#ff6b00;

    color:white;

    padding:12px 20px;

    border-radius:12px;

    cursor:pointer;

    font-weight:600;

}

.file-name{

    display:block;

    margin-top:15px;

    color:#64748b;

}

.upload-info{

    margin-top:15px;

    background:#f8fafc;

    border-radius:12px;

    padding:12px;

    font-size:14px;

    color:#64748b;

}

.upload-info strong{

    color:#0f172a;

    display:block;

    margin-bottom:5px;

}

.upload-date{

    color:#94a3b8;

    font-size:13px;

    margin-top:5px;

}

.status-ok{
    color:#16a34a;
}

.status-pending{
    color:#f59e0b;
}

.status-processing{
    color:#2563eb;
}

.drop-area{

display:block;

margin-top:35px;

padding:55px;

border:3px dashed #d7dde5;

border-radius:22px;

text-align:center;

background:#fafafa;

cursor:pointer;

transition:.25s;

}

.drop-area:hover{

border-color:#ff6b00;

background:#fff7f2;

}

.drop-area h3{

margin-top:20px;

font-size:24px;

}

.drop-area p{

margin-top:10px;

color:#64748b;

}

#pedidosNome{

display:block;

margin-top:25px;

font-weight:700;

color:#ff6b00;

}

.dashboard-cards{

    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:22px;
    margin-top:25px;

}

.dash-card{

    background:#fff;
    border-radius:16px;
    padding:22px;
    border:1px solid #ECECEC;

    box-shadow:
        0 2px 5px rgba(0,0,0,.04),
        0 12px 30px rgba(0,0,0,.05);

    transition:.25s;

}

.dash-card:hover{

    transform:translateY(-4px);

    box-shadow:
        0 8px 20px rgba(0,0,0,.08),
        0 20px 45px rgba(0,0,0,.08);

}

.dash-title{

    font-size:17px;
    font-weight:700;
    color:#222;
    margin-bottom:8px;

}

.dash-desc{

    color:#777;
    font-size:13px;
    line-height:1.4;
    min-height:38px;
    margin-bottom:18px;

}

.dash-value{

    font-size:34px;
    font-weight:800;
    color:#1F2937;
    letter-spacing:-1px;

}

.upload-select-wrap{

    display:flex;
    align-items:flex-end;
    gap:14px;
    flex-wrap:wrap;
    margin-bottom:25px;

}

.upload-select-label{

    display:block;
    font-size:13px;
    font-weight:700;
    color:#64748b;
    margin-bottom:8px;
    text-transform:uppercase;
    letter-spacing:.03em;

}

.upload-select-control{

    position:relative;

}

.upload-select-control::after{

    content:"▾";
    position:absolute;
    right:18px;
    top:50%;
    transform:translateY(-50%);
    color:#ff6b00;
    font-size:16px;
    pointer-events:none;

}

.upload-select{

    appearance:none;
    -webkit-appearance:none;
    -moz-appearance:none;
    background:#fff;
    border:2px solid #ECECEC;
    border-radius:14px;
    padding:14px 46px 14px 20px;
    font-family:inherit;
    font-size:16px;
    font-weight:700;
    color:#1e293b;
    cursor:pointer;
    min-width:240px;
    box-shadow:0 2px 5px rgba(0,0,0,.04);
    transition:.2s;

}

.upload-select:hover{

    border-color:#ffb27a;

}

.upload-select:focus{

    outline:none;
    border-color:#ff6b00;
    box-shadow:0 0 0 4px rgba(255,107,0,.12);

}

.upload-select-delete{

    background:#fee2e2;
    border:none;
    border-radius:14px;
    color:#dc2626;
    font-weight:700;
    font-size:14px;
    padding:14px 20px;
    cursor:pointer;
    transition:.2s;

}

.upload-select-delete:hover{

    background:#fecaca;

}

.upload-select-details{

    display:inline-flex;
    align-items:center;
    background:#fff4ec;
    border:2px solid #ffd9b3;
    border-radius:14px;
    color:#ff6b00;
    font-weight:700;
    font-size:14px;
    padding:12px 20px;
    text-decoration:none;
    transition:.2s;

}

.upload-select-details:hover{

    background:#ffe8d4;

}

.upload-select-new{

    display:inline-flex;
    align-items:center;
    background:#ff6b00;
    border:2px solid #ff6b00;
    border-radius:14px;
    color:#fff;
    font-weight:700;
    font-size:14px;
    padding:12px 20px;
    text-decoration:none;
    transition:.2s;

}

.upload-select-new:hover{

    background:#e85f00;
    border-color:#e85f00;

}

.dash-periodo{

    color:#64748b;
    font-size:14px;
    font-weight:600;
    margin-bottom:20px;

}

.dash-value.positive{

    color:#16A34A;

}

.dash-value.negative{

    color:#DC2626;

}

.dash-totais-wrap{

    background:linear-gradient(135deg,#fff7f0,#ffffff);
    border:1px solid #ffe4cc;
    border-radius:20px;
    padding:25px;
    margin-top:25px;

}

.dash-totais-wrap .dashboard-cards{

    margin-top:0;

}

.dash-section-title{

    display:flex;
    align-items:center;
    gap:10px;
    font-size:20px;
    font-weight:800;
    color:#1e293b;
    margin:35px 0 5px;
    padding-bottom:12px;
    border-bottom:2px solid #ECECEC;

}

.dash-totais-wrap .dash-section-title{

    margin-top:0;
    border-bottom:2px solid #ffe0c2;

}

.dash-section-icon{

    font-size:22px;

}

@media(max-width:768px){

    .dash-value{

        font-size:28px;

    }

}

/* VIEW UPLOAD (tabela de lançamentos) */

.view-upload-back{

    display:inline-block;
    color:#ff6b00;
    text-decoration:none;
    font-weight:700;
    font-size:14px;
    margin-bottom:20px;

}

.view-upload-back:hover{

    text-decoration:underline;

}

.view-upload-header{

    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    flex-wrap:wrap;
    gap:16px;
    margin-bottom:25px;

}

.view-upload-meta{

    color:#64748b;
    font-size:14px;
    margin-top:6px;

}

.table-wrap{

    overflow-x:auto;
    background:#fff;
    border-radius:20px;
    box-shadow:0 12px 30px rgba(0,0,0,.06);

}

.data-table{

    width:100%;
    border-collapse:collapse;
    font-size:14px;
    min-width:820px;

}

.data-table thead th{

    position:sticky;
    top:0;
    background:#111827;
    color:#fff;
    text-align:left;
    padding:14px 16px;
    font-weight:700;
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.03em;
    white-space:nowrap;

}

.data-table tbody td{

    padding:12px 16px;
    border-bottom:1px solid #F1F1F1;
    color:#1e293b;
    white-space:nowrap;

}

.data-table tbody tr:nth-child(even){

    background:#FAFBFC;

}

.data-table tbody tr:hover{

    background:#FFF4EC;

}

.data-table .valor-positive{

    color:#16A34A;
    font-weight:700;

}

.data-table .valor-negative{

    color:#DC2626;
    font-weight:700;

}

.badge-cancelado{

    display:inline-block;
    background:#fee2e2;
    color:#dc2626;
    font-size:11px;
    font-weight:700;
    padding:4px 10px;
    border-radius:8px;
    white-space:nowrap;

}

/* Painel Admin — assinaturas ASAAS */

.badge-plano{

    display:inline-block;
    font-size:11px;
    font-weight:700;
    padding:4px 10px;
    border-radius:8px;
    white-space:nowrap;
    text-transform:capitalize;
    background:#f1f5f9;
    color:#475569;

}

.badge-plano-ativo, .badge-assinatura-ativa, .badge-cobranca-confirmada, .badge-cobranca-recebida{
    background:#dcfce7;
    color:#16A34A;
}

.badge-plano-trial, .badge-cobranca-pendente, .badge-assinatura-pendente, .badge-plano-aguardando_pagamento{
    background:#fef3c7;
    color:#d97706;
}

.badge-plano-cancelado, .badge-assinatura-cancelada, .badge-cobranca-estornada, .badge-cobranca-cancelada{
    background:#fee2e2;
    color:#dc2626;
}

/* Atraso é recuperável (a assinatura na ASAAS continua ativa, só falta
   pagar) — cor própria, diferente do vermelho de cancelamento definitivo. */
.badge-plano-inadimplente, .badge-assinatura-inadimplente, .badge-cobranca-atrasada{
    background:#fde8cc;
    color:#9a5a0a;
}

.admin-acoes{

    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:8px;

}

.admin-link{
    color:#f97316;
    font-weight:600;
    font-size:13px;
    text-decoration:none;
}

.admin-link:hover{
    text-decoration:underline;
}

.admin-form-inline{

    display:flex;
    align-items:center;
    gap:6px;

}

.admin-form-inline select, .admin-input-sm{

    padding:6px 8px;
    border-radius:8px;
    border:1px solid #e2e8f0;
    font-size:13px;

}

.admin-input-sm{
    width:120px;
}

.admin-btn-sm{

    padding:6px 12px !important;
    font-size:12px !important;
    white-space:nowrap;

}

.admin-btn-cancelar{

    padding:6px 12px;
    font-size:12px;
    font-weight:700;
    color:#dc2626;
    background:#fee2e2;
    border:none;
    border-radius:8px;
    cursor:pointer;
    white-space:nowrap;

}

.admin-btn-cancelar:hover{
    background:#fecaca;
}

/* Verificação manual de pagamento — substituto do webhook enquanto ele não
   está configurado. Neutro de propósito: não é criação (laranja) nem
   cancelamento (vermelho), só uma consulta. */
.admin-btn-verificar{
    padding:6px 12px;
    font-size:12px;
    font-weight:700;
    color:#334155;
    background:#e2e8f0;
    border:none;
    border-radius:8px;
    cursor:pointer;
    white-space:nowrap;
}

.admin-btn-verificar:hover{
    background:#cbd5e1;
}

/* Confirmação manual (força sem checar a ASAAS) — borda tracejada de
   propósito, pra parecer visualmente "menos oficial" que os outros botões
   e não ser clicado no automático. */
.admin-btn-forcar{
    padding:5px 11px;
    font-size:12px;
    font-weight:600;
    color:#9a5a0a;
    background:#fff;
    border:1px dashed #f4c88a;
    border-radius:8px;
    cursor:pointer;
    white-space:nowrap;
}

.admin-btn-forcar:hover{
    background:#fde8cc;
}

/* CADASTRO — Tela de boas-vindas pós-cadastro (auth/bem_vindo.php) */

.auth-card--wide{
    max-width:720px;
}

.welcome-icon{
    text-align:center;
    font-size:48px;
    margin-bottom:5px;
}

.welcome-title{
    text-align:center;
    font-size:26px;
    font-weight:800;
    color:#1e293b;
    margin-bottom:16px;
}

.welcome-trial-box{
    background:#fff7f0;
    border:1px solid #ffe4cc;
    border-radius:16px;
    padding:16px 20px;
    text-align:center;
    color:#9a3412;
    font-weight:600;
    margin-bottom:30px;
}

.welcome-section-title{
    font-size:13px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.04em;
    color:#94a3b8;
    margin-bottom:14px;
}

.hooks-list{
    list-style:none;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
    margin-bottom:30px;
}

.hooks-list li{
    display:flex;
    align-items:flex-start;
    gap:10px;
    background:#f8fafc;
    border-radius:14px;
    padding:14px 16px;
    font-size:14px;
    color:#334155;
    font-weight:500;
}

.hooks-list li span{
    font-size:18px;
    line-height:1;
}

.mini-plans{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:12px;
    margin-bottom:12px;
}

.mini-plan{
    position:relative;
    border:1px solid #e2e8f0;
    border-radius:16px;
    padding:16px;
    text-align:center;
}

.mini-plan--featured{
    border-color:#ff6b00;
    background:#fff7f0;
}

.mini-plan-tag{
    position:absolute;
    top:-11px;
    left:50%;
    transform:translateX(-50%);
    background:#ff6b00;
    color:#fff;
    font-size:10px;
    font-weight:700;
    padding:3px 10px;
    border-radius:999px;
    white-space:nowrap;
}

.mini-plan h4{
    font-size:14px;
    color:#1e293b;
    margin-bottom:6px;
}

.mini-plan .price{
    font-size:19px;
    font-weight:800;
    color:#1e293b;
}

.mini-plan .price small{
    font-size:12px;
    font-weight:500;
    color:#64748b;
}

.mini-plan .equiv{
    font-size:11px;
    color:#16A34A;
    font-weight:700;
    margin-top:4px;
}

.welcome-note{
    text-align:center;
    color:#94a3b8;
    font-size:13px;
    margin-bottom:25px;
}

@media(max-width:640px){

    .hooks-list{
        grid-template-columns:1fr;
    }

    .mini-plans{
        grid-template-columns:1fr;
    }

}

/* CONTA — Assinatura self-service (conta/assinatura.php) */

.plans-grid{

    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:22px;
    margin-top:25px;
    align-items:stretch;

}

.plan-card{

    position:relative;
    background:#fff;
    border:1px solid #ECECEC;
    border-radius:20px;
    padding:30px;
    display:flex;
    flex-direction:column;
    box-shadow:
        0 2px 5px rgba(0,0,0,.04),
        0 12px 30px rgba(0,0,0,.05);

}

.plan-card--featured{
    border-color:#ff6b00;
}

.plan-card__tag{

    position:absolute;
    top:-13px;
    left:30px;
    background:#ff6b00;
    color:#fff;
    font-size:11px;
    font-weight:700;
    padding:4px 12px;
    border-radius:999px;

}

.plan-card h3{
    font-size:20px;
    font-weight:800;
    color:#1e293b;
    margin-bottom:8px;
}

.plan-card__desc{
    color:#64748b;
    font-size:14px;
    margin-bottom:18px;
    min-height:3.2em;
}

.plan-card__price{
    font-size:30px;
    font-weight:800;
    color:#1e293b;
    margin-bottom:4px;
}

.plan-card__price span{
    font-size:16px;
    font-weight:600;
    vertical-align:top;
}

.plan-card__price small{
    font-size:14px;
    font-weight:500;
    color:#64748b;
}

.plan-card__equiv{
    font-size:12px;
    color:#16A34A;
    font-weight:700;
    margin-bottom:18px;
}

.plan-card__list{
    list-style:none;
    margin-bottom:22px;
    flex-grow:1;
}

.plan-card__list li{
    position:relative;
    padding-left:22px;
    margin-bottom:10px;
    color:#334155;
    font-size:13px;
    line-height:1.4;
}

.plan-card__list li::before{
    content:"✓";
    position:absolute;
    left:0;
    color:#16A34A;
    font-weight:700;
}

.plan-card__form{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.plan-card__cpf{
    height:44px;
    margin-bottom:0;
}

.plan-card__form .btn-primary{
    height:48px;
}

.conta-assinatura-status{
    padding:24px 28px;
    margin-top:20px;
}

.conta-assinatura-linha{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:8px 0;
    color:#334155;
    font-size:14px;
}

/* Aviso de cobrança em atraso — CTA de pagamento em destaque, acima do
   histórico (que antes era o único lugar pra achar o link de fatura). */
.pay-callout{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    flex-wrap:wrap;
    background:#fde8cc;
    border:1px solid #f4c88a;
    border-radius:14px;
    padding:16px 20px;
    margin-top:20px;
}

.pay-callout__texto{
    color:#9a5a0a;
    font-weight:600;
    font-size:14px;
    max-width:480px;
}

.pay-callout__btn{
    background:#ff6b00;
    color:#fff;
    font-weight:700;
    font-size:14px;
    padding:10px 18px;
    border-radius:10px;
    text-decoration:none;
    white-space:nowrap;
}

.pay-callout__btn:hover{
    background:#e65f00;
}