/* ======================================================
   Roomtec IA — Tema "glass" (redesign 2026-06-30)
   Layout base: sidebar fixa + main. Tokens, keyframes,
   sidebar, topbar mobile e helpers globais.
   (As classes .b2b-* legadas seguem abaixo, intactas.)
   ====================================================== */

:root {
    --ia-bg: #EEF2F9;
    --ia-text: #0F172A;
    --ia-text-2: #475569;
    --ia-text-3: #64748B;
    --ia-text-4: #94A3B8;
    --ia-border: rgba(15, 23, 42, .06);
    --ia-border-2: rgba(15, 23, 42, .1);
    --ia-primary: #2563EB;
    --ia-grad: linear-gradient(135deg, #2563EB, #4F46E5);
    --ia-glass: rgba(255, 255, 255, .72);
    --ia-success: #22C55E;
    --ia-danger: #EF4444;
    --ia-font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ia-font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Keyframes do protótipo */
@keyframes rt-fade  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rt-pop   { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@keyframes rt-slide { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes rt-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes rt-pulse { 0%, 100% { transform: scaleY(.4); } 50% { transform: scaleY(1); } }

/* Reset/escopo do tema — só nas páginas IA (têm .ia-app) */
body:has(.ia-app) {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: var(--ia-font-ui);
    color: var(--ia-text);
    background: var(--ia-bg);
    background-image:
        radial-gradient(1200px 600px at 88% -8%, rgba(37, 99, 235, .10), transparent 60%),
        radial-gradient(900px 500px at 0% 100%, rgba(124, 58, 237, .07), transparent 55%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}
body:has(.ia-app) *,
body:has(.ia-app) *::before,
body:has(.ia-app) *::after { box-sizing: border-box; }

.ia-footer-hidden { display: none !important; }

/* Esconde o conteúdo até a instância Vue da tela montar (evita flash de
   {{ }}). O preloader é removido no footer antes do index.js da tela rodar. */
[v-cloak] { display: none !important; }

/* Wrapper flex: sidebar + main */
.ia-app {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
}
/* #v-menu existe só como host do Vue — não ocupa caixa própria */
#v-menu { display: contents; }

/* Conteúdo principal (#v-conteudo de cada tela) */
.ia-app > #v-conteudo {
    flex: 1 1 auto;
    min-width: 0;
    height: 100vh;
    overflow-y: auto;
}
.ia-app > #v-conteudo::-webkit-scrollbar { width: 9px; height: 9px; }
.ia-app > #v-conteudo::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, .28);
    border-radius: 99px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
.ia-app > #v-conteudo::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, .45); background-clip: padding-box; }

/* =============================================================
   Sidebar (glass)
   ============================================================= */
.ia-nav {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(255, 255, 255, .72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--ia-border);
    z-index: 30;
    transition: width .2s ease, padding .2s ease;
}

.ia-nav-brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 18px; text-decoration: none; }
.ia-nav-brand:hover { text-decoration: none; }
/* Ícone do logo da IA (PNG com forma/cores próprias — sem box/gradiente) */
.ia-nav-brand-img { width: 38px; height: 38px; display: block; flex-shrink: 0; }
.ia-nav-brand-text { line-height: 1; }
.ia-nav-brand-name { font-family: var(--ia-font-display); font-weight: 800; font-size: 17px; letter-spacing: -.3px; color: #64748B; }
.ia-nav-brand-name b { color: #2563EB; font-weight: 800; }
.ia-nav-brand-sub { display: block; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; color: #94A3B8; margin-top: 3px; }

.ia-nav-list { display: flex; flex-direction: column; gap: 4px; }
.ia-nav-link {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 11px 12px; border-radius: 13px; text-decoration: none;
    font-family: var(--ia-font-display); font-size: 14px; font-weight: 600;
    color: #475569; transition: background .15s, color .15s;
}
.ia-nav-link:hover { background: rgba(15, 23, 42, .04); text-decoration: none; color: #475569; }
.ia-nav-link-icon {
    width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(15, 23, 42, .04); transition: background .15s;
}
.ia-nav-link-label { flex: 1; }
.ia-nav-link--active { color: #2563EB; font-weight: 700; background: rgba(37, 99, 235, .1); }
.ia-nav-link--active:hover { color: #2563EB; background: rgba(37, 99, 235, .1); }
.ia-nav-link--active .ia-nav-link-icon { background: rgba(37, 99, 235, .14); }

/* Card do usuário (rodapé da sidebar) */
.ia-nav-user { margin-top: auto; position: relative; }
.ia-nav-user-btn {
    width: 100%; display: flex; align-items: center; gap: 11px; padding: 12px;
    border-radius: 16px; background: rgba(255, 255, 255, .7);
    border: 1px solid var(--ia-border); cursor: pointer; text-align: left;
    transition: background .15s;
}
.ia-nav-user-btn:hover, .ia-nav-user-btn--active { background: #fff; }
.ia-nav-user-btn:focus { outline: none; }
.ia-nav-user-avatar {
    width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
    background: linear-gradient(135deg, #0EA5E9, #2563EB); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; font-family: var(--ia-font-display);
}
.ia-nav-user-info { flex: 1; min-width: 0; line-height: 1.25; }
.ia-nav-user-name { display: block; font-size: 13px; font-weight: 700; color: #0F172A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ia-nav-user-empresa { display: block; font-size: 11px; color: #94A3B8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ia-nav-user-chevron { color: #94A3B8; flex-shrink: 0; transition: transform .2s; }
.ia-nav-user-chevron--open { transform: rotate(180deg); }

.ia-nav-dropdown {
    position: absolute; bottom: calc(100% + 8px); left: 0; right: 0;
    background: #fff; border: 1px solid var(--ia-border); border-radius: 14px;
    box-shadow: 0 12px 30px -10px rgba(15, 23, 42, .3); padding: 6px; z-index: 40;
}
.ia-nav-dropdown-header { padding: 10px 12px 8px; }
.ia-nav-dropdown-name { font-size: 14px; font-weight: 600; color: #1e293b; margin: 0; line-height: 1.3; }
.ia-nav-dropdown-empresa { font-size: 12px; color: #94a3b8; margin: 2px 0 0; }
.ia-nav-dropdown-divider { height: 1px; background: #f1f5f9; margin: 4px 0; }
.ia-nav-dropdown-item {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px;
    font-size: 13px; font-weight: 500; color: #475569; text-decoration: none;
    border-radius: 9px; cursor: pointer; transition: background .12s, color .12s;
}
.ia-nav-dropdown-item i { width: 15px; text-align: center; color: #94a3b8; font-size: 13px; }
.ia-nav-dropdown-item:hover { background: #f8fafc; color: #334155; text-decoration: none; }
.ia-nav-dropdown-item:hover i { color: #475569; }
.ia-nav-dropdown-item--danger:hover { background: #fef2f2; color: #dc2626; }
.ia-nav-dropdown-item--danger:hover i { color: #dc2626; }
.ia-dropdown-enter-active { transition: opacity .18s ease, transform .18s ease; }
.ia-dropdown-leave-active { transition: opacity .12s ease, transform .12s ease; }
.ia-dropdown-enter-from, .ia-dropdown-leave-to { opacity: 0; transform: translateY(6px) scale(.97); }

/* Linha do topo: marca + botão recolher (ícone pequeno, à direita da marca) */
.ia-nav-top { display: flex; align-items: flex-start; }
.ia-nav-top .ia-nav-brand { flex: 1; min-width: 0; }

.ia-nav-collapse {
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; margin-top: 4px; padding: 0;
    border: none; cursor: pointer; background: transparent; border-radius: 9px;
    color: #94A3B8; transition: background .15s, color .15s;
}
.ia-nav-collapse:hover { background: rgba(15, 23, 42, .06); color: #475569; }
.ia-nav-collapse-icon { transition: transform .2s ease; }

/* ----- Modo compacto (só ícones) — SÓ no desktop (>= 992px) -----
   No mobile o .ia-nav é um drawer (hambúrguer); o colapso é ignorado lá. */
@media (min-width: 992px) {
    .ia-nav--collapsed { width: 72px; padding: 22px 12px; }
    .ia-nav--collapsed .ia-nav-brand-text,
    .ia-nav--collapsed .ia-nav-brand-sub,
    .ia-nav--collapsed .ia-nav-link-label,
    .ia-nav--collapsed .ia-nav-user-info,
    .ia-nav--collapsed .ia-nav-user-chevron { display: none; }
    .ia-nav--collapsed .ia-nav-brand,
    .ia-nav--collapsed .ia-nav-link,
    .ia-nav--collapsed .ia-nav-user-btn { justify-content: center; gap: 0; padding-left: 0; padding-right: 0; }
    /* Topo empilha: logo em cima, ícone de recolher logo abaixo (centrados) */
    .ia-nav--collapsed .ia-nav-top { flex-direction: column; align-items: center; gap: 6px; }
    .ia-nav--collapsed .ia-nav-brand { padding: 6px 0 0; }
    .ia-nav--collapsed .ia-nav-collapse { margin-top: 0; }
    .ia-nav--collapsed .ia-nav-collapse-icon { transform: rotate(180deg); }
    .ia-nav--collapsed .ia-nav-user-btn { padding: 6px; }
    /* Dropdown do usuário vira flyout à direita do avatar */
    .ia-nav--collapsed .ia-nav-dropdown { bottom: 0; left: calc(100% + 10px); right: auto; width: 220px; }
}

/* Topbar mobile + overlay (escondidos no desktop) */
.ia-topbar { display: none; }
.ia-nav-overlay { display: none; }

/* =============================================================
   Helpers globais do tema
   ============================================================= */
.ia-screen { padding: 42px 48px 56px; }
/* Largura total — o conteúdo usa toda a área útil (o respiro lateral vem do
   padding do .ia-screen). A thread do chat tem max-width próprio (~760px) e
   NÃO é afetada por estes wrappers. */
.ia-screen-narrow { max-width: none; margin: 0; }
.ia-screen-wide { max-width: none; margin: 0; }

.ia-h1 { font-family: var(--ia-font-display); font-weight: 800; letter-spacing: -.6px; margin: 0; }
.ia-grad-text { background: linear-gradient(120deg, #2563EB, #7C3AED); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Avatar genérico (background-image setado inline pelo Vue) */
.ia-avatar {
    display: block; flex-shrink: 0; background-color: #fff;
    background-size: cover; background-position: center; background-repeat: no-repeat;
}

/* Badge de status (pill verde) */
.ia-status-pill {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px;
    border-radius: 99px; background: rgba(37, 99, 235, .09);
    border: 1px solid rgba(37, 99, 235, .16);
}
.ia-status-pill-dot { width: 7px; height: 7px; border-radius: 99px; background: #22C55E; box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
.ia-status-pill-text { font-size: 12px; font-weight: 600; color: #2563EB; }

/* =============================================================
   Responsivo — sidebar vira drawer
   ============================================================= */
@media (max-width: 991.98px) {
    .ia-nav {
        position: fixed; top: 0; left: 0; bottom: 0; height: 100%; width: 260px;
        transform: translateX(-100%); transition: transform .25s ease;
        box-shadow: 0 8px 30px rgba(15, 23, 42, .2);
    }
    .ia-nav--open { transform: translateX(0); }
    /* No mobile o colapso não vale — o menu é drawer pelo hambúrguer. */
    .ia-nav-collapse { display: none; }

    .ia-topbar {
        display: flex; align-items: center; gap: 12px;
        position: fixed; top: 0; left: 0; right: 0; height: 56px; padding: 0 16px;
        background: rgba(255, 255, 255, .92);
        backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--ia-border); z-index: 25;
    }
    .ia-topbar-toggle {
        width: 40px; height: 40px; border: none; background: rgba(15, 23, 42, .04);
        border-radius: 10px; color: #475569; cursor: pointer;
        display: flex; align-items: center; justify-content: center;
    }
    .ia-topbar-logo { width: 26px; height: 26px; display: block; flex-shrink: 0; }
    .ia-topbar-brand { font-family: var(--ia-font-display); font-weight: 800; color: #64748B; font-size: 15px; }
    .ia-topbar-brand b { color: #2563EB; }
    .ia-topbar-brand span { color: #94A3B8; font-size: 11px; letter-spacing: 1px; margin-left: 2px; }

    .ia-nav-overlay {
        position: fixed; inset: 0; background: rgba(15, 23, 42, .4); z-index: 24;
        opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
    }
    .ia-nav-overlay--open { display: block; opacity: 1; visibility: visible; }

    .ia-app > #v-conteudo { padding-top: 56px; }
    .ia-screen { padding: 24px 18px 40px; }
}

/* ======================================================
   Roomtec B2B — CSS Principal
   ====================================================== */

/* =============================================================
   Layout global — menu fixo + sticky footer + espacamento
   ============================================================= */
body:has(.b2b-navbar):not(:has(.b2b-auth-wrap)),
body:has(.navbar-header-fixed):not(:has(.b2b-auth-wrap)) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 60px;
    background: #f1f5f9;
}

body:has(.b2b-navbar):not(:has(.b2b-auth-wrap)) > div[id^="v-"],
body:has(.navbar-header-fixed):not(:has(.b2b-auth-wrap)) > div[id^="v-"] {
    flex: 1;
    padding: 24px;
}

body:has(.b2b-navbar):not(:has(.b2b-auth-wrap)) > .footer,
body:has(.navbar-header-fixed):not(:has(.b2b-auth-wrap)) > .footer {
    margin-top: auto;
    background: #e8ecf1;
    border-top: 1px solid #dce1e8;
    color: #64748b;
}

/* =============================================================
   Navbar B2B — modernizada (Stripe/Linear style)
   ============================================================= */
.b2b-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 24px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
    overflow: visible;
}

/* Logo */
.b2b-navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-right: 32px;
    flex-shrink: 0;
    gap: 8px;
}
.b2b-navbar-brand:hover { text-decoration: none; }
.b2b-navbar-logo {
    height: 28px;
    width: auto;
}
.b2b-navbar-badge {
    display: inline-block;
    background: linear-gradient(135deg, #1b6dc1 0%, #3385d9 100%);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 2px 10px;
    border-radius: 20px;
}

/* Hamburger mobile */
.b2b-navbar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    color: #475569;
    cursor: pointer;
    border-radius: 8px;
    margin-right: 12px;
    transition: background 0.15s;
}
.b2b-navbar-toggle:hover { background: #f1f5f9; }
.b2b-navbar-toggle svg { width: 20px; height: 20px; }

/* Nav wrapper — centraliza os itens */
.b2b-navbar-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Nav list */
.b2b-nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

/* Nav link */
.b2b-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    transition: all 0.15s ease;
    position: relative;
    white-space: nowrap;
}
.b2b-nav-link svg { width: 16px; height: 16px; stroke-width: 2; flex-shrink: 0; }
.b2b-nav-link:hover {
    color: #3B82F6;
    background: #eff6ff;
    text-decoration: none;
}
.b2b-nav-link:active {
    background: #dbeafe;
}

/* Active state — pill + underline */
.b2b-nav-link--active {
    color: #3B82F6;
    background: #eff6ff;
    font-weight: 600;
}
.b2b-nav-link--active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 14px;
    right: 14px;
    height: 2px;
    background: #3B82F6;
    border-radius: 2px 2px 0 0;
}

/* Mobile nav header (hidden on desktop) */
.b2b-navbar-nav-header { display: none; }

/* User area */
.b2b-navbar-user {
    margin-left: auto;
    position: relative;
    z-index: 1050;
}
.b2b-user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px 6px 6px;
    border: 1px solid transparent;
    background: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.b2b-user-btn:focus {
    outline: none;
}
.b2b-user-btn:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}
.b2b-user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 50%;
    color: #3B82F6;
    flex-shrink: 0;
}
.b2b-user-avatar svg { width: 18px; height: 18px; }
.b2b-user-avatar i.fas { font-size: 14px; }
.b2b-user-name {
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.b2b-user-chevron-svg {
    color: #94a3b8;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.b2b-chevron-open {
    transform: rotate(180deg);
}
.b2b-user-btn--active {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

/* User dropdown */
.b2b-user-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 240px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(16, 24, 40, 0.1), 0 1px 3px rgba(16, 24, 40, 0.06);
    padding: 6px;
    z-index: 1050;
}

/* Vue transition for dropdown */
.b2b-dropdown-enter-active {
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.b2b-dropdown-leave-active {
    transition: opacity 0.12s ease, transform 0.12s ease;
}
.b2b-dropdown-enter,
.b2b-dropdown-leave-to {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
}
.b2b-user-dropdown-header {
    padding: 10px 12px 8px;
}
.b2b-user-dropdown-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
}
.b2b-user-dropdown-cnpj {
    font-size: 12px;
    color: #94a3b8;
    margin: 2px 0 0;
}
.b2b-user-dropdown-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 4px 0;
}
.b2b-user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.12s ease;
    cursor: pointer;
}
.b2b-user-dropdown-item svg { width: 15px; height: 15px; color: #94a3b8; }
.b2b-user-dropdown-item i.fas { font-size: 13px; color: #94a3b8; width: 15px; text-align: center; }
.b2b-user-dropdown-item:hover {
    background: #f8fafc;
    color: #334155;
    text-decoration: none;
}
.b2b-user-dropdown-item:hover svg { color: #475569; }
.b2b-user-dropdown-item:hover i.fas { color: #475569; }
.b2b-user-dropdown-item--danger:hover {
    background: #fef2f2;
    color: #dc2626;
}
.b2b-user-dropdown-item--danger:hover svg { color: #dc2626; }
.b2b-user-dropdown-item--danger:hover i.fas { color: #dc2626; }

/* Overlay mobile */
.b2b-navbar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 1028;
    opacity: 0;
    transition: opacity 0.25s;
}
.b2b-navbar-overlay--visible {
    display: block;
    opacity: 1;
}

/* =============================================================
   Navbar — Responsive (mobile)
   ============================================================= */
@media (max-width: 991.98px) {
    .b2b-navbar {
        height: 55px;
        padding: 0 16px;
    }
    .b2b-navbar-toggle { display: flex; }
    .b2b-user-name { display: none; }
    .b2b-user-chevron { display: none; }
    .b2b-user-btn { padding: 4px; border-radius: 50%; }

    /* Slide-in nav */
    .b2b-navbar-nav {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        background: #fff;
        z-index: 1029;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        display: flex;
        flex-direction: column;
        box-shadow: 4px 0 16px rgba(16, 24, 40, 0.12);
    }
    .b2b-navbar-nav--open { transform: translateX(0); }

    .b2b-navbar-nav-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-bottom: 1px solid #f1f5f9;
    }
    .b2b-navbar-nav-header .b2b-navbar-brand { margin-right: 0; }
    .b2b-navbar-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border: none;
        background: none;
        color: #64748b;
        cursor: pointer;
        border-radius: 8px;
    }
    .b2b-navbar-close:hover { background: #f1f5f9; }
    .b2b-navbar-close svg { width: 20px; height: 20px; }

    .b2b-nav-list {
        flex-direction: column;
        padding: 12px;
        gap: 2px;
    }
    .b2b-nav-item { width: 100%; }
    .b2b-nav-link {
        width: 100%;
        padding: 12px 14px;
        border-radius: 10px;
        font-size: 15px;
    }
    .b2b-nav-link--active::after { display: none; }
}

/* Cards — elevacao sutil sobre o fundo cinza */
.b2b-stat-card,
.b2b-chart-card,
.b2b-action-card,
.b2b-finance-bar,
.b2b-search-card,
.b2b-cart-card,
.b2b-summary-card,
.b2b-empty-state,
.b2b-table-card,
.b2b-filter-bar,
.b2b-conta-card,
.b2b-mobile-card,
.b2b-pagination-mobile {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Breadcrumb — adaptar ao fundo cinza */
body:has(.b2b-navbar):not(:has(.b2b-auth-wrap)) .breadcrumb,
body:has(.navbar-header-fixed):not(:has(.b2b-auth-wrap)) .breadcrumb {
    background: transparent;
}

body:has(.b2b-navbar):not(:has(.b2b-auth-wrap)) h4.tx-spacing--1,
body:has(.navbar-header-fixed):not(:has(.b2b-auth-wrap)) h4.tx-spacing--1 {
    color: #1e293b;
}

@media (max-width: 991.98px) {
    body:has(.b2b-navbar):not(:has(.b2b-auth-wrap)),
    body:has(.navbar-header-fixed):not(:has(.b2b-auth-wrap)) {
        padding-top: 55px;
    }

    body:has(.b2b-navbar):not(:has(.b2b-auth-wrap)) > div[id^="v-"],
    body:has(.navbar-header-fixed):not(:has(.b2b-auth-wrap)) > div[id^="v-"] {
        padding: 16px;
    }
}

/* Auth (login, recuperar, trocar-senha) */
body:has(.b2b-auth-wrap) {
    background: linear-gradient(135deg, #F5F7FA 0%, #EEF2F7 100%);
    margin: 0;
    padding: 0;
}

.b2b-auth-wrap {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F5F7FA 0%, #EEF2F7 100%);
    padding: 20px;
    box-sizing: border-box;
}

.b2b-auth-wrap > div {
    width: 100%;
    max-width: 440px;
}

.b2b-auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
    padding: 48px 40px 36px;
    width: 100%;
    max-width: 440px;
}

.b2b-auth-card.b2b-card-animate {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.b2b-auth-card.b2b-card-animate.b2b-card-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Logo & Branding */
.b2b-auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.b2b-logo-img {
    max-width: 200px;
    height: auto;
    margin-bottom: 10px;
}

.b2b-auth-badge {
    display: inline-block;
    background: linear-gradient(135deg, #1b6dc1 0%, #3385d9 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 3px 14px;
    border-radius: 20px;
    margin-bottom: 6px;
}

.b2b-auth-logo .b2b-subtitle {
    font-size: 13px;
    color: #8392a5;
    font-weight: 400;
    margin-top: 4px;
}

/* Input Groups */
.b2b-input-group {
    margin-bottom: 20px;
}

.b2b-input-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #475467;
    margin-bottom: 6px;
}

.b2b-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.b2b-input-wrap > i:first-child {
    position: absolute;
    left: 14px;
    color: #98a6b8;
    font-size: 14px;
    pointer-events: none;
    transition: color 0.2s ease;
}

.b2b-input-wrap .form-control {
    height: 46px;
    font-size: 14px;
    padding-left: 42px;
    border: 1.5px solid #D0D5DD;
    border-radius: 10px;
    background: #FCFCFD;
    color: #1D2939;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.b2b-input-wrap .form-control::placeholder {
    color: #98A2B3;
}

.b2b-input-wrap .form-control:focus {
    border-color: #3385d9;
    box-shadow: 0 0 0 3px rgba(27, 109, 193, 0.12);
    background: #fff;
    outline: none;
}

.b2b-input-wrap .form-control:focus ~ i:first-child,
.b2b-input-wrap .form-control:focus + .b2b-toggle-senha {
    color: #3385d9;
}

/* Ajuste: ícone muda de cor ao focar */
.b2b-input-group .b2b-input-wrap:focus-within > i:first-child {
    color: #3385d9;
}

/* Estado de erro */
.b2b-input-group.has-error .b2b-input-wrap .form-control {
    border-color: #F04438;
    box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.1);
}

.b2b-input-group.has-error .b2b-input-wrap > i:first-child {
    color: #F04438;
}

.b2b-input-error {
    display: block;
    font-size: 12px;
    color: #F04438;
    margin-top: 5px;
    padding-left: 2px;
}

/* Toggle senha */
.b2b-toggle-senha {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #98a6b8;
    cursor: pointer;
    padding: 4px 6px;
    font-size: 15px;
    transition: color 0.2s ease;
    outline: none;
}

.b2b-toggle-senha:hover {
    color: #475467;
}

/* Botão Entrar */
.b2b-btn-entrar {
    width: 100%;
    height: 48px;
    font-size: 15px;
    font-weight: 600;
    margin-top: 8px;
    border: none;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, #1b6dc1 0%, #3385d9 100%);
    box-shadow: 0 4px 12px rgba(27, 109, 193, 0.25);
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
}

.b2b-btn-entrar:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(27, 109, 193, 0.35);
    color: #fff;
}

.b2b-btn-entrar:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(27, 109, 193, 0.2);
}

.b2b-btn-entrar:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Footer links */
.b2b-auth-footer {
    text-align: center;
    margin-top: 20px;
}

.b2b-auth-footer a {
    font-size: 13px;
    color: #667085;
    text-decoration: none;
    transition: color 0.2s ease;
}

.b2b-auth-footer a:hover {
    color: #1b6dc1;
}

/* Selo de segurança */
.b2b-auth-secure {
    text-align: center;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #F2F4F7;
    font-size: 11.5px;
    color: #98A2B3;
    letter-spacing: 0.3px;
}

.b2b-auth-secure i {
    margin-right: 4px;
    color: #32D583;
}

/* Compat: form-group e btn-block antigos (recuperar/trocar-senha) */
.b2b-auth-card .form-group {
    margin-bottom: 1.25rem;
}

.b2b-auth-card .form-group .form-control {
    height: 46px;
    font-size: 14px;
    border: 1.5px solid #D0D5DD;
    border-radius: 10px;
    background: #FCFCFD;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.b2b-auth-card .form-group .form-control:focus {
    border-color: #3385d9;
    box-shadow: 0 0 0 3px rgba(27, 109, 193, 0.12);
    background: #fff;
}

.b2b-auth-card .btn-block {
    height: 48px;
    font-size: 15px;
    margin-top: 8px;
    border-radius: 10px;
}

/* =============================================================
   Dashboard — Stat Cards (modernizados)
   ============================================================= */

.b2b-stat-card {
    border-radius: 12px;
    padding: 22px 24px;
    background: #fff;
    border: 1px solid #e5e9f2;
    margin-bottom: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.b2b-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.b2b-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 12px 0 0 12px;
}

.b2b-stat-primary::before { background: #3b82f6; }
.b2b-stat-success::before { background: #10b981; }
.b2b-stat-info::before    { background: #06b6d4; }
.b2b-stat-danger::before  { background: #ef4444; }
.b2b-stat-neutral::before { background: #94a3b8; }

.b2b-stat-card-inner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.b2b-stat-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.b2b-stat-primary .b2b-stat-icon-wrap {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.b2b-stat-success .b2b-stat-icon-wrap {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.b2b-stat-info .b2b-stat-icon-wrap {
    background: rgba(6, 182, 212, 0.1);
    color: #06b6d4;
}

.b2b-stat-danger .b2b-stat-icon-wrap {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.b2b-stat-neutral .b2b-stat-icon-wrap {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
}

.b2b-stat-info-wrap {
    flex: 1;
    min-width: 0;
}

.b2b-stat-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8392a5;
    margin-bottom: 4px;
}

.b2b-stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #1b2e4b;
    line-height: 1.1;
    margin: 0 0 4px 0;
}

.b2b-stat-danger .b2b-stat-number {
    color: #ef4444;
}

.b2b-stat-sub {
    font-size: 11px;
    color: #8392a5;
}

.b2b-stat-sub .tx-success { color: #10b981; }
.b2b-stat-sub .tx-danger  { color: #ef4444; }

.badge-danger-soft {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.badge-success-soft {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

/* =============================================================
   Dashboard — Chart Cards
   ============================================================= */

.b2b-chart-card {
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    overflow: hidden;
}

.b2b-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 0;
}

.b2b-chart-title {
    font-size: 14px;
    font-weight: 600;
    color: #1b2e4b;
    margin: 0;
}

.b2b-chart-legend {
    font-size: 11px;
    color: #8392a5;
    display: flex;
    align-items: center;
}

.b2b-legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.b2b-legend-dot.bg-primary { background: rgba(59, 130, 246, 0.85); }
.b2b-legend-dot.bg-success { background: rgba(16, 185, 129, 0.85); }
.b2b-legend-dot.bg-danger  { background: rgba(239, 68, 68, 0.85); }
.b2b-legend-dot.bg-info    { background: rgba(6, 182, 212, 0.85); }

.b2b-chart-body {
    padding: 16px 20px;
    min-height: 220px;
}

.b2b-chart-footer {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 12px 24px 18px;
    border-top: 1px solid #f0f2f5;
}

.b2b-chart-footer-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* =============================================================
   Dashboard — Finance Bar
   ============================================================= */

.b2b-finance-bar {
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.b2b-finance-item {
    display: flex;
    align-items: center;
}

/* =============================================================
   Dashboard — Action Cards (atalhos)
   ============================================================= */

.b2b-action-card {
    display: flex;
    align-items: center;
    padding: 20px 22px;
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    margin-bottom: 16px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    color: inherit;
}

.b2b-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
}

.b2b-action-primary:hover { border-color: #3b82f6; }
.b2b-action-success:hover { border-color: #10b981; }
.b2b-action-warning:hover { border-color: #f59e0b; }

.b2b-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 16px;
    flex-shrink: 0;
}

.b2b-action-primary .b2b-action-icon {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.b2b-action-success .b2b-action-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.b2b-action-warning .b2b-action-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.b2b-action-body {
    flex: 1;
    min-width: 0;
}

.b2b-action-body h6 {
    font-size: 14px;
    font-weight: 600;
    color: #1b2e4b;
    margin: 0 0 2px 0;
}

.b2b-action-body p {
    font-size: 12px;
    color: #8392a5;
    margin: 0;
}

.b2b-action-arrow {
    color: #c8d0da;
    font-size: 14px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.b2b-action-card:hover .b2b-action-arrow {
    color: #8392a5;
    transform: translateX(3px);
}

/* =============================================================
   Legado — manter compatibilidade
   ============================================================= */

/* Status badges */
.badge-aberto    { background-color: #17a2b8; color: #fff; }
.badge-aprovado  { background-color: #28a745; color: #fff; }
.badge-cancelado { background-color: #dc3545; color: #fff; }
.badge-entregue  { background-color: #6c757d; color: #fff; }

/* Financeiro atraso */
.tx-atraso   { color: #dc3545; font-weight: 600; }
.tx-hoje     { color: #fd7e14; font-weight: 600; }
.tx-no-prazo { color: #28a745; }

/* =============================================================
   Novo Pedido — Catalog Toolbar (busca + filtros)
   ============================================================= */

/* Botao Interpretar por IA — destaque especial */
.b2b-btn-ia {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}
.b2b-btn-ia:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.45);
    color: #fff;
    text-decoration: none;
}
.b2b-btn-ia:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}
/* Shimmer — brilho sutil que percorre o botao */
.b2b-btn-ia::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
    animation: b2b-ia-shimmer 3s ease-in-out infinite;
}
@keyframes b2b-ia-shimmer {
    0%   { left: -100%; }
    40%  { left: 100%; }
    100% { left: 100%; }
}
.b2b-btn-ia-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    background: rgba(255,255,255,0.2);
    border-radius: 7px;
    font-size: 13px;
    flex-shrink: 0;
}
.b2b-btn-ia-label {
    position: relative;
    z-index: 1;
}
.b2b-btn-ia-badge {
    position: relative;
    z-index: 1;
    background: #fbbf24;
    color: #78350f;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 2px 7px;
    border-radius: 6px;
    line-height: 1.2;
}

.b2b-catalog-toolbar {
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.b2b-catalog-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.b2b-catalog-search-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 14px;
    pointer-events: none;
}

.b2b-catalog-search-input {
    width: 100%;
    height: 44px;
    border: 1px solid #e5e9f2;
    border-radius: 10px;
    padding: 0 40px 0 42px;
    font-size: 14px;
    color: #1b2e4b;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.b2b-catalog-search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
    background: #fff;
}

.b2b-catalog-search-input::placeholder {
    color: #94a3b8;
}

.b2b-catalog-search-clear {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    transition: color 0.15s ease;
}

.b2b-catalog-search-clear:hover {
    color: #ef4444;
}

/* =============================================================
   Novo Pedido — Category Pills
   ============================================================= */

.b2b-catalog-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.b2b-catalog-filters::-webkit-scrollbar {
    display: none;
}

.b2b-filter-pill {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 16px;
    border: 1px solid #e5e9f2;
    border-radius: 20px;
    background: #fff;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.b2b-filter-pill:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.04);
}

.b2b-filter-pill.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.b2b-catalog-info {
    margin-bottom: 12px;
}

/* =============================================================
   Novo Pedido — Product Catalog Grid
   ============================================================= */

.b2b-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.b2b-catalog-card {
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

.b2b-catalog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: #3b82f6;
}

.b2b-catalog-card--added {
    border-color: #10b981;
    background: linear-gradient(to bottom, rgba(16, 185, 129, 0.03), #fff);
}

.b2b-catalog-card--added:hover {
    border-color: #10b981;
}

/* Card Image */
.b2b-catalog-card-img {
    width: 100%;
    height: 120px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid #f0f2f5;
}

.b2b-catalog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.b2b-catalog-card-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #cbd5e1;
    font-size: 28px;
}

/* Card Body */
.b2b-catalog-card-body {
    padding: 12px 14px 4px;
    flex: 1;
}

.b2b-catalog-card-code {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8392a5;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.b2b-catalog-card-name {
    font-size: 13px;
    font-weight: 600;
    color: #1b2e4b;
    margin: 0 0 6px 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 35px;
}

.b2b-catalog-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.b2b-catalog-card-unit {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}

.b2b-catalog-card-price {
    font-size: 14px;
    font-weight: 700;
    color: #3b82f6;
}

/* Card Action */
.b2b-catalog-card-action {
    padding: 10px 14px 14px;
}

.b2b-catalog-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.b2b-catalog-add-btn:hover {
    background: #3b82f6;
    color: #fff;
}

/* Inline quantity control on card */
.b2b-catalog-qty-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #10b981;
}

.b2b-catalog-qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background 0.15s ease;
}

.b2b-catalog-qty-btn:hover {
    background: rgba(16, 185, 129, 0.2);
}

.b2b-catalog-qty-value {
    flex: 1;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #10b981;
    background: #fff;
    line-height: 36px;
    min-width: 40px;
}

/* Load more */
.b2b-catalog-loadmore {
    text-align: center;
    margin-bottom: 24px;
}

.b2b-catalog-loadmore-btn {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 24px;
    border: 1px solid #e5e9f2;
    border-radius: 10px;
    background: #fff;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.b2b-catalog-loadmore-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.04);
}

/* =============================================================
   Novo Pedido — Skeleton Loading
   ============================================================= */

.b2b-skeleton {
    pointer-events: none;
}

.b2b-skeleton-img {
    width: 100%;
    height: 120px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: b2b-shimmer 1.5s infinite;
    border-bottom: 1px solid #f0f2f5;
}

.b2b-skeleton-text {
    height: 12px;
    border-radius: 6px;
    margin: 10px 14px 0;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: b2b-shimmer 1.5s infinite;
}

@keyframes b2b-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* =============================================================
   Novo Pedido — Sidebar Cart (dentro do summary)
   ============================================================= */

.b2b-sidebar-cart {
    margin: 0;
    padding: 0;
}

.b2b-sidebar-cart-item {
    padding: 10px 0;
    border-bottom: 1px solid #f0f2f5;
}

.b2b-sidebar-cart-item:last-child {
    border-bottom: none;
}

.b2b-sidebar-cart-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.b2b-sidebar-cart-item-info {
    flex: 1;
    min-width: 0;
}

.b2b-sidebar-cart-item-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1b2e4b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.b2b-sidebar-cart-item-code {
    font-size: 11px;
    color: #94a3b8;
}

.b2b-sidebar-cart-item-remove {
    background: none;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 12px;
    transition: color 0.15s ease;
    flex-shrink: 0;
}

.b2b-sidebar-cart-item-remove:hover {
    color: #ef4444;
}

.b2b-sidebar-cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    gap: 8px;
}

.b2b-sidebar-cart-item-total {
    font-size: 13px;
    font-weight: 700;
    color: #3b82f6;
    white-space: nowrap;
}

.b2b-sidebar-cart-empty {
    text-align: center;
    padding: 28px 10px;
}

.b2b-sidebar-cart-empty p {
    margin: 10px 0 0;
    font-size: 13px;
    color: #94a3b8;
}

/* Summary card */
.b2b-summary-sticky {
}

/* =============================================================
   Novo Pedido — Mobile Bottom Bar
   ============================================================= */

.b2b-mobile-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1020;
    background: #fff;
    border-top: 1px solid #e5e9f2;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    padding: 12px 20px;
    align-items: center;
    justify-content: space-between;
}

.b2b-mobile-bar-info {
    display: flex;
    flex-direction: column;
}

.b2b-mobile-bar-count {
    font-size: 14px;
    font-weight: 600;
    color: #1b2e4b;
}

.b2b-mobile-bar-total {
    font-size: 13px;
    font-weight: 700;
    color: #3b82f6;
}

.b2b-mobile-bar-btn {
    height: 42px;
    padding: 0 24px;
    border: none;
    border-radius: 10px;
    background: #3b82f6;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.b2b-mobile-bar-btn:hover {
    background: #2563eb;
}

/* =============================================================
   Novo Pedido — Legacy classes (kept for compatibility)
   ============================================================= */

.b2b-search-header {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    gap: 12px;
    border-bottom: 1px solid #f0f2f5;
}

.b2b-search-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.b2b-search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.b2b-search-input {
    flex: 1;
    height: 44px;
    border: 1px solid #e5e9f2;
    border-radius: 8px;
    padding: 0 16px;
    font-size: 14px;
    color: #1b2e4b;
    background: #f8fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.b2b-search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #fff;
}

.b2b-search-input::placeholder {
    color: #94a3b8;
}

.b2b-search-btn {
    height: 44px;
    padding: 0 20px;
    border: none;
    border-radius: 8px;
    background: #3b82f6;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.b2b-search-btn:hover:not(:disabled) {
    background: #2563eb;
}

.b2b-search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Results header */
.b2b-search-results {
    padding: 0 24px 20px;
}

.b2b-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 12px;
}

.b2b-link-btn {
    background: none;
    border: none;
    color: #8392a5;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s ease, background 0.2s ease;
}

.b2b-link-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.06);
}

/* Product Grid */
.b2b-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.b2b-product-card {
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.b2b-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-color: #3b82f6;
}

.b2b-product-card.b2b-product-added {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.03);
}

.b2b-product-card-body {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.b2b-product-info {
    flex: 1;
    min-width: 0;
}

.b2b-product-code {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8392a5;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.b2b-product-name {
    font-size: 13px;
    font-weight: 600;
    color: #1b2e4b;
    margin: 0 0 6px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.b2b-product-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.b2b-product-unit {
    font-size: 11px;
    color: #94a3b8;
}

.b2b-product-price {
    font-size: 13px;
    font-weight: 700;
    color: #3b82f6;
}

.b2b-product-action {
    flex-shrink: 0;
}

.b2b-add-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.b2b-product-card:hover .b2b-add-btn {
    background: #3b82f6;
    color: #fff;
    transform: scale(1.05);
}

.b2b-added-check {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* Empty search */
.b2b-search-empty {
    text-align: center;
    padding: 40px 24px;
}

/* =============================================================
   Novo Pedido — Cart Card (Itens do Pedido)
   ============================================================= */

.b2b-cart-card {
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    overflow: hidden;
}

.b2b-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #f0f2f5;
}

.b2b-cart-header h6 {
    font-size: 14px;
    font-weight: 600;
    color: #1b2e4b;
}

.b2b-cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 14px;
    background: #3b82f6;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 0 8px;
}

.b2b-cart-items {
    padding: 8px 0;
}

.b2b-cart-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    border-bottom: 1px solid #f8fafc;
    transition: background 0.15s ease;
    gap: 12px;
    flex-wrap: wrap;
}

.b2b-cart-row:last-child {
    border-bottom: none;
}

.b2b-cart-row:hover {
    background: #f8fafc;
}

.b2b-cart-item-info {
    flex: 1;
    min-width: 150px;
}

.b2b-cart-item-code {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: #8392a5;
    background: #f1f5f9;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 6px;
}

.b2b-cart-item-name {
    font-size: 13px;
    color: #1b2e4b;
    font-weight: 500;
}

.b2b-cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Quantity control */
.b2b-qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #e5e9f2;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.b2b-qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: background 0.15s ease;
}

.b2b-qty-btn:hover {
    background: #e2e8f0;
    color: #1b2e4b;
}

.b2b-qty-input {
    width: 60px;
    height: 32px;
    border: none;
    border-left: 1px solid #e5e9f2;
    border-right: 1px solid #e5e9f2;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #1b2e4b;
    outline: none;
    -moz-appearance: textfield;
}

.b2b-qty-input::-webkit-outer-spin-button,
.b2b-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.b2b-cart-item-unit {
    font-size: 11px;
    color: #94a3b8;
    min-width: 28px;
}

.b2b-cart-item-total {
    font-size: 13px;
    font-weight: 700;
    color: #1b2e4b;
    min-width: 85px;
    text-align: right;
}

.b2b-cart-remove {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: background 0.15s ease, color 0.15s ease;
}

.b2b-cart-remove:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}

/* Cart item transitions */
.b2b-cart-item-enter-active {
    transition: all 0.3s ease;
}

.b2b-cart-item-leave-active {
    transition: all 0.2s ease;
}

.b2b-cart-item-enter {
    opacity: 0;
    transform: translateX(-20px);
}

.b2b-cart-item-leave-to {
    opacity: 0;
    transform: translateX(20px);
}

/* =============================================================
   Novo Pedido — Empty State
   ============================================================= */

.b2b-empty-state {
    text-align: center;
    padding: 48px 24px;
    background: #fff;
    border: 1px dashed #e5e9f2;
    border-radius: 12px;
}

.b2b-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(59, 130, 246, 0.08);
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 16px;
}

.b2b-empty-state h6 {
    font-size: 15px;
    font-weight: 600;
    color: #1b2e4b;
    margin-bottom: 6px;
}

.b2b-empty-state p {
    font-size: 13px;
    color: #8392a5;
    margin: 0;
}

/* =============================================================
   Novo Pedido — Summary Card (sticky sidebar)
   ============================================================= */

.b2b-summary-card {
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    overflow: hidden;
}

/* Layout: header + items + footer */
.b2b-summary-flex {
    display: flex;
    flex-direction: column;
}

.b2b-summary-header {
    padding: 18px 24px;
    font-size: 15px;
    font-weight: 700;
    color: #1b2e4b;
    border-bottom: 1px solid #e5e9f2;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.b2b-summary-header-left {
    display: flex;
    align-items: center;
}

/* Area central — lista de itens + formularios */
.b2b-summary-items-area {
    padding: 16px 24px;
}

/* Footer — totais e botao de envio */
.b2b-summary-footer {
    padding: 14px 24px;
    border-top: 1px solid #e5e9f2;
    background: #f8fafc;
}

.b2b-summary-items-area .b2b-form-group:last-of-type {
    margin-bottom: 4px;
}

.b2b-summary-footer .b2b-summary-totals {
    margin-bottom: 12px;
}

.b2b-summary-body {
    padding: 20px 24px;
}

.b2b-form-group {
    margin-bottom: 16px;
}

.b2b-discount-notice {
    display: flex;
    align-items: center;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 14px;
}

.b2b-discount-notice i {
    color: #10b981;
}

.b2b-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.b2b-textarea {
    width: 100%;
    border: 1px solid #e5e9f2;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #1b2e4b;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.b2b-textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.b2b-textarea::placeholder {
    color: #94a3b8;
}

.b2b-summary-divider {
    height: 1px;
    background: #f0f2f5;
    margin: 16px 0;
}

/* Summary item list */
.b2b-summary-item-list {
    max-height: 200px;
    overflow-y: auto;
}

.b2b-summary-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    gap: 8px;
}

.b2b-summary-line-name {
    font-size: 12px;
    color: #64748b;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.b2b-summary-line-price {
    font-size: 12px;
    color: #1b2e4b;
    font-weight: 600;
    flex-shrink: 0;
}

/* Totals */
.b2b-summary-totals {
    margin-bottom: 20px;
}

.b2b-summary-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: #64748b;
}

.b2b-summary-total-value {
    font-weight: 600;
    color: #1b2e4b;
}

.b2b-summary-grand-total {
    padding-top: 10px;
    border-top: 1px solid #f0f2f5;
    margin-top: 4px;
}

.b2b-summary-grand-total span {
    font-size: 16px;
    font-weight: 700;
    color: #1b2e4b;
}

.b2b-summary-grand-total .b2b-summary-total-value {
    color: #3b82f6;
}

/* Action buttons */
.b2b-summary-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.b2b-btn-primary {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 10px;
    background: #3b82f6;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.b2b-btn-primary:hover:not(:disabled) {
    background: #2563eb;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.b2b-btn-primary:active:not(:disabled) {
    transform: scale(0.98);
}

.b2b-btn-primary:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.b2b-btn-secondary {
    width: 100%;
    height: 42px;
    border: 1px solid #e5e9f2;
    border-radius: 10px;
    background: #fff;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.b2b-btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #64748b;
    text-decoration: none;
}

/* Pedido badge (header) */
.b2b-pedido-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* =============================================================
   Novo Pedido — Legado (manter compat)
   ============================================================= */

.b2b-produto-resultado {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f2f5;
    cursor: pointer;
    transition: background 0.15s ease;
}

.b2b-produto-resultado:hover {
    background: #f8fafc;
}

.b2b-produto-resultado:last-child {
    border-bottom: none;
}

/* Pedido confirmado */
.b2b-pedido-confirmado {
    text-align: center;
    padding: 32px 24px;
}

.b2b-pedido-confirmado .numero-pedido {
    font-size: 36px;
    font-weight: 700;
    color: #3f80ea;
}

/* Alerta troca senha */
.b2b-alerta-senha {
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #5d4037;
}

/* Mobile adjustments */
@media (max-width: 991px) {
    .b2b-summary-card {
        position: static;
    }

    .b2b-summary-sticky {
        position: static;
    }

    .b2b-summary-flex {
        max-height: none;
    }

    .b2b-summary-items-area {
        overflow-y: visible;
        max-height: none;
    }

    .b2b-summary-footer {
        box-shadow: none;
    }

    .b2b-mobile-bar {
        display: flex;
    }

    /* Extra bottom padding so content not hidden behind mobile bar */
    #v-novo-pedido .container-fluid {
        padding-bottom: 80px;
    }
}

@media (max-width: 768px) {
    .b2b-catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }

    .b2b-catalog-card-img {
        height: 90px;
    }

    .b2b-catalog-card-name {
        font-size: 12px;
        min-height: 32px;
    }
}

@media (max-width: 576px) {
    .b2b-auth-card {
        padding: 32px 22px 28px;
        border-radius: 12px;
    }

    .b2b-logo-img {
        max-width: 170px;
    }

    .b2b-input-wrap .form-control {
        height: 48px;
        font-size: 15px;
    }

    .b2b-btn-entrar {
        height: 50px;
        font-size: 16px;
    }

    .b2b-stat-number {
        font-size: 22px;
    }

    .b2b-chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .b2b-chart-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .b2b-finance-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .b2b-action-card {
        padding: 16px 18px;
    }

    /* Novo pedido — mobile (legacy + catalog) */
    .b2b-catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .b2b-catalog-card-img {
        height: 80px;
    }

    .b2b-catalog-card-body {
        padding: 8px 10px 2px;
    }

    .b2b-catalog-card-name {
        font-size: 11px;
        -webkit-line-clamp: 2;
        min-height: 28px;
    }

    .b2b-catalog-card-action {
        padding: 6px 10px 10px;
    }

    .b2b-catalog-add-btn {
        height: 32px;
        font-size: 11px;
    }

    .b2b-catalog-toolbar {
        padding: 12px 14px;
    }

    .b2b-sidebar-cart {
        max-height: 200px;
    }

    .b2b-search-header {
        flex-direction: column;
        padding: 16px;
    }

    .b2b-search-icon-wrap {
        display: none;
    }

    .b2b-search-input-wrap {
        flex-direction: column;
        width: 100%;
    }

    .b2b-search-input,
    .b2b-search-btn {
        width: 100%;
    }

    .b2b-product-grid {
        grid-template-columns: 1fr;
    }

    .b2b-search-results {
        padding: 0 16px 16px;
    }

    .b2b-cart-row {
        padding: 12px 16px;
    }

    .b2b-cart-item-controls {
        width: 100%;
        justify-content: space-between;
        margin-top: 8px;
    }

    .b2b-summary-body {
        padding: 16px;
    }

    .b2b-cart-header {
        padding: 16px;
    }
}

/* Loader */
#modal-loader {
    background: transparent;
    box-shadow: none;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80px;
}

.loader {
    border: 4px solid #e5e9f2;
    border-top: 4px solid #3f80ea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Content area padding */
.content.b2b-content {
    padding: 24px;
}

/* =============================================================
   Historico Pedidos — Botao Novo Pedido
   ============================================================= */

.b2b-btn-novo-pedido {
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 0 20px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.b2b-btn-novo-pedido:hover {
    background: #2563eb;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.b2b-btn-novo-pedido:active {
    transform: scale(0.98);
}

/* Stat card clickable */
.b2b-stat-clickable {
    cursor: pointer;
}

/* =============================================================
   Historico Pedidos — Filter Bar
   ============================================================= */

.b2b-filter-bar {
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    padding: 16px 20px;
}

.b2b-filter-bar-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.b2b-filter-search {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.b2b-filter-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 13px;
    pointer-events: none;
}

.b2b-filter-search-input {
    width: 100%;
    height: 40px;
    border: 1px solid #e5e9f2;
    border-radius: 8px;
    padding: 0 14px 0 38px;
    font-size: 13px;
    color: #1b2e4b;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.b2b-filter-search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #fff;
}

.b2b-filter-search-input::placeholder {
    color: #94a3b8;
}

.b2b-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.b2b-filter-select {
    height: 40px;
    border: 1px solid #e5e9f2;
    border-radius: 8px;
    padding: 0 32px 0 12px;
    font-size: 13px;
    color: #1b2e4b;
    background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2394a3b8'/%3E%3C/svg%3E") no-repeat right 12px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.b2b-filter-select:focus {
    border-color: #3b82f6;
}

.b2b-filter-date {
    height: 40px;
    border: 1px solid #e5e9f2;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 13px;
    color: #1b2e4b;
    background: #f8fafc;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease;
    min-width: 140px;
}

.b2b-filter-date:focus {
    border-color: #3b82f6;
}

.b2b-filter-clear {
    height: 40px;
    padding: 0 16px;
    border: 1px solid #e5e9f2;
    border-radius: 8px;
    background: #fff;
    color: #8392a5;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.b2b-filter-clear:hover {
    color: #ef4444;
    border-color: #fca5a5;
    background: rgba(239, 68, 68, 0.04);
}

/* =============================================================
   Historico Pedidos — Table Card
   ============================================================= */

.b2b-table-card {
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    overflow: hidden;
}

.b2b-table-responsive {
    overflow-x: auto;
}

.b2b-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.b2b-table thead th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    padding: 14px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8392a5;
    border-bottom: 1px solid #e5e9f2;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease;
}

.b2b-table thead th:hover {
    color: #3b82f6;
}

.b2b-table thead th i {
    margin-left: 4px;
    font-size: 10px;
}

.b2b-sort-inactive {
    opacity: 0.3;
}

.b2b-table tbody td {
    padding: 14px 16px;
    color: #1b2e4b;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: middle;
}

.b2b-table-row {
    transition: background 0.15s ease;
}

.b2b-table-row:hover {
    background: #f8fafc;
}

.b2b-table-row:last-child td {
    border-bottom: none;
}

/* Destaque pedidos recentes */
.b2b-row-recente > td:first-child {
    box-shadow: inset 3px 0 0 #3b82f6;
}

.b2b-th-numero { width: 90px; }
.b2b-th-acoes  { width: 70px; text-align: center; }

.b2b-td-numero { font-weight: 600; }
.b2b-td-acoes  { text-align: center; }

/* Numero badge */
.b2b-numero-badge {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
    padding: 3px 10px;
    border-radius: 6px;
}

.b2b-numero-badge-lg {
    font-size: 16px;
    padding: 5px 14px;
}

.b2b-condicao-text {
    font-size: 13px;
    color: #64748b;
}

.b2b-valor-text {
    font-weight: 600;
    color: #1b2e4b;
}

/* =============================================================
   Historico Pedidos — Status Badges
   ============================================================= */

.b2b-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.b2b-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    font-size: 0;
    line-height: 0;
}

.b2b-status-aberto {
    background: rgba(6, 182, 212, 0.1);
    color: #0891b2;
}

.b2b-status-aberto .b2b-status-dot {
    background: #0891b2;
}

.b2b-status-aprovado {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.b2b-status-aprovado .b2b-status-dot {
    background: #059669;
}

.b2b-status-faturado {
    background: rgba(148, 163, 184, 0.15);
    color: #64748b;
}

.b2b-status-faturado .b2b-status-dot {
    background: #64748b;
}

.b2b-status-cancelado {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.b2b-status-cancelado .b2b-status-dot {
    background: #dc2626;
}

.b2b-status-default {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
}

.b2b-status-default .b2b-status-dot {
    background: #94a3b8;
}

/* =============================================================
   Historico Pedidos — Action Button
   ============================================================= */

.b2b-action-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e5e9f2;
    border-radius: 8px;
    background: #fff;
    color: #8392a5;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.b2b-action-btn:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
    transform: scale(1.05);
}

/* =============================================================
   Historico Pedidos — Pagination
   ============================================================= */

.b2b-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-top: 1px solid #f0f2f5;
    flex-wrap: wrap;
    gap: 12px;
}

.b2b-pagination-info {
    font-size: 13px;
    color: #8392a5;
}

.b2b-pagination-info strong {
    color: #1b2e4b;
    font-weight: 600;
}

.b2b-pagination-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.b2b-pagination-per-page {
    display: flex;
    align-items: center;
    gap: 6px;
}

.b2b-pagination-select {
    height: 32px;
    border: 1px solid #e5e9f2;
    border-radius: 6px;
    padding: 0 28px 0 10px;
    font-size: 12px;
    color: #1b2e4b;
    background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%2394a3b8'/%3E%3C/svg%3E") no-repeat right 10px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    cursor: pointer;
}

.b2b-pagination-per-label {
    font-size: 12px;
    color: #8392a5;
}

.b2b-pagination-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.b2b-page-btn {
    min-width: 34px;
    height: 34px;
    border: 1px solid #e5e9f2;
    border-radius: 8px;
    background: #fff;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    transition: all 0.15s ease;
}

.b2b-page-btn:hover:not(:disabled):not(.b2b-page-active) {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1b2e4b;
}

.b2b-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.b2b-page-active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
    font-weight: 600;
}

.b2b-page-current {
    font-size: 13px;
    font-weight: 600;
    color: #1b2e4b;
    padding: 0 8px;
}

/* =============================================================
   Historico Pedidos — Table Empty State
   ============================================================= */

.b2b-table-empty {
    padding: 48px 24px !important;
    text-align: center;
}

.b2b-table-empty-content i {
    font-size: 36px;
    color: #cbd5e1;
    margin-bottom: 12px;
    display: block;
}

.b2b-table-empty-content p {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 4px 0;
}

.b2b-table-empty-content span {
    font-size: 12px;
    color: #94a3b8;
}

/* =============================================================
   Historico Pedidos — Loading State
   ============================================================= */

.b2b-loading-state {
    text-align: center;
    padding: 60px 24px;
}

.b2b-loading-spinner {
    font-size: 28px;
    color: #3b82f6;
    margin-bottom: 12px;
}

.b2b-loading-state p {
    font-size: 14px;
    color: #8392a5;
    margin: 0;
}

/* =============================================================
   Historico Pedidos — Mobile Cards
   ============================================================= */

.b2b-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.b2b-mobile-card {
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.b2b-mobile-card:active {
    transform: scale(0.99);
}

.b2b-mobile-card.b2b-row-recente {
    border-left: 3px solid #3b82f6;
}

.b2b-mobile-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f2f5;
    background: #fafbfc;
}

.b2b-mobile-card-body {
    padding: 12px 16px;
}

.b2b-mobile-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
}

.b2b-mobile-label {
    font-size: 12px;
    color: #8392a5;
    font-weight: 500;
}

.b2b-mobile-value {
    font-size: 13px;
    color: #1b2e4b;
    font-weight: 500;
}

.b2b-mobile-total {
    font-weight: 700;
    color: #3b82f6;
}

.b2b-mobile-card-footer {
    padding: 10px 16px;
    border-top: 1px solid #f0f2f5;
    text-align: center;
}

.b2b-mobile-ver {
    font-size: 12px;
    font-weight: 600;
    color: #3b82f6;
}

/* =============================================================
   Historico Pedidos — Modal Detalhe (redesenhado)
   ============================================================= */

.b2b-modal-content {
    border: none;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.b2b-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f2f5;
    background: #fafbfc;
}

.b2b-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.b2b-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #1b2e4b;
    margin: 0;
}

.b2b-modal-subtitle {
    font-size: 12px;
    color: #8392a5;
}

.b2b-modal-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.b2b-modal-close {
    width: 36px;
    height: 36px;
    border: 1px solid #e5e9f2;
    border-radius: 8px;
    background: #fff;
    color: #8392a5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.15s ease;
}

.b2b-modal-close:hover {
    background: #f1f5f9;
    color: #1b2e4b;
}

.b2b-modal-body {
    padding: 24px !important;
}

.b2b-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid #f0f2f5;
    background: #fafbfc;
}

/* Detalhe info grid */
.b2b-detalhe-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.b2b-detalhe-info-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    background: #f8fafc;
    border-radius: 10px;
}

.b2b-detalhe-info-icon {
    color: #94a3b8;
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.b2b-detalhe-info-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #8392a5;
    margin-bottom: 3px;
}

.b2b-detalhe-info-value {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1b2e4b;
}

/* Detalhe table */
.b2b-detalhe-table-wrap {
    border: 1px solid #e5e9f2;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}

.b2b-detalhe-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.b2b-detalhe-table thead th {
    background: #f8fafc;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #8392a5;
    border-bottom: 1px solid #e5e9f2;
}

.b2b-detalhe-table tbody td {
    padding: 12px 16px;
    color: #1b2e4b;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: middle;
}

.b2b-detalhe-table tbody tr:last-child td {
    border-bottom: none;
}

.b2b-detalhe-table tbody tr:hover {
    background: #fafbfc;
}

.b2b-detalhe-table tfoot td {
    padding: 14px 16px;
    border-top: 1px solid #e5e9f2;
    background: #f8fafc;
}

.b2b-detalhe-prod-code {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #8392a5;
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 4px;
    margin-right: 6px;
}

.b2b-detalhe-prod-name {
    font-size: 13px;
    color: #1b2e4b;
}

.b2b-detalhe-total-label {
    font-weight: 600;
    color: #64748b;
}

.b2b-detalhe-total-value {
    font-size: 15px;
    font-weight: 700;
    color: #3b82f6;
}

/* Detalhe observacoes */
.b2b-detalhe-obs {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    background: #f8fafc;
    border-radius: 10px;
}

.b2b-detalhe-obs-text {
    font-size: 13px;
    color: #1b2e4b;
    margin: 4px 0 0 0;
    line-height: 1.5;
}

/* =============================================================
   Historico Pedidos — Mobile Pagination
   ============================================================= */

.b2b-pagination-mobile {
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    justify-content: space-between;
}

.b2b-pagination-mobile .b2b-pagination-nav {
    gap: 8px;
}

/* =============================================================
   Historico Pedidos — Responsive
   ============================================================= */

@media (max-width: 767px) {
    .b2b-filter-bar-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .b2b-filter-search {
        min-width: 100%;
    }

    .b2b-filter-group {
        flex-direction: column;
        align-items: stretch;
    }

    .b2b-filter-select,
    .b2b-filter-date {
        width: 100%;
    }

    .b2b-filter-clear {
        width: 100%;
    }

    .b2b-detalhe-info-grid {
        grid-template-columns: 1fr;
    }

    .b2b-modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .b2b-modal-header-right {
        width: 100%;
        justify-content: space-between;
    }

    .b2b-modal-body {
        padding: 16px !important;
    }
}

@media (max-width: 576px) {
    .b2b-btn-novo-pedido {
        width: 100%;
        justify-content: center;
    }
}

/* =============================================================
   Financeiro v2 — Interface Profissional
   ============================================================= */

/* --- Header --- */
.b2b-fin-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}

.b2b-fin-header-left h4 {
    margin-bottom: 0;
}

.b2b-fin-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-top: 4px;
}

.b2b-fin-btn-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 13px;
}

.b2b-fin-btn-icon:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #3b82f6;
}

.b2b-fin-btn-outline {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    height: 38px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.b2b-fin-btn-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #3b82f6;
}

/* --- Cards Grid --- */
.b2b-fin-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.b2b-fin-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.b2b-fin-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.b2b-fin-card--active {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #3b82f6, 0 4px 16px rgba(59, 130, 246, 0.1);
}

.b2b-fin-card--danger {
    border-color: rgba(239, 68, 68, 0.3);
}

.b2b-fin-card--warning {
    border-color: rgba(245, 158, 11, 0.3);
}

.b2b-fin-card--pulse {
    animation: b2b-fin-pulse 2.5s ease-in-out infinite;
}

@keyframes b2b-fin-pulse {
    0%, 100% { box-shadow: 0 2px 12px rgba(239, 68, 68, 0.1); }
    50%      { box-shadow: 0 4px 24px rgba(239, 68, 68, 0.2); }
}

.b2b-fin-card__icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.b2b-fin-card__icon--primary  { background: rgba(59, 130, 246, 0.1);  color: #3b82f6; }
.b2b-fin-card__icon--danger   { background: rgba(239, 68, 68, 0.1);   color: #ef4444; }
.b2b-fin-card__icon--warning  { background: rgba(245, 158, 11, 0.1);  color: #f59e0b; }
.b2b-fin-card__icon--success  { background: rgba(16, 185, 129, 0.1);  color: #10b981; }
.b2b-fin-card__icon--neutral  { background: #f1f5f9;                  color: #94a3b8; }

.b2b-fin-card__content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.b2b-fin-card__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    margin-bottom: 2px;
}

.b2b-fin-card__value {
    font-size: 20px;
    font-weight: 700;
    color: #1b2e4b;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

.b2b-fin-card__meta {
    font-size: 12px;
    color: #8392a5;
    margin-top: 2px;
}

.b2b-fin-card__alert {
    color: #dc2626;
    font-weight: 600;
    font-size: 12px;
}

/* --- Alert --- */
.b2b-fin-alert {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.04) 0%, rgba(239, 68, 68, 0.08) 100%);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-left: 4px solid #ef4444;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #7f1d1d;
}

.b2b-fin-alert__icon {
    font-size: 20px;
    color: #ef4444;
    flex-shrink: 0;
}

.b2b-fin-alert__text {
    flex: 1;
    line-height: 1.5;
}

.b2b-fin-alert__btn {
    flex-shrink: 0;
    padding: 6px 16px;
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
}

.b2b-fin-alert__btn:hover {
    background: #dc2626;
}

/* --- Charts (colapsavel) --- */
.b2b-fin-charts {
    margin-bottom: 20px;
}

.b2b-fin-chart-row {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 24px;
    min-height: 260px;
}

.b2b-fin-chart-doughnut {
    flex: 0 0 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 240px;
}

.b2b-fin-chart-bar {
    flex: 1;
    min-width: 0;
    height: 240px;
}

/* --- Toolbar (filtros) --- */
.b2b-fin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.b2b-fin-toolbar__left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    flex-wrap: wrap;
}

.b2b-fin-toolbar__right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.b2b-fin-search {
    position: relative;
    flex: 0 1 320px;
    min-width: 200px;
}

.b2b-fin-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 13px;
    pointer-events: none;
}

.b2b-fin-search input {
    width: 100%;
    height: 38px;
    padding: 0 14px 0 36px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #1b2e4b;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.b2b-fin-search input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.b2b-fin-search input::placeholder {
    color: #b0bec5;
}

.b2b-fin-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.b2b-fin-select {
    height: 38px;
    padding: 0 32px 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #475569;
    background: #fff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.b2b-fin-select:focus {
    outline: none;
    border-color: #3b82f6;
}

.b2b-fin-date-range {
    display: flex;
    align-items: center;
    gap: 6px;
}

.b2b-fin-date {
    height: 38px;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #475569;
    background: #fff;
    width: 140px;
}

.b2b-fin-date:focus {
    outline: none;
    border-color: #3b82f6;
}

.b2b-fin-date-sep {
    font-size: 12px;
    color: #94a3b8;
}

.b2b-fin-result-count {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 6px;
}

.b2b-fin-btn-clear {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 12px;
    height: 34px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.b2b-fin-btn-clear:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

/* --- Batch action bar --- */
.b2b-fin-batch-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 20px;
    background: #1e293b;
    border-radius: 10px;
    margin-bottom: 16px;
    color: #fff;
}

.b2b-fin-batch-bar__info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.b2b-fin-batch-bar__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 6px;
    background: #3b82f6;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
}

.b2b-fin-batch-bar__total {
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 13px;
}

.b2b-fin-batch-bar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.b2b-fin-batch-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.b2b-fin-batch-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.b2b-fin-batch-btn--cancel {
    border-color: transparent;
    opacity: 0.7;
}

.b2b-fin-batch-btn--cancel:hover {
    opacity: 1;
    background: rgba(239, 68, 68, 0.2);
}

/* Transition slide up */
.b2b-slide-up-enter-active,
.b2b-slide-up-leave-active {
    transition: all 0.25s ease;
}

.b2b-slide-up-enter,
.b2b-slide-up-leave-to {
    opacity: 0;
    transform: translateY(10px);
}

/* --- Table --- */
.b2b-fin-table-wrap {
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    overflow: hidden;
}

.b2b-fin-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.b2b-fin-table thead {
    background: #f8fafc;
    border-bottom: 1px solid #e5e9f2;
}

.b2b-fin-th {
    padding: 12px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    text-align: left;
    white-space: nowrap;
}

.b2b-fin-th--sort {
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease;
}

.b2b-fin-th--sort:hover {
    color: #3b82f6;
}

.b2b-fin-th i {
    margin-left: 3px;
    font-size: 9px;
}

.b2b-sort-inactive {
    opacity: 0.3;
}

.b2b-fin-th--check {
    padding-left: 16px;
    width: 44px;
}

/* Checkbox */
.b2b-fin-checkbox {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    width: 18px;
    height: 18px;
}

.b2b-fin-checkbox input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.b2b-fin-checkbox__mark {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    transition: all 0.15s ease;
    position: relative;
}

.b2b-fin-checkbox input:checked + .b2b-fin-checkbox__mark {
    background: #3b82f6;
    border-color: #3b82f6;
}

.b2b-fin-checkbox input:checked + .b2b-fin-checkbox__mark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.b2b-fin-checkbox:hover .b2b-fin-checkbox__mark {
    border-color: #94a3b8;
}

/* Row */
.b2b-fin-row {
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.1s ease;
}

.b2b-fin-row:hover {
    background: #f8fafc;
}

.b2b-fin-row--selected {
    background: rgba(59, 130, 246, 0.04);
}

.b2b-fin-row--selected:hover {
    background: rgba(59, 130, 246, 0.07);
}

.b2b-fin-row--expanded {
    background: #f8fafc;
    border-bottom-color: transparent;
}

.b2b-fin-row--vencido {
    background: rgba(239, 68, 68, 0.02);
}

.b2b-fin-row--vencido:hover {
    background: rgba(239, 68, 68, 0.05);
}

.b2b-fin-row--proximo {
    background: rgba(245, 158, 11, 0.02);
}

.b2b-fin-row--proximo:hover {
    background: rgba(245, 158, 11, 0.04);
}

.b2b-fin-row--pago {
    opacity: 0.65;
}

.b2b-fin-row--pago:hover {
    opacity: 1;
}

/* Cells */
.b2b-fin-td {
    padding: 14px 14px;
    font-size: 13px;
    color: #334155;
    vertical-align: middle;
}

.b2b-fin-td--check {
    padding-left: 16px;
    width: 44px;
}

.b2b-fin-td--indicator {
    width: 4px;
    padding: 0;
}

.b2b-fin-indicator {
    display: block;
    width: 3px;
    height: 32px;
    border-radius: 2px;
    background: transparent;
}

.b2b-fin-indicator--danger  { background: #ef4444; }
.b2b-fin-indicator--warning { background: #f59e0b; }
.b2b-fin-indicator--success { background: #10b981; }

/* Cell content */
.b2b-fin-numero {
    font-weight: 700;
    color: #1b2e4b;
    font-size: 13px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

.b2b-fin-cliente {
    font-weight: 500;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
}

.b2b-fin-ref {
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
}

/* Vencimento */
.b2b-fin-vencimento {
    display: flex;
    align-items: center;
    gap: 8px;
}

.b2b-fin-vencimento__data {
    font-size: 13px;
    color: #334155;
}

.b2b-fin-vencimento--danger {
    color: #dc2626;
    font-weight: 600;
}

.b2b-fin-vencimento--warning {
    color: #d97706;
    font-weight: 600;
}

.b2b-fin-vencimento__badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.b2b-fin-vencimento__badge--danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.b2b-fin-vencimento__badge--warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

/* Valor */
.b2b-fin-valor {
    font-weight: 700;
    font-size: 13px;
    color: #1b2e4b;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    white-space: nowrap;
}

.b2b-fin-valor--danger {
    color: #dc2626;
}

/* Status badge */
.b2b-fin-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.b2b-fin-status__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.b2b-fin-status--pago {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.b2b-fin-status--pago .b2b-fin-status__dot {
    background: #059669;
}

.b2b-fin-status--vencido {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.b2b-fin-status--vencido .b2b-fin-status__dot {
    background: #dc2626;
}

.b2b-fin-status--aberto {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.b2b-fin-status--aberto .b2b-fin-status__dot {
    background: #d97706;
}

/* Action button */
.b2b-fin-btn-action {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.15s ease;
}

.b2b-fin-btn-action:hover {
    background: #f1f5f9;
    color: #3b82f6;
}

.b2b-fin-td--actions {
    text-align: center;
    width: 50px;
}

/* Detail row */
.b2b-fin-detail-row {
    background: #f8fafc;
    border-bottom: 1px solid #e5e9f2;
}

.b2b-fin-detail-row td {
    padding: 0;
}

.b2b-fin-detail {
    padding: 20px 24px 20px 72px;
    animation: b2b-fin-detail-in 0.2s ease;
}

@keyframes b2b-fin-detail-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.b2b-fin-detail__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 24px;
    margin-bottom: 16px;
}

.b2b-fin-detail__label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    margin-bottom: 3px;
}

.b2b-fin-detail__value {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1b2e4b;
}

.b2b-fin-detail__value--money {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    color: #1b2e4b;
}

.b2b-fin-detail__actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #e5e9f2;
}

.b2b-fin-detail__btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 6px;
    color: #475569;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.b2b-fin-detail__btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #3b82f6;
}

/* Empty / Loading */
.b2b-fin-table__empty {
    padding: 0;
}

.b2b-fin-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #94a3b8;
}

.b2b-fin-loading i {
    font-size: 24px;
    margin-bottom: 10px;
    color: #3b82f6;
}

.b2b-fin-loading p {
    margin: 0;
    font-size: 13px;
}

.b2b-fin-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    color: #94a3b8;
}

.b2b-fin-empty i {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.b2b-fin-empty p {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

.b2b-fin-empty span {
    font-size: 12px;
}

/* --- Pagination --- */
.b2b-fin-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
}

.b2b-fin-pagination__info {
    font-size: 12px;
    color: #64748b;
}

.b2b-fin-pagination__controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.b2b-fin-pagination__select {
    height: 32px;
    padding: 0 28px 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    color: #475569;
    background: #fff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.b2b-fin-pagination__nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.b2b-fin-page-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 6px;
    color: #475569;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.b2b-fin-page-btn:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #3b82f6;
}

.b2b-fin-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.b2b-fin-page-btn--active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.b2b-fin-page-btn--active:hover:not(:disabled) {
    background: #2563eb;
    color: #fff;
}

.b2b-fin-page-current {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    padding: 0 8px;
}

/* --- Mobile --- */
.b2b-fin-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.b2b-fin-mobile-card {
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.15s ease;
}

.b2b-fin-mobile-card:active {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.b2b-fin-mobile-card--vencido {
    border-left: 3px solid #ef4444;
}

.b2b-fin-mobile-card--proximo {
    border-left: 3px solid #f59e0b;
}

.b2b-fin-mobile-card--pago {
    opacity: 0.7;
}

.b2b-fin-mobile-card__header {
    padding: 14px 16px 0;
}

.b2b-fin-mobile-card__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.b2b-fin-mobile-card__cliente {
    font-size: 12px;
    color: #64748b;
    margin-top: 6px;
}

.b2b-fin-mobile-card__cliente i {
    font-size: 10px;
    margin-right: 4px;
    color: #94a3b8;
}

.b2b-fin-mobile-card__body {
    padding: 10px 16px;
}

.b2b-fin-mobile-card__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 4px 0;
}

.b2b-fin-mobile-card__label {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.b2b-fin-mobile-card__val {
    font-size: 13px;
    color: #334155;
    font-weight: 500;
    text-align: right;
}

.b2b-fin-mobile-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px 14px;
    border-top: 1px solid #f1f5f9;
}

.b2b-fin-mobile-card__valor {
    font-size: 18px;
    font-weight: 700;
    color: #1b2e4b;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

/* --- Pagination mobile --- */
.b2b-fin-pagination--mobile {
    background: transparent;
    border: none;
    padding: 16px 0;
}

/* --- Toast --- */
.b2b-fin-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #1e293b;
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 9999;
}

.b2b-fin-toast i {
    color: #10b981;
}

.b2b-fade-enter-active,
.b2b-fade-leave-active {
    transition: all 0.25s ease;
}

.b2b-fade-enter,
.b2b-fade-leave-to {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
}

/* =============================================================
   Financeiro — Skeleton Loading
   ============================================================= */

.b2b-fin-skeleton {
    pointer-events: none;
}

.b2b-fin-skeleton__bar {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: b2b-shimmer 1.5s infinite;
    border-radius: 6px;
    display: inline-block;
}

.b2b-fin-skeleton__circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: b2b-shimmer 1.5s infinite;
    flex-shrink: 0;
}

.b2b-fin-skeleton__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 0 20px;
}

.b2b-fin-skeleton__card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1px solid #f0f2f5;
    border-radius: 12px;
    padding: 20px;
}

.b2b-fin-skeleton__toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.b2b-fin-skeleton__table {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f0f2f5;
    overflow: hidden;
}

.b2b-fin-skeleton__table-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: #fafbfc;
    border-bottom: 1px solid #f0f2f5;
}

.b2b-fin-skeleton__table-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid #f8f9fa;
}

.b2b-fin-skeleton__table-row:last-child {
    border-bottom: none;
}

.b2b-fin-skeleton__mobile-card {
    background: #fff;
    border: 1px solid #f0f2f5;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 10px;
}

/* Financeiro — Erro de carregamento */

.b2b-fin-erro {
    text-align: center;
    padding: 80px 20px;
}

.b2b-fin-erro__icon {
    font-size: 40px;
    color: #d97706;
    margin-bottom: 16px;
}

.b2b-fin-erro h5 {
    color: #1b2e4b;
    font-weight: 600;
}

/* --- tx-hoje reusavel --- */
.tx-hoje {
    color: #d97706;
    font-weight: 600;
}

/* --- Responsive --- */
@media (max-width: 1200px) {
    .b2b-fin-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991px) {
    .b2b-fin-detail__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .b2b-fin-header {
        flex-direction: column;
        gap: 10px;
    }

    .b2b-fin-header-actions {
        align-self: flex-end;
        margin-top: 0;
    }

    .b2b-fin-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .b2b-fin-card {
        padding: 14px 14px;
        gap: 10px;
    }

    .b2b-fin-card__icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 15px;
        border-radius: 8px;
    }

    .b2b-fin-card__value {
        font-size: 16px;
    }

    .b2b-fin-card__label {
        font-size: 10px;
    }

    .b2b-fin-alert {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        font-size: 12px;
        padding: 12px 14px;
    }

    .b2b-fin-alert__btn {
        align-self: stretch;
        text-align: center;
    }

    .b2b-fin-toolbar {
        flex-direction: column;
        gap: 10px;
    }

    .b2b-fin-toolbar__left {
        width: 100%;
        flex-direction: column;
    }

    .b2b-fin-search {
        flex: none;
        width: 100%;
    }

    .b2b-fin-filters {
        width: 100%;
    }

    .b2b-fin-select {
        flex: 1;
    }

    .b2b-fin-date-range {
        flex: 1;
    }

    .b2b-fin-date {
        width: 100%;
        flex: 1;
    }

    .b2b-fin-toolbar__right {
        width: 100%;
        justify-content: flex-end;
    }

    .b2b-fin-batch-bar {
        flex-direction: column;
        gap: 10px;
        padding: 14px 16px;
    }

    .b2b-fin-batch-bar__info {
        flex-wrap: wrap;
    }

    .b2b-fin-batch-bar__actions {
        width: 100%;
    }

    .b2b-fin-batch-btn {
        flex: 1;
        justify-content: center;
    }

    .b2b-fin-chart-row {
        flex-direction: column;
        padding: 16px;
    }

    .b2b-fin-chart-doughnut {
        flex: none;
        width: 100%;
        height: 200px;
    }

    .b2b-fin-chart-bar {
        width: 100%;
        height: 200px;
    }

    .b2b-fin-pagination {
        flex-direction: column;
        gap: 10px;
        padding: 12px 16px;
    }
}

@media (max-width: 576px) {
    .b2b-fin-cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .b2b-fin-card__value {
        font-size: 14px;
    }

    .b2b-fin-card__meta {
        font-size: 11px;
    }

    .b2b-fin-chart-doughnut {
        height: 180px;
    }

    .b2b-fin-chart-bar {
        height: 180px;
    }
}

/* =============================================================
   Minha Conta
   ============================================================= */

.b2b-conta-card {
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
}

/* Profile header */
.b2b-conta-profile-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 28px 24px;
    background: linear-gradient(135deg, #f0f6ff 0%, #f8fafc 100%);
    border-bottom: 1px solid #e5e9f2;
}

.b2b-conta-avatar {
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: 50%;
    background: #3b82f6;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.b2b-conta-nome {
    font-size: 18px;
    font-weight: 700;
    color: #1b2e4b;
    margin: 0 0 4px;
    line-height: 1.3;
}

.b2b-conta-email {
    font-size: 13px;
    color: #8392a5;
    margin: 0;
}

.b2b-conta-email i {
    font-size: 11px;
    margin-right: 5px;
    color: #94a3b8;
}

/* Body */
.b2b-conta-body {
    padding: 24px;
}

.b2b-conta-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #1b2e4b;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f2f5;
}

.b2b-conta-section-title i {
    color: #3b82f6;
    margin-right: 8px;
    font-size: 14px;
}

/* Data grid */
.b2b-conta-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 20px;
}

.b2b-conta-data-full {
    grid-column: 1 / -1;
}

.b2b-conta-data-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    margin-bottom: 4px;
}

.b2b-conta-data-value {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1b2e4b;
}

/* Info box */
.b2b-conta-info-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: #f0f6ff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    font-size: 12px;
    color: #3b82f6;
    line-height: 1.5;
}

.b2b-conta-info-box i {
    font-size: 14px;
    margin-top: 1px;
    flex-shrink: 0;
}

/* Input groups */
.b2b-conta-input-group {
    margin-bottom: 18px;
}

.b2b-conta-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1b2e4b;
    margin-bottom: 6px;
}

.b2b-conta-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.b2b-conta-input-icon {
    position: absolute;
    left: 14px;
    font-size: 13px;
    color: #94a3b8;
    z-index: 1;
    pointer-events: none;
}

.b2b-conta-input {
    width: 100%;
    height: 44px;
    padding: 0 44px 0 40px;
    border: 1px solid #e5e9f2;
    border-radius: 8px;
    font-size: 13px;
    color: #1b2e4b;
    background: #f8fafc;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.b2b-conta-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.b2b-conta-input::placeholder {
    color: #b0bec5;
}

/* Toggle password */
.b2b-conta-toggle-pwd {
    position: absolute;
    right: 4px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
}

.b2b-conta-toggle-pwd:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.06);
}

/* Password strength */
.b2b-conta-pwd-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.b2b-conta-pwd-bar {
    flex: 1;
    height: 4px;
    background: #e5e9f2;
    border-radius: 4px;
    overflow: hidden;
}

.b2b-conta-pwd-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease, background 0.3s ease;
}

.b2b-pwd-fraca  { background: #ef4444; }
.b2b-pwd-media  { background: #f59e0b; }
.b2b-pwd-forte  { background: #10b981; }

.b2b-conta-pwd-text {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.b2b-pwd-text-fraca  { color: #ef4444; }
.b2b-pwd-text-media  { color: #f59e0b; }
.b2b-pwd-text-forte  { color: #10b981; }

/* Password match */
.b2b-conta-pwd-match {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 500;
}

.b2b-pwd-match-ok {
    color: #10b981;
}

.b2b-pwd-match-ok i,
.b2b-pwd-match-err i {
    margin-right: 4px;
}

.b2b-pwd-match-err {
    color: #ef4444;
}

/* Save button */
.b2b-conta-btn-salvar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 24px;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.b2b-conta-btn-salvar:hover:not(:disabled) {
    background: #2563eb;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
}

.b2b-conta-btn-salvar:active:not(:disabled) {
    transform: scale(0.98);
}

.b2b-conta-btn-salvar:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

/* Mobile */
@media (max-width: 767px) {
    .b2b-conta-profile-header {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }

    .b2b-conta-data-grid {
        grid-template-columns: 1fr;
    }

    .b2b-conta-body {
        padding: 20px;
    }
}

/* ======================================================
   Primeiro Login — Botão + Modal
   ====================================================== */

.b2b-btn-primeiro-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 42px;
    font-size: 13.5px;
    font-weight: 600;
    color: #1b6dc1;
    background: transparent;
    border: 1.5px solid #1b6dc1;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.b2b-btn-primeiro-login:hover {
    background: rgba(27, 109, 193, 0.06);
    color: #1558a0;
    transform: translateY(-1px);
}

.b2b-btn-primeiro-login:active {
    transform: translateY(0);
}

/* Toast acima dos overlays */
.jq-toast-wrap {
    z-index: 10001 !important;
}

/* Overlay */
.b2b-primeiro-login-overlay,
.b2b-welcome-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 24, 40, 0.55);
    backdrop-filter: blur(4px);
    padding: 20px;
    animation: b2b-fadeIn 0.25s ease;
}

@keyframes b2b-fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes b2b-slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Card do primeiro login */
.b2b-primeiro-login-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(16, 24, 40, 0.18);
    padding: 40px 36px 32px;
    width: 100%;
    max-width: 440px;
    animation: b2b-slideUp 0.35s ease;
}

.b2b-primeiro-login-header {
    text-align: center;
    margin-bottom: 28px;
}

.b2b-primeiro-login-header > i {
    font-size: 36px;
    color: #1b6dc1;
    margin-bottom: 12px;
    display: block;
}

.b2b-primeiro-login-header h5 {
    font-size: 20px;
    font-weight: 700;
    color: #1D2939;
    margin-bottom: 8px;
}

.b2b-primeiro-login-header p {
    font-size: 13px;
    color: #667085;
    margin: 0;
    line-height: 1.5;
}

/* Sucesso (passo 2) */
.b2b-primeiro-login-sucesso {
    margin-bottom: 16px;
}

.b2b-primeiro-login-sucesso i {
    font-size: 48px;
    color: #10B981;
}

.b2b-primeiro-login-dicas {
    background: #F0FDF4;
    border-radius: 10px;
    padding: 16px 20px;
    margin-top: 16px;
    text-align: left;
}

.b2b-primeiro-login-dicas p {
    font-size: 13px;
    color: #344054;
    margin: 0 0 6px;
}

.b2b-primeiro-login-dicas p:last-child {
    margin-bottom: 0;
}

/* ======================================================
   Modal de Boas-vindas (Dashboard)
   ====================================================== */

.b2b-welcome-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 64px rgba(16, 24, 40, 0.2);
    width: 100%;
    max-width: 520px;
    overflow: hidden;
    animation: b2b-slideUp 0.4s ease;
}

.b2b-welcome-header {
    text-align: center;
    padding: 36px 32px 20px;
    background: linear-gradient(135deg, #EFF6FF 0%, #F0F7FF 100%);
    border-bottom: 1px solid #E0EAFF;
}

.b2b-welcome-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1b6dc1 0%, #3385d9 100%);
    color: #fff;
    font-size: 28px;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px rgba(27, 109, 193, 0.25);
}

.b2b-welcome-header h4 {
    font-size: 22px;
    font-weight: 700;
    color: #1D2939;
    margin-bottom: 8px;
}

.b2b-welcome-header p {
    font-size: 14px;
    color: #667085;
    margin: 0;
}

.b2b-welcome-body {
    padding: 24px 32px 8px;
}

.b2b-welcome-intro {
    font-size: 13.5px;
    color: #475467;
    line-height: 1.6;
    margin-bottom: 20px;
}

.b2b-welcome-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.b2b-welcome-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #FAFBFC;
    border: 1px solid #F2F4F7;
    transition: background 0.2s ease;
}

.b2b-welcome-feature:hover {
    background: #F0F7FF;
}

.b2b-welcome-feature-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
}

.b2b-wf-primary  { background: linear-gradient(135deg, #1b6dc1, #3385d9); }
.b2b-wf-success  { background: linear-gradient(135deg, #059669, #10B981); }
.b2b-wf-warning  { background: linear-gradient(135deg, #D97706, #F59E0B); }
.b2b-wf-info     { background: linear-gradient(135deg, #7C3AED, #8B5CF6); }

.b2b-welcome-feature strong {
    display: block;
    font-size: 13.5px;
    color: #1D2939;
    margin-bottom: 2px;
}

.b2b-welcome-feature span {
    font-size: 12.5px;
    color: #667085;
}

.b2b-welcome-footer {
    padding: 20px 32px 28px;
}

.b2b-welcome-footer .b2b-btn-entrar {
    width: 100%;
}

/* Mobile — Primeiro Login + Boas-vindas */
@media (max-width: 575px) {
    .b2b-primeiro-login-card {
        padding: 32px 24px 24px;
    }

    .b2b-welcome-card {
        max-width: 100%;
    }

    .b2b-welcome-header {
        padding: 28px 20px 16px;
    }

    .b2b-welcome-body {
        padding: 20px 20px 8px;
    }

    .b2b-welcome-footer {
        padding: 16px 20px 24px;
    }

    .b2b-welcome-header h4 {
        font-size: 19px;
    }
}

/* =============================================================
   Modal de Sucesso — Pedido Enviado (overlay bloqueante)
   ============================================================= */
.b2b-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

.b2b-success-modal {
    background: #fff;
    border-radius: 16px;
    padding: 40px 48px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: b2b-modal-enter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    max-width: 380px;
    width: 90%;
}

@keyframes b2b-modal-enter {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Overlay fade transition (Vue) */
.b2b-overlay-fade-enter-active {
    transition: opacity 0.3s ease;
}
.b2b-overlay-fade-enter {
    opacity: 0;
}

/* Icone animado de check */
.b2b-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
}

.b2b-success-check {
    width: 64px;
    height: 64px;
}

.b2b-success-check-circle {
    stroke: #10b981;
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: b2b-check-circle 0.6s 0.2s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.b2b-success-check-path {
    stroke: #10b981;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: b2b-check-path 0.35s 0.55s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

@keyframes b2b-check-circle {
    to { stroke-dashoffset: 0; }
}

@keyframes b2b-check-path {
    to { stroke-dashoffset: 0; }
}

/* Textos */
.b2b-success-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 6px;
}

.b2b-success-numero {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 24px;
}

/* Spinner + redirecionando */
.b2b-success-redirect {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #94a3b8;
    font-size: 13px;
}

.b2b-success-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: b2b-spin 0.7s linear infinite;
}

@keyframes b2b-spin {
    to { transform: rotate(360deg); }
}

/* ======================================================
   B2B — Interpretar pedido por IA
   ====================================================== */
.b2b-ia-upload-card {
    border: none;
    border-radius: 10px;
}

.b2b-ia-upload-area {
    border: 2px dashed #ced4da;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: border-color .2s, background-color .2s, transform .15s;
    background: #fafbfc;
}
.b2b-ia-upload-area:hover,
.b2b-ia-upload-area--drag {
    border-color: #3b82f6;
    background: #f0f7ff;
}
.b2b-ia-upload-area--drag {
    transform: scale(1.01);
}

.b2b-ia-upload-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto;
    border-radius: 50%;
    background: #e0ecff;
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.b2b-ia-upload-file-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto;
    border-radius: 50%;
    background: #fee2e2;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.b2b-ia-tabela-itens th {
    font-weight: 600;
    color: #6b7280;
    border-top: none;
    border-bottom: 1px solid #e5e7eb;
}
.b2b-ia-tabela-itens td {
    vertical-align: middle;
    border-top: 1px solid #f1f3f5;
}
.b2b-ia-row-baixa {
    background-color: #fef2f2 !important;
}
.b2b-ia-row-baixa td {
    border-left: 3px solid #dc2626;
}
.b2b-ia-row-baixa td:not(:first-child) {
    border-left: none;
}

.b2b-btn-ia {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    color: #fff !important;
}
.b2b-btn-ia:hover {
    filter: brightness(1.08);
    color: #fff !important;
}

/* Animacao de gravacao */
.b2b-ia-recording-pulse i {
    animation: pulse-recording 1s infinite;
}
@keyframes pulse-recording {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* CKEditor dentro da tela de interpretar */
#ckeditor-interpretar + .ck-editor .ck-editor__editable {
    min-height: 200px;
}

[v-cloak] {
    display: none !important;
}
