:root{
    --blue:#1E40AF;
    --green:#16A34A;
    --gold:#D4A017;
    --dark:#1F2937;
    --bg:#F4F7FB;
    --sidebar:#081d4d;
    --sidebar-collapsed:78px;
    --sidebar-expanded:270px;
}

*{box-sizing:border-box}

html,body{
    width:100%;
    max-width:100%;
}

body{
    margin:0;
    font-family:Inter,Arial,sans-serif;
    background:var(--bg);
    color:var(--dark);
    overflow-x:hidden;
}

a{text-decoration:none}

.auth{
    min-height:100vh;
    display:grid;
    place-items:center;
    background:linear-gradient(135deg,#eef6ff,#f7fff4);
}

.card{
    background:#fff;
    border-radius:22px;
    box-shadow:0 20px 50px #0f172a18;
    padding:28px;
}

.auth-card{
    width:min(440px,92vw);
    text-align:center;
}

.logo{
    max-width:260px;
    margin-bottom:10px;
}

.input{
    width:100%;
    padding:14px 16px;
    border:1px solid #dbe3ef;
    border-radius:14px;
    margin:8px 0;
    font-size:15px;
}

.btn{
    border:0;
    border-radius:14px;
    padding:13px 18px;
    background:var(--blue);
    color:white;
    font-weight:800;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    gap:8px;
    min-height:46px;
    transition:all .25s ease;
}

.btn:hover{
    transform:translateY(-2px);
    box-shadow:0 12px 28px rgba(30,64,175,.22);
}

.btn.green{background:var(--green)}
.btn.gold{background:var(--gold);color:#111827}

.layout{
    display:flex;
    min-height:100vh;
}

.sidebar{
    width:var(--sidebar-collapsed);
    background:var(--sidebar);
    color:white;
    padding:18px 10px;
    position:fixed;
    top:0;
    bottom:0;
    left:0;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    z-index:9000;
    transition:width .25s ease;
}

.sidebar:hover{
    width:var(--sidebar-expanded);
}

.sidebar-logo{
    flex:0 0 auto;
    padding-bottom:14px;
    display:flex;
    justify-content:center;
}

.sidebar img{
    width:46px;
    height:46px;
    object-fit:contain;
    background:white;
    border-radius:14px;
    padding:6px;
    display:block;
    transition:width .25s ease, height .25s ease, padding .25s ease;
}

.sidebar:hover img{
    width:190px;
    height:auto;
    padding:8px;
    border-radius:16px;
}

.nav{
    overflow-y:auto;
    overflow-x:hidden;
    padding-right:4px;
    flex:1;
    scrollbar-width:thin;
}

.nav::-webkit-scrollbar{width:5px}
.nav::-webkit-scrollbar-thumb{background:#ffffff33;border-radius:999px}

.nav a{
    display:flex;
    align-items:center;
    gap:12px;
    color:#eaf2ff;
    padding:11px 12px;
    border-radius:14px;
    margin:5px 0;
    font-size:20px;
    line-height:1.25;
    white-space:nowrap;
    min-height:44px;
    overflow:hidden;
}

.nav a span{
    opacity:0;
    max-width:0;
    overflow:hidden;
    font-size:14px;
    transition:opacity .18s ease, max-width .25s ease;
}

.sidebar:hover .nav a span{
    opacity:1;
    max-width:210px;
}

.nav a:hover,
.nav a.active{
    background:#ffffff18;
}

.nav a.active{
    color:#22c55e;
    box-shadow:inset 3px 0 0 #22c55e;
}

.nav hr{
    border:0;
    border-top:1px solid rgba(255,255,255,.16);
    margin:10px 6px;
}

.main{
    margin-left:var(--sidebar-collapsed);
    width:calc(100% - var(--sidebar-collapsed));
    padding:28px;
    transition:margin-left .25s ease, width .25s ease;
}

.sidebar:hover + .main{
    margin-left:var(--sidebar-expanded);
    width:calc(100% - var(--sidebar-expanded));
}

.top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
    margin-bottom:24px;
}

.top h1{margin:0}

.grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:18px;
}

.stat{
    padding:22px;
    border-radius:20px;
    background:white;
    box-shadow:0 10px 30px #0f172a10;
}

.stat b{font-size:25px}
.stat span{display:block;color:#64748b;margin-bottom:8px}

.table-wrapper{
    width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
}

.table{
    width:100%;
    border-collapse:collapse;
    background:white;
    border-radius:18px;
    overflow:hidden;
}

.table th,
.table td{
    padding:14px;
    border-bottom:1px solid #eef2f7;
    text-align:left;
}

.form-row{
    display:grid;
    grid-template-columns:2fr 1fr 1fr auto;
    gap:10px;
    align-items:end;
}

.alert{
    background:#dcfce7;
    color:#166534;
    padding:12px;
    border-radius:12px;
    margin:10px 0;
}

.hero{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    padding:30px;
    background:radial-gradient(circle at top left,#dbeafe,transparent 35%),radial-gradient(circle at bottom right,#dcfce7,transparent 35%),#fff;
}

.hero img{max-width:560px;width:90%}
.hero h1{font-size:46px;color:var(--blue);margin:20px 0 8px}
.hero p{font-size:20px;color:#4b5563}

.mobile-toggle,
.menu-overlay{display:none !important}
.bottom-nav{display:none}

.pricing{
    background:white;
    border-radius:30px;
    padding:30px;
    box-shadow:0 24px 70px rgba(15,23,42,.12);
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:20px;
    align-items:stretch;
}

.price{
    border:1px solid #e5e7eb;
    border-radius:26px;
    padding:26px;
    display:flex;
    flex-direction:column;
    min-height:100%;
    background:#fff;
}

.price.featured{
    border:2px solid var(--green);
    transform:scale(1.03);
    box-shadow:0 20px 55px rgba(22,163,74,.14);
}

.price h3{margin:0 0 10px;font-size:24px}
.price strong{font-size:38px;color:var(--blue);display:block;margin-bottom:8px}
.price p{color:#64748b;line-height:1.55;min-height:48px}
.price ul{padding:0;margin:22px 0;list-style:none;flex:1}
.price li{margin:12px 0;color:#475569;display:flex;gap:8px;align-items:flex-start;line-height:1.35}
.price li i{color:var(--green);margin-top:3px}

.price .btn,
.price a.btn,
.price a.btn-plan,
.btn-plan{
    width:100%;
    min-height:50px;
    margin-top:auto;
    border-radius:16px;
    padding:14px 16px;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    font-weight:900;
    line-height:1.2;
    box-shadow:0 10px 28px rgba(15,23,42,.12);
}

.btn-blue,.btn-primary{background:var(--blue);color:#fff}
.btn-green{background:var(--green);color:#fff}
.btn-outline{background:#fff;color:var(--blue);border:1px solid rgba(30,64,175,.35)}

@media(min-width:769px) and (max-width:1100px){
    .grid{grid-template-columns:repeat(2,1fr)}
    .form-row{grid-template-columns:1fr 1fr}
    .pricing{grid-template-columns:repeat(2,1fr)}
    .price.featured{transform:none}
}

/* =========================
   MOBILE - SOMENTE MENU INFERIOR
========================= */
@media(max-width:768px){
    html,body{overflow-x:hidden !important}

    .layout{
        display:block;
        width:100%;
        min-height:100vh;
    }

    .sidebar{
        display:none !important;
    }

    .main,
    .sidebar:hover + .main{
        margin-left:0 !important;
        width:100% !important;
        max-width:100% !important;
        padding:18px 18px 92px !important;
    }

    .top{
        display:block;
        margin-bottom:18px;
    }

    .top h1{
        font-size:30px;
        line-height:1.15;
        margin:0 0 8px 0;
    }

    .top > div{
        font-size:13px;
        color:#334155;
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
    }

    .grid{
        grid-template-columns:1fr !important;
        gap:16px;
        width:100%;
    }

    .stat{
        width:100%;
        border-radius:24px;
        padding:24px;
        box-shadow:0 8px 25px rgba(0,0,0,.08);
    }

    .stat b{
        font-size:30px;
        line-height:1.2;
    }

    .card{
        width:100%;
        border-radius:24px;
        padding:22px;
        overflow-x:auto;
        box-shadow:0 8px 25px rgba(0,0,0,.08);
    }

    .card h1,.card h2,.card h3,.card h4{line-height:1.2}

    .form-row{
        grid-template-columns:1fr !important;
        gap:10px;
    }

    .table{min-width:680px}

    .pricing{
        grid-template-columns:1fr !important;
        padding:18px;
        gap:18px;
    }

    .price,.price.featured{
        transform:none;
        padding:24px;
    }

    .price p{min-height:auto}

    .bottom-nav{
        display:flex !important;
        position:fixed !important;
        left:0 !important;
        right:0 !important;
        bottom:0 !important;
        width:100% !important;
        height:68px !important;
        background:#081d4d !important;
        border-top:1px solid rgba(255,255,255,.12) !important;
        box-shadow:0 -10px 30px rgba(0,0,0,.25) !important;
        z-index:999999 !important;
        justify-content:space-around !important;
        align-items:center !important;
        padding:7px 8px calc(7px + env(safe-area-inset-bottom)) !important;
    }

    .bottom-nav a{
        flex:1;
        height:54px;
        color:rgba(255,255,255,.70) !important;
        text-decoration:none !important;
        display:flex !important;
        flex-direction:column !important;
        align-items:center !important;
        justify-content:center !important;
        gap:4px !important;
        font-size:11px !important;
        font-weight:700 !important;
        border-radius:16px !important;
    }

    .bottom-nav a i{font-size:20px !important;line-height:1 !important}
    .bottom-nav a span{display:block !important;line-height:1 !important}

    .bottom-nav a.active{
        color:#22c55e !important;
        background:rgba(34,197,94,.16) !important;
        box-shadow:inset 0 0 0 1px rgba(34,197,94,.18);
    }
}
