:root{
    --bg:#f5f5f5;
    --black:#0D0D0D;
    --black-2:#151515;
    --dark:#171717;
    --muted:#6b7280;
    --line:#e5e7eb;
    --primary:#E53935;
    --primary-dark:#991b1b;
    --success:#16A34A;
    --success-dark:#166534;
    --danger:#dc2626;
    --card:#ffffff;
    --soft-red:#fef2f2;
    --soft-green:#f0fdf4;
    --gray:#F2F2F2;
    --shadow:0 24px 70px rgba(0,0,0,.14);
}
*{box-sizing:border-box}
body{
    margin:0;
    font-family:Montserrat,Poppins,Arial,sans-serif;
    background:
        url("../img/branding/watermark.svg") top right/620px auto no-repeat,
        radial-gradient(circle at top left, rgba(229,57,53,.12), transparent 34%),
        radial-gradient(circle at bottom right, rgba(22,163,74,.10), transparent 30%),
        linear-gradient(135deg,#ffffff,#f5f5f5);
    color:var(--dark);
}
a{text-decoration:none;color:inherit}

.topbar{
    min-height:86px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;
    padding:0 5vw;
    background:rgba(13,13,13,.96);
    backdrop-filter:blur(16px);
    border-bottom:1px solid rgba(255,255,255,.08);
    position:sticky;
    top:0;
    z-index:10;
    box-shadow:0 12px 36px rgba(0,0,0,.18);
}
.brand-logo{display:inline-flex;align-items:center}
.brand-logo img{height:58px;width:auto;display:block}
.brand{
    font-size:1.35rem;
    font-weight:800;
    letter-spacing:-.04em;
    color:#fff;
}
.brand span{color:var(--success)}
.topbar nav{
    display:flex;
    gap:10px;
    align-items:center;
    font-size:.92rem;
    color:rgba(255,255,255,.82);
}
.topbar nav a:not(.btn){
    display:inline-flex;
    gap:8px;
    align-items:center;
    padding:10px 12px;
    border-radius:999px;
    opacity:.9;
}
.topbar nav a:hover{opacity:1;color:#fff;background:rgba(255,255,255,.06)}
.nav-ico{width:20px;height:20px;flex:0 0 20px}
.btn .nav-ico{width:18px;height:18px}

.btn{
    border:0;
    border-radius:999px;
    padding:12px 18px;
    font-weight:800;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    transition:.18s;
    white-space:nowrap;
    font-family:Montserrat,Poppins,Arial,sans-serif;
}
.btn:hover{transform:translateY(-1px)}
.btn-dark{
    background:var(--black);
    color:white;
    box-shadow:0 12px 30px rgba(0,0,0,.22);
}
.btn-outline-dark{
    border:1px solid rgba(255,255,255,.34);
    background:rgba(255,255,255,.05);
}
.btn-light{
    background:#fff;
    color:var(--black);
    border:1px solid var(--line);
}
.btn-primary{
    background:linear-gradient(135deg,var(--primary-dark),var(--primary));
    color:white;
    box-shadow:0 14px 34px rgba(229,57,53,.22);
}
.btn-danger{background:var(--danger);color:white}
.btn-success{
    background:linear-gradient(135deg,var(--success-dark),var(--success));
    color:white;
    box-shadow:0 14px 34px rgba(22,163,74,.20);
}
.btn.full{width:100%;text-align:center}
.danger-outline{border-color:#fecaca!important;color:#991b1b!important}

.hero{
    min-height:calc(100vh - 86px);
    display:grid;
    grid-template-columns:1.05fr .95fr;
    gap:42px;
    align-items:start;
    padding:42px 5vw 60px;
    position:relative;
    overflow:hidden;
}
.hero:before{
    content:"";
    position:absolute;
    inset:0;
    background:url("../img/branding/watermark.svg") right center/680px auto no-repeat;
    opacity:.72;
    z-index:0;
    pointer-events:none;
}
.hero>*{position:relative;z-index:1}
.hero h1{
    font-size:clamp(2.2rem,5vw,4.6rem);
    line-height:1.04;
    letter-spacing:-.075em;
    margin:0 0 20px;
    color:var(--black);
}
.hero h1 span{
    background:linear-gradient(135deg,var(--success),#047857);
    -webkit-background-clip:text;
    color:transparent;
}
.hero p{
    font-size:1.05rem;
    color:var(--muted);
    max-width:720px;
    line-height:1.75;
}
.hero-actions{display:flex;gap:14px;flex-wrap:wrap;margin-top:28px}

.hero-badge{
    display:inline-flex;
    align-items:center;
    gap:10px;
    background:#ecfdf5;
    border:1px solid #bbf7d0;
    color:#166534;
    font-size:.86rem;
    font-weight:800;
    border-radius:999px;
    padding:10px 14px;
    margin-bottom:18px;
}
.hero-badge span{
    width:22px;height:22px;border-radius:50%;
    display:inline-flex;align-items:center;justify-content:center;
    background:#dcfce7;color:#15803d;
}
.benefit-row{
    display:flex;
    align-items:center;
    gap:20px;
    margin-top:26px;
    flex-wrap:wrap;
}
.benefit-row div{
    display:grid;
    grid-template-columns:auto 1fr;
    column-gap:10px;
    align-items:center;
    min-width:170px;
}
.benefit-row span{
    grid-row:span 2;
    width:26px;height:26px;border-radius:50%;
    border:2px solid var(--success);
    color:var(--success);
    display:inline-flex;align-items:center;justify-content:center;
    font-weight:900;
}
.benefit-row strong{font-size:.92rem;color:#111827}
.benefit-row small{font-size:.78rem;color:var(--muted)}

.home-cards{
    display:grid;
    grid-template-columns:1fr;
    gap:20px;
    align-items:start;
    max-width:540px;
    width:100%;
    justify-self:end;
}
.login-card,.panel-card,.form-card{
    background:rgba(255,255,255,.94);
    border:1px solid rgba(229,231,235,.95);
    box-shadow:var(--shadow);
    border-radius:28px;
    padding:30px;
}
.login-card{border-top:5px solid var(--primary)}
.verify-card{border-top-color:var(--success)}
.login-card h2,.panel-card h2,.form-card h2{
    margin:0 0 8px;
    letter-spacing:-.04em;
    color:var(--black);
}
.login-card p,.panel-card p,.form-card p{
    color:var(--muted);
    line-height:1.65;
}

.profile-tabs{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:10px;
    margin:20px 0;
}
.profile-tabs a{
    display:flex;
    min-height:86px;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:8px;
    border:1px solid var(--line);
    border-radius:16px;
    color:#111827;
    font-weight:800;
    font-size:.86rem;
    background:#fff;
}
.profile-tabs a.active{border-color:var(--primary);box-shadow:0 0 0 4px rgba(229,57,53,.08)}
.profile-tabs img{width:30px;height:30px}
.micro-copy{
    text-align:center;
    font-size:.85rem!important;
    margin:16px 0 0;
}
.micro-copy a{color:#166534;font-weight:800;text-decoration:underline}

.card-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.live-badge{background:#dcfce7;color:#166534;border-radius:999px;padding:7px 10px;font-size:.75rem;font-weight:900}
.cpf-line{
    display:flex;
    align-items:center;
    justify-content:space-between;
    border:1px solid var(--line);
    border-radius:14px;
    padding:13px 14px;
    margin:14px 0;
    color:#6b7280;
}
.cpf-line strong{color:var(--success);font-size:1.3rem}
.id-preview{
    display:grid;
    grid-template-columns:92px 1fr;
    gap:14px;
    border:1px solid var(--line);
    border-radius:18px;
    padding:12px;
    background:#fff;
    margin-bottom:14px;
}
.id-preview img{width:92px;height:92px;border-radius:14px;object-fit:cover}
.id-preview strong{display:block;color:#111827;margin-bottom:5px}
.id-preview small{display:block;color:#4b5563;font-size:.78rem;margin-bottom:3px}
.id-preview em{
    display:inline-flex;
    background:#dcfce7;
    color:#166534;
    border-radius:999px;
    padding:5px 8px;
    font-style:normal;
    font-weight:800;
    font-size:.75rem;
    margin-top:4px;
}

.form-grid{display:grid;gap:14px}
.field label{
    display:block;
    font-size:.85rem;
    font-weight:800;
    margin-bottom:7px;
    color:#27272a;
}
.field input,.field select,.field textarea{
    width:100%;
    border:1px solid var(--line);
    border-radius:16px;
    padding:13px 14px;
    font:inherit;
    background:white;
    outline:none;
}
.field input:focus,.field select:focus,.field textarea:focus{
    border-color:var(--primary);
    box-shadow:0 0 0 4px rgba(229,57,53,.11);
}

.alert{border-radius:18px;padding:14px 16px;margin:14px 0;font-weight:700}
.alert-danger{background:#fef2f2;color:#991b1b;border:1px solid #fecaca}
.alert-success{background:#f0fdf4;color:#166534;border:1px solid #bbf7d0}
.alert-info{background:#f8fafc;color:#111827;border:1px solid #d1d5db}
.alert-warning{background:#fffbeb;color:#92400e;border:1px solid #fde68a}

.dashboard{padding:34px 5vw}
.metric-section{padding-top:0}
.dashboard-header{
    display:flex;
    justify-content:space-between;
    gap:20px;
    align-items:center;
    margin-bottom:24px;
}
.dashboard-header h1{
    margin:0;
    font-size:2rem;
    letter-spacing:-.055em;
    color:var(--black);
}
.dashboard-header p{margin:6px 0 0;color:var(--muted)}
.grid{display:grid;gap:18px}
.grid-5{grid-template-columns:repeat(5,minmax(0,1fr))}
.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}

.metric-card{
    background:#fff;
    border:1px solid var(--line);
    border-left:5px solid var(--primary);
    border-radius:24px;
    padding:22px;
    box-shadow:0 12px 34px rgba(0,0,0,.07);
}
.metric-card span{color:var(--muted);font-size:.86rem;font-weight:700}
.metric-card strong{
    display:block;
    font-size:1.8rem;
    margin:8px 0 2px;
    letter-spacing:-.05em;
    color:var(--black);
}
.metric-card small{color:var(--muted)}
.metric-card.with-icon{
    border-left:0;
    display:grid;
    gap:5px;
}
.metric-card.with-icon img{
    width:52px;height:52px;
    padding:12px;
    border-radius:14px;
    margin-bottom:8px;
}
.metric-card.with-icon.green img{background:#ecfdf5;color:var(--success)}
.metric-card.with-icon.red img{background:#fef2f2;color:var(--primary)}
.metric-card.with-icon.green strong{color:var(--success)}
.metric-card.with-icon.red strong{color:var(--primary)}

.panel-card{position:relative;overflow:hidden}
.panel-card:after{
    content:"";
    position:absolute;right:-55px;bottom:-55px;
    width:180px;height:180px;
    background:url("../img/branding/brand-mark.svg") center/contain no-repeat;
    opacity:.04;
}
.panel-icon{
    width:42px;height:42px;
    padding:9px;
    border-radius:14px;
    background:#f3f4f6;
    margin-bottom:12px;
}

.table-wrap{
    background:white;
    border:1px solid var(--line);
    border-radius:24px;
    overflow:auto;
    box-shadow:0 12px 34px rgba(0,0,0,.07);
}
table{width:100%;border-collapse:collapse}
th,td{padding:14px 16px;border-bottom:1px solid var(--line);text-align:left;font-size:.92rem}
th{
    background:#111111;
    font-size:.78rem;
    text-transform:uppercase;
    letter-spacing:.04em;
    color:#fff;
}
tr:last-child td{border-bottom:0}

.status{
    display:inline-flex;
    border-radius:999px;
    padding:6px 10px;
    font-size:.78rem;
    font-weight:900;
}
.status.ok{background:#dcfce7;color:#166534}
.status.warn{background:#fef3c7;color:#92400e}
.status.bad{background:#fee2e2;color:#991b1b}
.status.info{background:#f3f4f6;color:#111827;border:1px solid #e5e7eb}

.point-box{max-width:760px;margin:0 auto}
.chapa-preview{
    display:grid;
    grid-template-columns:96px 1fr;
    gap:18px;
    align-items:center;
    background:#fff;
    border:1px solid var(--line);
    border-left:5px solid var(--success);
    border-radius:24px;
    padding:18px;
    margin-top:18px;
    box-shadow:0 12px 34px rgba(0,0,0,.06);
}
.chapa-preview img{
    width:96px;
    height:96px;
    border-radius:22px;
    object-fit:cover;
    background:#f3f4f6;
    border:3px solid #fff;
    box-shadow:0 0 0 2px rgba(22,163,74,.22);
}
.chapa-preview h3{margin:0 0 4px;color:var(--black)}
.chapa-preview p{margin:0 0 5px;color:var(--muted)}

.trust-strip{
    display:flex;
    align-items:center;
    gap:22px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:24px;
    padding:20px 26px;
    box-shadow:0 12px 34px rgba(0,0,0,.07);
    margin-bottom:18px;
}
.trust-strip img{width:62px;height:62px}
.trust-strip strong{font-size:1.15rem;color:#111827}
.trust-strip p{margin:5px 0 0;color:var(--muted)}



.access-note{
    background:#f8fafc;
    border:1px solid var(--line);
    border-radius:16px;
    padding:14px 16px;
    margin:4px 0 16px!important;
    color:#4b5563!important;
    font-size:.92rem!important;
    line-height:1.55!important;
    text-align:center;
}
.access-card{
    padding-bottom:26px;
}
.verify-card{
    border-top-color:var(--success);
}
.verify-card h2{
    white-space:nowrap;
}
.verify-card > p{
    max-width:100%;
    line-height:1.55;
}
.id-preview{
    grid-template-columns:112px 1fr;
    align-items:center;
    padding:16px;
}
.id-preview img{
    width:112px;
    height:112px;
}
.id-preview strong{
    font-size:1.08rem;
    line-height:1.25;
    margin-bottom:8px;
}
.id-preview small{
    font-size:.84rem;
    line-height:1.35;
}
.verify-card .btn{
    min-height:52px;
    border-radius:16px;
}

@media (max-width:1150px){
    .grid-5{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:900px){
    .topbar{height:auto;flex-direction:column;padding:16px;gap:12px}
    .brand-logo img{height:54px}
    .topbar nav{justify-content:center;flex-wrap:wrap}
    .hero{grid-template-columns:1fr;padding:28px 20px 40px}
    .grid-5,.grid-4,.grid-3,.grid-2{grid-template-columns:1fr}
    .dashboard{padding:24px 20px}
    .dashboard-header{flex-direction:column;align-items:flex-start}
    .chapa-preview{grid-template-columns:1fr}
    .chapa-preview img{width:120px;height:120px}
    .profile-tabs{grid-template-columns:1fr}
    .trust-strip{align-items:flex-start}
}
@media (max-width:560px){
    .home-cards{gap:14px;max-width:100%}
    .login-card,.panel-card,.form-card{padding:22px}
    .id-preview{grid-template-columns:1fr}
    .id-preview img{width:96px;height:96px}
    .verify-card h2{white-space:normal}
}

.footer{
    background:var(--black);
    color:#d1d5db;
    padding:34px 5vw 26px;
    margin-top:30px;
    border-top:1px solid rgba(255,255,255,.08);
}
.footer-inner{
    max-width:1240px;
    margin:0 auto;
    display:grid;
    gap:22px;
}
.footer-main{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;
    flex-wrap:wrap;
}
.footer-logo{
    display:inline-flex;
    align-items:center;
}
.footer-logo img{
    height:54px;
    width:auto;
    display:block;
}
.footer-main p{
    margin:0;
    color:#e5e7eb;
    font-size:.92rem;
    line-height:1.6;
    max-width:640px;
    text-align:right;
}
.footer-links{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    flex-wrap:wrap;
    padding:16px 0;
    border-top:1px solid rgba(255,255,255,.08);
    border-bottom:1px solid rgba(255,255,255,.08);
}
.footer-links a{
    color:#f3f4f6;
    font-size:.86rem;
    font-weight:800;
    padding:9px 13px;
    border-radius:999px;
    background:rgba(255,255,255,.045);
    border:1px solid rgba(255,255,255,.08);
}
.footer-links a:hover{
    background:rgba(22,163,74,.16);
    border-color:rgba(22,163,74,.32);
    color:#fff;
}
.footer-bottom{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    flex-wrap:wrap;
    font-size:.82rem;
    color:#9ca3af;
}
.footer-bottom strong{
    color:#fff;
    font-weight:900;
}
.legal-page{
    max-width:980px;
    margin:0 auto;
}
.legal-page h1{
    font-size:clamp(2rem,4vw,3.2rem);
    letter-spacing:-.07em;
    margin:0 0 12px;
    color:var(--black);
}
.legal-page h2{
    margin-top:28px;
    letter-spacing:-.04em;
    color:var(--black);
}
.legal-page p,
.legal-page li{
    color:#4b5563;
    line-height:1.8;
}
.legal-page ul{
    padding-left:22px;
}
.legal-meta{
    display:inline-flex;
    align-items:center;
    gap:8px;
    background:#f3f4f6;
    border:1px solid var(--line);
    color:#4b5563;
    border-radius:999px;
    padding:8px 12px;
    font-size:.83rem;
    font-weight:700;
    margin-bottom:18px;
}
.contact-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:16px;
    margin-top:20px;
}
.contact-card{
    background:#fff;
    border:1px solid var(--line);
    border-radius:22px;
    padding:20px;
    box-shadow:0 12px 34px rgba(0,0,0,.06);
}
.contact-card strong{
    display:block;
    color:#111827;
    margin-bottom:8px;
}
.contact-card span{
    color:#6b7280;
    font-size:.92rem;
}

@media (max-width:900px){
    .footer-main{
        align-items:flex-start;
        flex-direction:column;
    }
    .footer-main p{
        text-align:left;
    }
    .footer-bottom{
        flex-direction:column;
        align-items:flex-start;
    }
    .contact-grid{
        grid-template-columns:1fr;
    }
}


/* Ajuste v6: remove o espaço grande acima do texto principal da home */
.home-hero{
    align-items:flex-start!important;
    padding-top:42px!important;
}
.home-hero .hero-copy{
    align-self:flex-start!important;
    padding-top:0!important;
    margin-top:0!important;
    transform:none!important;
}
.home-hero .home-cards{
    align-self:flex-start!important;
    margin-top:0!important;
}
.home-hero .hero-badge{
    margin-top:0!important;
}


/* Ajuste v7: melhora o card Verificar ID e impede textos picados/quebrados */
.home-hero{
    grid-template-columns:minmax(0, 1.05fr) minmax(560px, .95fr)!important;
    gap:34px!important;
}
.home-hero .home-cards{
    display:grid!important;
    grid-template-columns:1fr!important;
    max-width:560px!important;
    width:100%!important;
    justify-self:end!important;
}
.verify-card{
    max-width:560px!important;
    width:100%!important;
}
.verify-card .card-title-row{
    display:flex!important;
    align-items:flex-start!important;
    justify-content:space-between!important;
    gap:14px!important;
}
.verify-card h2{
    white-space:normal!important;
    line-height:1.12!important;
    max-width:260px!important;
}
.verify-card .live-badge{
    white-space:nowrap!important;
    flex:0 0 auto!important;
    line-height:1.1!important;
}
.verify-card > p{
    max-width:420px!important;
    line-height:1.55!important;
}
.verify-card .cpf-line{
    min-height:50px!important;
}
.verify-card .id-preview{
    grid-template-columns:112px minmax(0,1fr)!important;
    gap:16px!important;
    align-items:center!important;
}
.verify-card .id-preview > div{
    min-width:0!important;
}
.verify-card .id-preview strong{
    display:block!important;
    max-width:100%!important;
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:normal!important;
    line-height:1.22!important;
    font-size:1rem!important;
}
.verify-card .id-preview small{
    display:block!important;
    max-width:100%!important;
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:normal!important;
    line-height:1.35!important;
    font-size:.82rem!important;
}
.verify-card .id-preview em{
    max-width:max-content!important;
    white-space:nowrap!important;
}

@media (max-width:1180px){
    .home-hero{
        grid-template-columns:1fr!important;
    }
    .home-hero .home-cards{
        justify-self:stretch!important;
        max-width:100%!important;
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
    }
}
@media (max-width:760px){
    .home-hero .home-cards{
        grid-template-columns:1fr!important;
    }
}


/* Admin: módulos e cadastros */
.admin-split{
    margin-top:18px;
    align-items:start;
}
.panel-link{
    display:block;
    color:inherit;
}
.panel-link:hover{
    transform:translateY(-2px);
    border-color:rgba(22,163,74,.32);
}
.search-line{
    display:flex;
    align-items:center;
    gap:10px;
    margin:16px 0;
}
.search-line input{
    width:100%;
    border:1px solid var(--line);
    border-radius:999px;
    padding:13px 16px;
    font:inherit;
    outline:none;
}
.search-line input:focus{
    border-color:var(--primary);
    box-shadow:0 0 0 4px rgba(229,57,53,.11);
}
.inline-form{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}
.inline-form select{
    border:1px solid var(--line);
    border-radius:999px;
    padding:10px 12px;
    background:#fff;
    font:inherit;
    min-width:130px;
}
.no-gap-mobile{
    gap:14px;
}
.table-wrap small{
    color:var(--muted);
}


/* Chapa: foto pequena nas listagens */
.table-avatar{
    width:54px;
    height:54px;
    border-radius:16px;
    object-fit:cover;
    border:3px solid #fff;
    box-shadow:0 0 0 2px rgba(22,163,74,.22);
    background:#f3f4f6;
}
.field small{
    display:block;
    margin-top:6px;
    color:var(--muted);
    font-size:.78rem;
}
