/* ======================================================
   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: baseline;
    text-decoration: none;
    margin-right: 32px;
    flex-shrink: 0;
}
.b2b-navbar-brand:hover { text-decoration: none; }
.b2b-brand-primary {
    font-size: 20px;
    font-weight: 700;
    color: #3B82F6;
    letter-spacing: -0.3px;
}
.b2b-brand-secondary {
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 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: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 — Search Card
   ============================================================= */

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

.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;
    position: sticky;
    top: 20px;
}

.b2b-summary-header {
    padding: 18px 24px;
    font-size: 15px;
    font-weight: 700;
    color: #1b2e4b;
    border-bottom: 1px solid #e5e9f2;
    background: #f8fafc;
}

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

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

.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;
    }
}

@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 */
    .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 {
    position: relative;
}

.b2b-row-recente::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #3b82f6;
    border-radius: 0 2px 2px 0;
}

.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 — Tela Modernizada
   ============================================================= */

/* Card critico (vencido com valor > 0) */
.b2b-fin-card-critico {
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.25);
    animation: b2b-pulse-danger 2s ease-in-out infinite;
}

@keyframes b2b-pulse-danger {
    0%, 100% { box-shadow: 0 4px 20px rgba(239, 68, 68, 0.15); }
    50%      { box-shadow: 0 4px 28px rgba(239, 68, 68, 0.25); }
}

/* Alerta financeiro */
.b2b-fin-alert-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.06) 0%, rgba(239, 68, 68, 0.12) 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-left: 4px solid #ef4444;
    border-radius: 10px;
    font-size: 13px;
    color: #991b1b;
}

.b2b-fin-alert-bar i {
    font-size: 18px;
    color: #ef4444;
    flex-shrink: 0;
}

/* Chart row (doughnut + bar) */
.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;
}

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

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

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

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

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

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

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

/* Linha vencida (destaque de risco) */
.b2b-fin-row-vencido {
    background: rgba(239, 68, 68, 0.03);
    position: relative;
}

.b2b-fin-row-vencido::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #ef4444;
    border-radius: 0 2px 2px 0;
}

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

/* Linha proximo do vencimento */
.b2b-fin-row-proximo {
    background: rgba(245, 158, 11, 0.03);
    position: relative;
}

.b2b-fin-row-proximo::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #f59e0b;
    border-radius: 0 2px 2px 0;
}

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

/* Table header sortable */
.b2b-fin-th {
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease;
}

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

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

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

/* Responsive chart */
@media (max-width: 767px) {
    .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-alert-bar {
        font-size: 12px;
        padding: 12px 14px;
    }
}

@media (max-width: 576px) {
    .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;
    }
}
