@charset "UTF-8";
/* ==========================================================
   FLUX IMPORTS — Tema "Luxe" (preto + dourado, vidro)
   Carregar DEPOIS de style.css
   ========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700;800&family=Poppins:wght@300;400;500;600&display=swap');

:root {
    --lx-gold: #D9B45A;
    --lx-gold-2: #F3D98B;
    --lx-gold-3: #A9822F;
    --lx-gold-grad: linear-gradient(135deg, #F6DE95 0%, #D9B45A 45%, #A9822F 100%);
    --lx-gold-text: linear-gradient(180deg, #FBE7A8 0%, #E2BE66 55%, #B88C36 100%);
    --lx-bg: #07070A;
    --lx-glass: rgba(18, 18, 22, 0.72);
    --lx-glass-2: rgba(26, 26, 31, 0.78);
    --lx-input: rgba(10, 10, 13, 0.65);
    --lx-line: rgba(217, 180, 90, 0.22);
    --lx-line-soft: rgba(255, 255, 255, 0.07);
    --lx-text: #F4EFE6;
    --lx-muted: #9C968A;
    --lx-radius: 18px;
    --lx-radius-sm: 11px;
    /* imagem de fundo — trocar quando chegar a definitiva */
    --lx-bg-image: radial-gradient(1200px 700px at 85% 10%, rgba(217,180,90,0.16), transparent 60%),
                   radial-gradient(900px 600px at 10% 100%, rgba(217,180,90,0.08), transparent 60%);
}

/* ---------- Fundo ---------- */
html, body { background: var(--lx-bg) !important; }
body {
    color: var(--lx-text) !important;
    font-family: 'Poppins', sans-serif;
}
body::before {
    content: "";
    position: fixed; inset: 0; z-index: -2;
    background: var(--lx-bg-image), var(--lx-bg);
    background-size: cover; background-position: center;
}
body::after {
    content: "";
    position: fixed; inset: 0; z-index: -1;
    background: linear-gradient(90deg, rgba(5,5,7,0.92) 0%, rgba(5,5,7,0.70) 45%, rgba(5,5,7,0.45) 100%);
    pointer-events: none;
}

/* ---------- Sidebar ---------- */
.sidebar {
    background: linear-gradient(180deg, rgba(14,14,17,0.92), rgba(10,10,12,0.88)) !important;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-right: 1px solid var(--lx-line) !important;
    box-shadow: 8px 0 40px rgba(0,0,0,0.45);
    padding: 1.75rem 1.25rem !important;
    overflow-y: auto;
}
.sidebar .logo {
    display: flex; align-items: center; gap: .75rem;
    padding-bottom: 1.25rem; margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--lx-line-soft);
}
.sidebar .logo-img { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; }
.sidebar .logo span {
    font-family: 'Montserrat', sans-serif; font-weight: 700;
    font-size: 1.15rem; line-height: 1.25; letter-spacing: .02em;
    background: var(--lx-gold-text); -webkit-background-clip: text; background-clip: text;
    color: transparent !important;
}
.user-profile {
    background: rgba(255,255,255,0.03) !important;
    border: 1px solid var(--lx-line-soft) !important;
    border-radius: 14px !important;
    padding: .75rem !important;
}
.avatar { border: 1px solid var(--lx-line); border-radius: 50% !important; }
.user-info .email { color: var(--lx-text) !important; font-size: .8rem; }
.role-badge {
    background: var(--lx-gold-grad) !important; color: #141109 !important;
    border: none !important; border-radius: 999px !important;
    font-weight: 700; letter-spacing: .08em; font-size: .62rem !important;
    padding: .15rem .6rem !important;
}
.sidebar hr { border: 0; border-top: 1px solid var(--lx-line-soft); margin: 1.25rem 0; }

.nav-links { list-style: none; display: flex; flex-direction: column; gap: .3rem; }
.nav-links a {
    position: relative;
    display: flex !important; align-items: center; gap: .8rem;
    padding: .78rem 1rem !important;
    border-radius: 12px !important;
    color: #CFC6B3 !important;
    text-decoration: none !important;
    font-weight: 500; font-size: .95rem; line-height: 1.25;
    border: 1px solid transparent;
    transition: background .2s, color .2s, border-color .2s, transform .2s !important;
}
.nav-links a::before {
    content: ""; flex: 0 0 18px; width: 18px; height: 18px;
    background: var(--lx-gold);
    -webkit-mask: var(--lx-ico) center / contain no-repeat;
            mask: var(--lx-ico) center / contain no-repeat;
    opacity: .9;
}
.nav-links a:hover {
    background: rgba(217,180,90,0.08) !important;
    border-color: var(--lx-line);
    color: var(--lx-gold-2) !important;
}
.nav-links a.active {
    background: var(--lx-gold-grad) !important;
    color: #16120A !important; font-weight: 600;
    box-shadow: 0 6px 22px rgba(217,180,90,0.28), inset 0 1px 0 rgba(255,255,255,0.45);
}
.nav-links a.active::before { background: #16120A; opacity: 1; }

/* ícones (SVG em máscara) */
.nav-links a { --lx-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.nav-links li:nth-child(1) a { --lx-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5V20a1 1 0 0 1-1 1h-5v-6H9v6H4a1 1 0 0 1-1-1z'/%3E%3C/svg%3E"); }
.nav-links a[href*="history"] { --lx-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M7 9h10M7 13h6'/%3E%3C/svg%3E"); }
.nav-links a[href*="dashboard"] { --lx-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-7M22 20H2'/%3E%3C/svg%3E"); }
.nav-links a[href*="reseller"] { --lx-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l1.5-5h15L21 9M3 9h18v11H3zM9 20v-6h6v6'/%3E%3C/svg%3E"); }
.nav-links a[href*="taxes"] { --lx-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M15 9.5c-.5-1-1.6-1.5-3-1.5-1.7 0-3 .8-3 2s1.3 1.7 3 2 3 .8 3 2-1.3 2-3 2c-1.4 0-2.5-.5-3-1.5M12 6v12'/%3E%3C/svg%3E"); }
.nav-links a[href*="admin"] { --lx-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 4.5-3.4 8-8 9-4.6-1-8-4.5-8-9V6z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); }
.nav-links a[href*="profile"] { --lx-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1.5-4 4.5-6 8-6s6.5 2 8 6'/%3E%3C/svg%3E"); }
.nav-links a[href*="security"] { --lx-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E"); }
.nav-links a[href*="wa.me"] { --lx-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.8 7L4 20l1.1-4.9A8 8 0 1 1 21 12z'/%3E%3C/svg%3E"); }

.btn-logout {
    border-radius: 12px !important;
    border: 1px solid var(--lx-line) !important;
    background: transparent !important; color: var(--lx-muted) !important;
}
.btn-logout:hover { color: var(--lx-gold-2) !important; border-color: var(--lx-gold) !important; }

/* ---------- Conteúdo ---------- */
.main-content { background: transparent !important; padding: 2rem 2.5rem !important; }
.container { max-width: 1180px; }
.top-bar { margin-bottom: 1rem; }
.btn-logout-top {
    background: rgba(18,18,22,0.6) !important; backdrop-filter: blur(10px);
    border: 1px solid var(--lx-line) !important; border-radius: 999px !important;
    color: var(--lx-text) !important; padding: .45rem 1rem !important;
}

.card {
    background: linear-gradient(180deg, var(--lx-glass-2), var(--lx-glass)) !important;
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    border: 1px solid var(--lx-line) !important;
    border-radius: var(--lx-radius) !important;
    box-shadow: 0 30px 80px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.05) !important;
    padding: 2rem 2.25rem !important;
}
.card { position: relative; overflow: hidden; }
.card::before {
    content: ""; position: absolute; top: 0; left: 8%; right: 8%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(243,217,139,0.7), transparent);
    pointer-events: none;
}
.card-header { border-bottom: 1px solid var(--lx-line-soft) !important; padding-bottom: 1.25rem !important; margin-bottom: 1.5rem !important; }
.card-header h1, .card-header h2, .main-content h1, .main-content h2 {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important; letter-spacing: .005em !important;
    text-transform: none !important;
    background: var(--lx-gold-text); -webkit-background-clip: text; background-clip: text;
    color: transparent !important;
}
.card-header h1, .main-content h1 { font-size: 2.1rem !important; line-height: 1.15; }
.card-header h2, .main-content h2 { font-size: 1.45rem !important; }
.card-header p, .card-header small { color: var(--lx-muted) !important; }
.main-content h3, .main-content h4 { color: var(--lx-gold-2) !important; font-family: 'Montserrat', sans-serif; }

/* ---------- Formulários ---------- */
.form-label, label {
    color: #D8CFBD !important; font-weight: 500 !important;
    font-size: .82rem !important; letter-spacing: .02em !important;
    text-transform: none !important;
}
.form-control, .form-select, .main-content input:not([type=checkbox]):not([type=radio]):not([type=file]), .main-content select, .main-content textarea {
    background-color: var(--lx-input) !important;
    border: 1px solid rgba(255,255,255,0.10) !important;
    border-radius: var(--lx-radius-sm) !important;
    color: var(--lx-text) !important;
    padding: .8rem 1rem !important;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.form-control::placeholder, .main-content input::placeholder { color: #6E695F !important; }
.form-control:hover, .main-content input:hover, .main-content select:hover { border-color: var(--lx-line) !important; }
.form-control:focus, .form-select:focus, .main-content input:focus, .main-content select:focus, .main-content textarea:focus {
    outline: none !important;
    border-color: var(--lx-gold) !important;
    box-shadow: 0 0 0 3px rgba(217,180,90,0.18) !important;
    background-color: rgba(14,14,17,0.85) !important;
}
select option { background: #121215; color: var(--lx-text); }
.sidebar .form-control { border-radius: 12px !important; background-color: rgba(255,255,255,0.03) !important; }

/* ---------- Botões ---------- */
.btn { border-radius: 12px !important; font-weight: 600 !important; letter-spacing: .02em; transition: transform .15s, box-shadow .2s, filter .2s !important; }
.btn-primary, .btn-filter.primary {
    background: var(--lx-gold-grad) !important; color: #16120A !important; border: none !important;
    box-shadow: 0 8px 26px rgba(217,180,90,0.30), inset 0 1px 0 rgba(255,255,255,0.5) !important;
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 12px 34px rgba(217,180,90,0.40) !important; }
.btn-secondary, .btn-filter {
    background: rgba(255,255,255,0.03) !important; color: var(--lx-text) !important;
    border: 1px solid var(--lx-line) !important; border-radius: 12px !important;
}
.btn-secondary:hover, .btn-filter:hover { border-color: var(--lx-gold) !important; color: var(--lx-gold-2) !important; }
.btn-danger { border-radius: 12px !important; }

/* ---------- Resultados / resumo ---------- */
.result-box, .summary-grid > *, .cost-row {
    border-color: var(--lx-line-soft) !important;
}
.result-box {
    background: rgba(8,8,10,0.45) !important;
    border: 1px solid var(--lx-line) !important; border-radius: 14px !important;
}
.summary-label { color: var(--lx-muted) !important; }
.summary-value, .cost-value { color: var(--lx-text) !important; font-variant-numeric: tabular-nums; }
.total, .total-row, .total .summary-value {
    color: var(--lx-gold-2) !important; font-weight: 700 !important;
}
.rate-badge {
    align-self: flex-start; display: inline-block;
    background: rgba(217,180,90,0.12) !important; color: var(--lx-gold-2) !important;
    border: 1px solid var(--lx-line) !important; border-radius: 999px !important; padding: .25rem .75rem !important;
}
.spinner { border-top-color: var(--lx-gold) !important; }

/* ---------- Tabelas ---------- */
.history-table, .compare-table, .audit-table, .main-content table {
    border-collapse: separate !important; border-spacing: 0 !important;
}
.main-content table th {
    background: rgba(217,180,90,0.07) !important; color: var(--lx-gold-2) !important;
    font-weight: 600; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase;
    border-bottom: 1px solid var(--lx-line) !important;
}
.main-content table td { border-bottom: 1px solid var(--lx-line-soft) !important; color: var(--lx-text); }
.main-content table tbody tr { transition: background .15s; }
.main-content table tbody tr:hover { background: rgba(217,180,90,0.05) !important; }
.table-responsive { border-radius: 14px; border: 1px solid var(--lx-line-soft); }

/* ---------- Modais / alertas ---------- */
.modal-content {
    background: rgba(18,18,22,0.95) !important; backdrop-filter: blur(20px);
    border: 1px solid var(--lx-line) !important; border-radius: var(--lx-radius) !important;
}
.warning-alert, .admin-alert, .expiry-banner { border-radius: 12px !important; }

/* ---------- Scrollbar ---------- */
* { scrollbar-width: thin; scrollbar-color: rgba(217,180,90,0.35) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(217,180,90,0.3); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
    .main-content { padding: 1rem !important; padding-top: 64px !important; }
    .card { padding: 1.25rem !important; border-radius: 14px !important; }
    .card-header h1, .main-content h1 { font-size: 1.6rem !important; }
    .hamburger-btn {
        background: rgba(18,18,22,0.8) !important; backdrop-filter: blur(10px);
        border: 1px solid var(--lx-line) !important; border-radius: 12px !important; color: var(--lx-gold) !important;
    }
}

/* ==========================================================
   "TELA ABERTA" — app como janela flutuante sobre o fundo
   ========================================================== */
:root {
    --lx-frame-gap: clamp(16px, 3.2vw, 48px);
    --lx-frame-radius: 26px;
    --lx-active-grad: linear-gradient(135deg, #F1DDA9 0%, #D9BC7C 55%, #BE9A5A 100%);
}
@media (min-width: 901px) {
    html, body { height: 100%; overflow: hidden; }
    body::after { background: radial-gradient(ellipse at center, rgba(5,5,7,0.15) 0%, rgba(5,5,7,0.55) 100%) !important; }

    .app-layout {
        position: fixed !important;
        inset: var(--lx-frame-gap);
        max-width: 1480px; margin: 0 auto;
        display: flex !important;
        border-radius: var(--lx-frame-radius);
        overflow: hidden;
        background: rgba(12,12,14,0.86);
        backdrop-filter: blur(26px) saturate(130%);
        -webkit-backdrop-filter: blur(26px) saturate(130%);
        border: 1px solid rgba(217,180,90,0.38);
        box-shadow:
            0 50px 120px rgba(0,0,0,0.70),
            0 0 0 1px rgba(0,0,0,0.6),
            inset 0 1px 0 rgba(255,255,255,0.07);
    }
    .sidebar {
        position: relative !important;
        top: auto !important; left: auto !important;
        transform: none !important;
        height: 100% !important; flex: 0 0 270px; width: 270px !important;
        background: rgba(8,8,10,0.55) !important;
        backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
        box-shadow: none !important;
        border-right: 1px solid rgba(255,255,255,0.06) !important;
        padding: 2.25rem 1.4rem 1.5rem !important;
    }
    .main-content {
        margin-left: 0 !important;
        height: 100%; overflow-y: auto !important;
        padding: 2.25rem 2.75rem 3rem !important;
    }
    .hamburger-btn, .sidebar-overlay { display: none !important; }
}

/* Logo empilhado, centrado (FLUX / IMPORTS) */
.sidebar .logo {
    flex-direction: column; justify-content: center; text-align: center;
    gap: .6rem !important; padding: .25rem 0 1.5rem !important;
}
.sidebar .logo-img { width: 70px !important; height: 70px !important; border-radius: 14px; }
.sidebar .logo span {
    font-size: 1rem !important; letter-spacing: .14em !important;
    text-transform: uppercase; font-weight: 700;
}

/* Item ativo: dourado claro, como no mockup */
.nav-links a.active {
    background: var(--lx-active-grad) !important;
    color: #1A150C !important;
    box-shadow: 0 8px 24px rgba(217,188,124,0.22), inset 0 1px 0 rgba(255,255,255,0.55) !important;
}
.nav-links a { color: #E3D6B8 !important; font-weight: 400 !important; }
.nav-links a::before { background: #D9BC7C; }
.nav-links a:hover { background: rgba(217,188,124,0.07) !important; border-color: transparent !important; }

/* Cartões internos: mais discretos dentro da janela */
.app-layout .card {
    background: rgba(20,20,23,0.80) !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(255,255,255,0.09) !important;
    border-radius: 18px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.04) !important;
}
.app-layout .card::before { display: none; }
.card-header h1, .main-content h1 {
    background: none !important; color: #F5F0E6 !important;
    font-weight: 600 !important; font-size: 2.2rem !important;
}
.card-header h2, .main-content h2 {
    background: none !important; color: #F2EADB !important; font-weight: 600 !important;
}
.btn-secondary, .btn-filter, .btn-logout-top {
    border-color: rgba(255,255,255,0.16) !important; border-radius: 10px !important;
}

/* fundo aplicado direto no body (fiável) */
html { background: #050506 !important; }
body {
    background: var(--lx-bg-image), var(--lx-bg) !important;
    background-size: cover !important; background-position: center !important;
    background-attachment: fixed !important; background-repeat: no-repeat !important;
}
body::before { display: none !important; }
body::after { z-index: 0 !important; }
.app-layout { z-index: 1; }
@media (min-width: 901px) {
    .app-layout { width: auto !important; }
}

/* janela mais estreita e translúcida: o carro aparece à volta e por trás */
@media (min-width: 901px) {
    :root { --lx-frame-gap: clamp(20px, 4.5vh, 56px); }
    .app-layout {
        max-width: min(1240px, calc(100vw - 160px)) !important;
        background: rgba(10,10,12,0.74) !important;
        backdrop-filter: blur(16px) saturate(120%) !important;
        -webkit-backdrop-filter: blur(16px) saturate(120%) !important;
    }
    .sidebar { background: rgba(6,6,8,0.55) !important; }
    body::after { background: radial-gradient(ellipse at center, rgba(5,5,7,0.25) 0%, rgba(5,5,7,0.45) 100%) !important; }
}

/* ==========================================================
   V3 — imagem nítida DENTRO da janela, desfocada fora
   posição/zoom da imagem muda por secção (theme-luxe.js)
   ========================================================== */
:root {
    --lx-photo: url("bg-flux.jpg");
    --lx-pos: 62% 55%;
    --lx-zoom: 1.12;
    --lx-size: calc(max(100vw, 150vh) * var(--lx-zoom)) auto;
    --lx-move: background-position 1.1s cubic-bezier(.65,.05,.25,1), background-size 1.1s cubic-bezier(.65,.05,.25,1);
}
body {
    background: var(--lx-photo) var(--lx-pos) / var(--lx-size) no-repeat fixed, #050506 !important;
    transition: var(--lx-move);
}
body::after {
    z-index: 0 !important;
    background: rgba(4,4,6,0.62) !important;
    backdrop-filter: blur(14px) saturate(110%);
    -webkit-backdrop-filter: blur(14px) saturate(110%);
}
@media (min-width: 901px) {
    .app-layout {
        background: #0B0B0D !important;
        backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
        border: 1px solid rgba(217,180,90,0.42) !important;
    }
    .sidebar { background: linear-gradient(180deg, #0E0E11, #09090B) !important; z-index: 2; }
    .main-content {
        position: relative;
        background:
            linear-gradient(90deg, rgba(9,9,11,0.96) 0%, rgba(9,9,11,0.80) 30%, rgba(9,9,11,0.42) 62%, rgba(9,9,11,0.25) 100%),
            linear-gradient(180deg, rgba(9,9,11,0.10) 0%, rgba(9,9,11,0.55) 75%, rgba(9,9,11,0.85) 100%),
            var(--lx-photo) var(--lx-pos) / var(--lx-size) no-repeat fixed !important;
        transition: var(--lx-move);
    }
    .main-content .container { max-width: 1020px; margin: 0; }
}

/* Título grande da marca no topo (inserido pelo JS) */
.lx-brand-title {
    font-family: 'Montserrat', sans-serif; font-weight: 600;
    font-size: clamp(1.8rem, 3vw, 2.8rem); line-height: 1.1;
    background: var(--lx-gold-text); -webkit-background-clip: text; background-clip: text; color: transparent;
    text-shadow: 0 2px 30px rgba(0,0,0,0.35);
}
.top-bar { align-items: center; margin-bottom: 1.75rem !important; }

/* cartões sobre a foto: vidro escuro */
.app-layout .card {
    background: rgba(14,14,17,0.82) !important;
    backdrop-filter: blur(14px) saturate(120%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(120%) !important;
    border: 1px solid rgba(217,180,90,0.28) !important;
}
.card-header h1, .main-content .card h1 {
    background: var(--lx-gold-text) !important; -webkit-background-clip: text !important; background-clip: text !important;
    color: transparent !important; font-size: 1.7rem !important;
}

/* V3.1 — foto ancorada à área de conteúdo; cartões mais estreitos para o carro aparecer à direita */
@media (min-width: 901px) {
    .main-content {
        background:
            linear-gradient(90deg, rgba(9,9,11,0.92) 0%, rgba(9,9,11,0.70) 35%, rgba(9,9,11,0.20) 70%, rgba(9,9,11,0.05) 100%),
            linear-gradient(180deg, rgba(9,9,11,0.15) 0%, rgba(9,9,11,0.10) 55%, rgba(9,9,11,0.80) 100%),
            var(--lx-photo) var(--lx-pos) / calc(100% * var(--lx-zoom) + 40%) auto no-repeat scroll !important;
        background-color: #0B0B0D !important;
    }
    .top-bar { min-height: 150px; align-items: flex-start !important; padding-top: .5rem; }
    .main-content .container { width: 72%; min-width: 640px; max-width: 900px !important; margin: 0 !important; }
}

/* ==========================================================
   V4 — DESIGN COMPLETO DE TODOS OS COMPONENTES
   ========================================================== */
:root { accent-color: #D9B45A; }
.main-content a:not(.btn) { color: var(--lx-gold-2); text-decoration: none; }
.main-content a:not(.btn):hover { color: #fff3cf; text-decoration: underline; text-underline-offset: 3px; }
::selection { background: rgba(217,180,90,0.35); color: #fff; }

/* secções / títulos de bloco dentro dos cartões */
.card h3, .card h4 {
    font-size: 1rem !important; font-weight: 600 !important; letter-spacing: .04em;
    color: var(--lx-gold-2) !important; margin-bottom: .9rem;
    display: flex; align-items: center; gap: .6rem;
}
.card h3::after, .card h4::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(217,180,90,0.35), transparent); }
#tax-adjust-section, #pdf-images-section, .notes-section {
    margin-top: 1.5rem; padding: 1.25rem 1.4rem !important;
    background: rgba(255,255,255,0.025) !important;
    border: 1px solid rgba(217,180,90,0.16) !important; border-radius: 14px !important;
}

/* caixas de resumo / KPIs */
.summary-grid { gap: 1rem !important; }
.summary-grid > * {
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)) !important;
    border: 1px solid rgba(217,180,90,0.18) !important; border-radius: 14px !important;
    padding: 1.1rem 1.25rem !important;
    transition: border-color .2s, transform .2s;
}
.summary-grid > *:hover { border-color: rgba(217,180,90,0.45) !important; transform: translateY(-2px); }
.summary-label { font-size: .75rem !important; letter-spacing: .08em; text-transform: uppercase; }
.summary-value { font-family: 'Montserrat', sans-serif; font-size: 1.45rem !important; font-weight: 600 !important; }
.summary-grid .total, .summary-grid > .total {
    background: linear-gradient(135deg, rgba(243,217,139,0.16), rgba(169,130,47,0.10)) !important;
    border-color: rgba(217,180,90,0.55) !important;
}
.summary-grid .total .summary-value, .total .cost-value {
    background: var(--lx-gold-text); -webkit-background-clip: text; background-clip: text; color: transparent !important;
}
.cost-row { padding: .7rem .25rem !important; border-bottom: 1px dashed rgba(255,255,255,0.08) !important; }
.cost-row:last-child { border-bottom: 0 !important; }
.cost-row.total { border-top: 1px solid rgba(217,180,90,0.4) !important; margin-top: .4rem; padding-top: 1rem !important; font-size: 1.1rem; }

/* tabelas (histórico, comparação, auditoria) */
.main-content table { width: 100%; font-size: .9rem; }
.main-content table th, .main-content table td { padding: .85rem 1rem !important; }
.main-content table th:first-child { border-top-left-radius: 12px; }
.main-content table th:last-child { border-top-right-radius: 12px; }
.main-content table tbody tr:nth-child(even) { background: rgba(255,255,255,0.015); }
.compare-table .total-row td, .total-row td {
    background: rgba(217,180,90,0.10) !important; color: var(--lx-gold-2) !important; font-weight: 700;
    border-top: 1px solid rgba(217,180,90,0.45) !important;
}

/* filtros */
.filter-bar { display: flex; flex-wrap: wrap; gap: .6rem !important; padding: .5rem 0 1rem; }
.btn-filter { padding: .5rem 1rem !important; border-radius: 999px !important; font-size: .85rem !important; }
.btn-filter.primary, .btn-filter.active { box-shadow: 0 4px 16px rgba(217,180,90,0.28) !important; }

/* botões — tamanhos e variantes */
.btn { padding: .85rem 1.6rem; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; cursor: pointer; }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; filter: grayscale(.4); box-shadow: none !important; }
.btn-sm { padding: .42rem .85rem !important; font-size: .8rem !important; border-radius: 9px !important; }
.btn-danger {
    background: rgba(217,68,68,0.10) !important; color: #FF8E8E !important;
    border: 1px solid rgba(217,68,68,0.45) !important; box-shadow: none !important;
}
.btn-danger:hover { background: rgba(217,68,68,0.20) !important; color: #fff !important; }
.btn-primary.mt-4, form > .btn-primary { width: 100%; padding: 1rem !important; font-size: 1rem !important; letter-spacing: .06em; text-transform: uppercase; }

/* selos */
.override-badge, .trend-indicator {
    display: inline-flex; align-items: center; gap: .25rem;
    border-radius: 999px !important; padding: .12rem .6rem !important; font-size: .72rem !important; font-weight: 600;
}
.override-badge { background: rgba(217,180,90,0.14) !important; color: var(--lx-gold-2) !important; border: 1px solid rgba(217,180,90,0.4) !important; }
.trend-up { background: rgba(76,175,113,0.12) !important; color: #7FE0A4 !important; }
.trend-down { background: rgba(217,68,68,0.12) !important; color: #FF9A9A !important; }
.trend-neutral { background: rgba(255,255,255,0.06) !important; color: var(--lx-muted) !important; }

/* alertas */
.warning-alert, .admin-alert, .expiry-banner {
    border: 1px solid rgba(229,168,72,0.45) !important;
    background: linear-gradient(90deg, rgba(229,168,72,0.14), rgba(229,168,72,0.04)) !important;
    color: #F6D9A6 !important; padding: .9rem 1.1rem !important;
    backdrop-filter: blur(10px);
}
.admin-alert.success { border-color: rgba(76,175,113,0.5) !important; background: linear-gradient(90deg, rgba(76,175,113,0.16), rgba(76,175,113,0.04)) !important; color: #A8EDC2 !important; }
.admin-alert.error { border-color: rgba(217,68,68,0.5) !important; background: linear-gradient(90deg, rgba(217,68,68,0.16), rgba(217,68,68,0.04)) !important; color: #FFB3B3 !important; }
.notes-saved { color: #7FE0A4 !important; font-size: .8rem; }

/* modais */
.modal-overlay, .modal { background: rgba(3,3,5,0.72) !important; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.modal-content { box-shadow: 0 40px 120px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.06) !important; padding: 1.75rem 2rem !important; }
.modal-header { border-bottom: 1px solid rgba(255,255,255,0.07) !important; padding-bottom: 1rem !important; margin-bottom: 1.25rem !important; }
.modal-header h2, .modal-header h3 { color: var(--lx-gold-2) !important; }
.modal-close { color: var(--lx-muted) !important; background: transparent !important; border: 0 !important; font-size: 1.4rem; }
.modal-close:hover { color: var(--lx-gold-2) !important; }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; border-top: 1px solid rgba(255,255,255,0.07); padding-top: 1rem; margin-top: 1.25rem; }

/* inputs especiais */
.main-content input[type=file] {
    color: var(--lx-muted); font-size: .85rem;
}
.main-content input[type=file]::file-selector-button {
    background: rgba(217,180,90,0.12); color: var(--lx-gold-2);
    border: 1px solid rgba(217,180,90,0.4); border-radius: 9px; padding: .45rem .9rem; margin-right: .8rem; cursor: pointer;
}
.main-content input[type=checkbox], .main-content input[type=radio] { width: 1.05rem; height: 1.05rem; accent-color: #D9B45A; }
.main-content select { appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D9B45A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important; background-position: right .9rem center !important; background-size: 16px !important;
    padding-right: 2.5rem !important;
}
.sidebar select.form-control { appearance: none; -webkit-appearance: none; color: var(--lx-text) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D9B45A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important; background-position: right .8rem center !important; background-size: 15px !important; }
textarea { min-height: 110px; resize: vertical; }

/* loader */
.loader p { color: var(--lx-muted); }
.spinner { border-color: rgba(217,180,90,0.15) !important; border-top-color: var(--lx-gold) !important; }

/* rodapé */
.app-footer { background: transparent !important; border-top: 1px solid rgba(255,255,255,0.06) !important; color: var(--lx-muted) !important; margin-top: 2rem; }
.app-footer-links a { color: var(--lx-muted) !important; }
.app-footer-links a:hover { color: var(--lx-gold-2) !important; }
.app-footer-copy { color: #6E695F !important; font-size: .78rem; }

/* páginas soltas (login, registo, recuperar senha) — cartão de vidro ao centro sobre a foto */
.standalone-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem;
    background: transparent !important; position: relative; z-index: 1;
}
.standalone-page .card, .standalone-page > div:not(.standalone-header) {
    max-width: 440px; width: 100%;
    background: rgba(12,12,15,0.80) !important; backdrop-filter: blur(22px) !important; -webkit-backdrop-filter: blur(22px) !important;
    border: 1px solid rgba(217,180,90,0.42) !important; border-radius: 22px !important;
    box-shadow: 0 40px 120px rgba(0,0,0,0.65) !important;
}
.standalone-header { text-align: center; }
.logo-img-login { filter: drop-shadow(0 8px 24px rgba(217,180,90,0.25)); }

/* botão WhatsApp flutuante: harmonizar */
a[href*="wa.me"][style*="fixed"], .whatsapp-float, #whatsapp-float, .help-button {
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 0 1px rgba(217,180,90,0.35) !important;
}

/* entrada suave dos cartões */
@media (prefers-reduced-motion: no-preference) {
    .app-layout .card { animation: lxIn .6s cubic-bezier(.2,.7,.2,1) both; }
    .app-layout .card:nth-of-type(2) { animation-delay: .08s; }
    .app-layout .card:nth-of-type(3) { animation-delay: .16s; }
    @keyframes lxIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* páginas com muitos dados: conteúdo mais largo */
@media (min-width: 901px) {
    [data-lx-page="dashboard"] .main-content .container,
    [data-lx-page="admin"] .main-content .container,
    [data-lx-page="taxes"] .main-content .container,
    [data-lx-page="reseller"] .main-content .container { width: 90% !important; max-width: 1180px !important; }
}
canvas { filter: drop-shadow(0 4px 14px rgba(0,0,0,0.25)); }

/* ecrãs médios / janela do Chrome estreita: aproveitar melhor o espaço */
@media (min-width: 901px) and (max-width: 1400px) {
    :root { --lx-frame-gap: 18px; }
    .app-layout { max-width: calc(100vw - 36px) !important; }
    .sidebar { flex: 0 0 230px !important; width: 230px !important; padding: 1.75rem 1rem 1.25rem !important; }
    .main-content { padding: 1.5rem 1.75rem 2.5rem !important; }
    .main-content .container { width: 100% !important; min-width: 0 !important; max-width: none !important; }
    .top-bar { min-height: 110px; }
}
.main-content .container { box-sizing: border-box; }

/* V5 — conteúdo expandido: sem tabelas apertadas nem scroll lateral */
@media (min-width: 901px) {
    :root { --lx-frame-gap: clamp(14px, 2.6vh, 34px); }
    .app-layout { max-width: min(1560px, calc(100vw - 56px)) !important; }
    .main-content { padding: 1.75rem 2.25rem 2.75rem !important; }
    .main-content .container,
    [data-lx-page] .main-content .container { width: 100% !important; min-width: 0 !important; max-width: 1320px !important; margin: 0 !important; }
    .top-bar { min-height: 120px; }
    /* foto: escurecer só à esquerda, para o carro continuar visível à direita e no topo */
    .main-content {
        background:
            linear-gradient(90deg, rgba(9,9,11,0.88) 0%, rgba(9,9,11,0.55) 45%, rgba(9,9,11,0.20) 80%, rgba(9,9,11,0.08) 100%),
            linear-gradient(180deg, rgba(9,9,11,0.05) 0%, rgba(9,9,11,0.15) 50%, rgba(9,9,11,0.75) 100%),
            var(--lx-photo) var(--lx-pos) / calc(100% * var(--lx-zoom) + 30%) auto no-repeat scroll !important;
        background-color: #0B0B0D !important;
    }
    .app-layout .card { background: rgba(12,12,15,0.84) !important; }
}
/* tabelas cabem na largura */
.table-responsive { overflow-x: auto; }
.main-content table { table-layout: auto; min-width: 0 !important; }
.main-content table td:first-child { min-width: 220px; }
.main-content table th { white-space: nowrap; }
.main-content table td .btn, .main-content table td button { margin: 2px 4px 2px 0; white-space: nowrap; }
.main-content table td:last-child { white-space: nowrap; }

/* V5.1 — janela ainda maior */
@media (min-width: 901px) {
    :root { --lx-frame-gap: clamp(8px, 1.4vh, 18px); }
    .app-layout { max-width: min(1760px, calc(100vw - 24px)) !important; }
    .main-content .container,
    [data-lx-page] .main-content .container { max-width: 1480px !important; }
    .top-bar { min-height: 100px; }
}

/* V5.2 — tabelas compactas para caber tudo sem arrastar */
.main-content table td:first-child { min-width: 0 !important; }
.main-content table { font-size: .84rem !important; }
.main-content table th, .main-content table td { padding: .65rem .7rem !important; }
.main-content table th { font-size: .7rem !important; letter-spacing: .04em !important; }
.main-content table td .btn, .main-content table td button { padding: .32rem .65rem !important; font-size: .75rem !important; }
.main-content table input[type=checkbox] { margin: 0; }

/* avatar do perfil: círculo perfeito, logo inteiro sem cortes */
.user-profile { display: flex !important; align-items: center !important; gap: .75rem !important; }
.user-profile .avatar {
    flex: 0 0 46px !important; width: 46px !important; height: 46px !important;
    min-width: 46px; aspect-ratio: 1 / 1; border-radius: 50% !important;
    overflow: hidden; display: flex; align-items: center; justify-content: center;
    background: #050505 !important; border: 1.5px solid rgba(217,180,90,0.55) !important;
    padding: 5px; box-sizing: border-box;
}
.user-profile .avatar img {
    width: 100% !important; height: 100% !important; object-fit: contain !important;
    border-radius: 50%; display: block;
}
.user-info { min-width: 0; }

/* ==========================================================
   V6 — troca de secção sem "piscar" preto
   ========================================================== */
/* transição suave entre páginas (Chrome/Edge/Safari recentes) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) {
    animation-duration: .45s; animation-timing-function: cubic-bezier(.4,0,.2,1);
}
/* a moldura e o menu ficam parados; só o conteúdo faz fade */
@media (min-width: 901px) {
    .sidebar { view-transition-name: lx-sidebar; }
    .app-layout { view-transition-name: lx-frame; }
}
::view-transition-group(lx-sidebar), ::view-transition-group(lx-frame) { animation-duration: .45s; }

/* a página já não fica escondida (preta) enquanto carrega:
   o fundo, a janela e o menu aparecem logo; só os textos esperam pela tradução */
html { visibility: visible !important; background: #050506 !important; }
html:not(.i18n-ready) body { opacity: 1 !important; }
html:not(.i18n-ready) .main-content .container,
html:not(.i18n-ready) .nav-links,
html:not(.i18n-ready) .lx-brand-title { opacity: 0; }
.main-content .container, .nav-links, .lx-brand-title { transition: opacity .25s ease; }

/* FIX login: a camada de desfoque ficava por cima das páginas sem janela (login, registo) */
html {
    background: var(--lx-photo) var(--lx-pos) / var(--lx-size) no-repeat fixed, #050506 !important;
    transition: var(--lx-move);
}
body { background: transparent !important; }
body::after { z-index: -1 !important; }

/* Sem cadastro aberto: a conta so e criada depois da assinatura */
#signup-form, .login-footer:has([data-action="showSignup"]) { display: none !important; }
.lx-plans { margin-top: 18px; text-align: center; font-size: 13px; color: rgba(255,255,255,.62); }
.lx-plans a { color: #d9b97d; font-weight: 600; text-decoration: none; }
.lx-plans a:hover { text-decoration: underline; }

/* Flux Community no menu (em breve) */
.nav-links a.lx-comm { --lx-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z'/%3E%3Cpath d='M8 11h8M8 14h5'/%3E%3C/svg%3E"); }
.lx-soon { margin-inline-start: auto; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; background: rgba(217,185,125,.16); color: #d9b97d; white-space: nowrap; }
.nav-links a.active .lx-soon { background: rgba(0,0,0,.18); color: #16120A; }
.lx-chans { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 16px; }
.lx-chans span { padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); font-size: 12.5px; color: #dcd8cf; }
/* Enviar cobranca (Painel Admin) */
.lx-bill-btn { margin-inline-start: 6px; }
.lx-bill-st { display: block; margin-top: 6px; font-size: 11.5px; color: #a8a39a; white-space: nowrap; }
.lx-bill-st b { color: #6fcf97; font-weight: 600; }
.lx-bplans { display: grid; gap: 8px; margin: 8px 0 14px; }
.lx-bplan { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.02); color: #f2efe8; cursor: pointer; font: inherit; text-align: start; }
.lx-bplan[aria-pressed="true"] { border-color: #d9b97d; background: rgba(217,185,125,.1); box-shadow: inset 0 0 0 1px #d9b97d; }
.lx-bplan b { font-weight: 600; } .lx-bplan span { color: #d9b97d; font-weight: 600; }
.lx-brow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; font-size: 13px; color: #a8a39a; }
.lx-brow select { background: #121212; color: #f2efe8; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 8px 10px; font: inherit; }
.lx-bacts { display: grid; gap: 8px; }
.lx-bsec { width: 100%; min-height: 44px; border-radius: 12px; border: 1px solid rgba(217,185,125,.45); background: transparent; color: #d9b97d; font-weight: 600; cursor: pointer; font: inherit; }
.lx-bok { margin-top: 10px; font-size: 13px; color: #6fcf97; min-height: 18px; }
.lx-bhr { border: 0; border-top: 1px solid rgba(255,255,255,.08); margin: 16px 0 12px; }
#users-table td:has(.lx-bill-btn) { white-space: normal; min-width: 230px; }
.lx-bill-btn { display: flex !important; width: 100%; justify-content: center; margin: 6px 0 0 !important; }
