/**
 * B2B Banco de Licenças - Styles
 * Version: 2.1 - Redesign
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    --b2b-primary: #6366f1;
    --b2b-primary-dark: #4f46e5;
    --b2b-primary-hover: #4f46e5;
    --b2b-secondary: #8b5cf6;
    --b2b-success: #10b981;
    --b2b-success-dark: #059669;
    --b2b-warning: #f59e0b;
    --b2b-danger: #ef4444;
    --b2b-text: #1e293b;
    --b2b-text-muted: #64748b;
    --b2b-bg: #f8fafc;
    --b2b-bg-alt: #f1f5f9;
    --b2b-card: #fff;
    --b2b-card-hover: #f8fafc;
    --b2b-border: #e2e8f0;
    --b2b-shadow: 0 4px 24px rgba(99, 102, 241, 0.15);
    --b2b-shadow-lg: 0 8px 30px rgba(99, 102, 241, 0.2);
    --b2b-radius: 14px;
    --b2b-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --b2b-step-active-bg: rgba(99, 102, 241, 0.12);
    --b2b-notice-bg: #fffbeb;
    --b2b-notice-border: #fde68a;
    --b2b-notice-title: #92400e;
    --b2b-notice-msg: #78350f;
    --b2b-modal-backdrop: rgba(0, 0, 0, 0.6);
    --b2b-alert-success-bg: #d1fae5;
    --b2b-alert-success-color: #065f46;
    --b2b-alert-error-bg: #fee2e2;
    --b2b-alert-error-color: #991b1b;
    --b2b-badge-active-bg: #d1fae5;
    --b2b-badge-active-color: #065f46;
    --b2b-badge-suspended-bg: #fee2e2;
    --b2b-badge-suspended-color: #991b1b;
    --b2b-badge-pending-bg: #fef3c7;
    --b2b-badge-pending-color: #92400e;
}


/* ==========================================================================
   Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ==========================================================================
   Login Page Styles
   ========================================================================== */
.b2b-login-page {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.b2b-login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(255,255,255,0.08) 0%, transparent 50%);
    pointer-events: none;
}

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.login-container {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 50px 40px;
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255,255,255,0.2);
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.logo-section {
    text-align: center;
    margin-bottom: 35px;
}

.logo-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    animation: scaleIn 0.5s ease-out 0.2s both;
}

.logo-icon svg {
    width: 36px;
    height: 36px;
    fill: #fff;
}

.login-container h1 {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.login-container h1 span {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 15px;
    color: #64748b;
    font-weight: 500;
}

/* Optional field label */
.optional {
    font-weight: 400;
    color: var(--b2b-text-muted);
    font-size: 12px;
}

.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    width: 20px;
    height: 20px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fff;
    color: #2d3748;
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
}

.input-wrapper .form-input {
    padding-left: 46px;
}

.form-input:focus {
    outline: none;
    border-color: var(--b2b-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.form-input::placeholder {
    color: #cbd5e0;
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--b2b-transition);
    margin-top: 10px;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

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

.error-msg {
    background: linear-gradient(135deg, #fc5c7d, #e74c3c);
    color: #fff;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shake 0.5s;
}

.error-msg::before {
    content: '⚠';
    font-size: 18px;
}

.footer-text {
    text-align: center;
    margin-top: 25px;
    font-size: 13px;
    color: #718096;
}

/* ==========================================================================
   Panel/Dashboard Styles (fullscreen / largura total em /painel)
   ========================================================================== */
html body.b2b-panel-page,
body.b2b-panel-page {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 100vh;
    background: var(--b2b-bg);
}

.b2b-panel-page {
    background: var(--b2b-bg);
    color: var(--b2b-text);
    width: 100% !important;
    max-width: none !important;
    min-height: 100vh;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

.dash-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 24px;
    box-sizing: border-box;
}

.top-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 20px 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 24px rgba(102, 126, 234, 0.25);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.brand-logo svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

.brand-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.brand-sub {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 2px;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--b2b-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
    border: 2px solid var(--b2b-border);
}

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

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--b2b-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 12px;
    color: var(--b2b-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hide Sair button on desktop */
.btn-logout {
    display: none;
}

/* ==========================================================================
   Header Menu (Download, Suporte, Personalizar)
   ========================================================================== */
/* ==========================================================================
   Header Menu (Download, Suporte, Personalizar)
   ========================================================================== */
.header-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: flex-end;
    /* Alinhado à direita */
}

.menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    backdrop-filter: blur(5px);
}

.menu-btn:hover {
    background: #fff;
    color: #667eea !important;
    border-color: #fff !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Estilos específicos para Download e WhatsApp abaixo */

.menu-btn.download {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none !important;
    color: #fff !important;
}

.menu-btn.download:hover {
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.menu-btn.whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
    border: none !important;
    color: #fff !important;
}

.menu-btn.whatsapp:hover {
    background: linear-gradient(135deg, #128c7e, #0e6b5e);
    color: #fff !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.menu-btn.menu-logout {
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

.menu-btn.menu-logout:hover {
    background: #fff;
    color: #ef4444 !important;
    border-color: #fff !important;
}

/* Seção de menu toggle removida */

/* Mobile Styles */
@media (max-width: 768px) {
    .header-top {
        flex-wrap: wrap;
        gap: 12px;
        justify-content: center;
        /* Centraliza no mobile se quebrar linha */
    }

    .header-menu {
        /* Garante que o menu apareça e possa quebrar linha se necessário */
        display: flex;
        width: 100%;
        justify-content: center;
        /* Centraliza botões no mobile */
        margin-top: 10px;
    }

    .header-menu .menu-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        box-shadow: none;
    }

    .header-menu .menu-btn:not(.download):not(.whatsapp):not(.menu-logout) {
        background: linear-gradient(135deg, #667eea, #764ba2);
        color: #fff !important;
    }

    /* Show Sair in mobile menu */
    .menu-btn.menu-logout {
        display: flex;
        order: 99;
    }

    .top-header {
        position: relative;
    }

    .user-info,
    .user-avatar {
        display: none;
    }
}

/* ==========================================================================
   Notice Carousel (Avisos)
   ========================================================================== */
.notice-carousel {
    background: var(--b2b-notice-bg);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 22px;
    border: 1px solid var(--b2b-notice-border);
    box-shadow: var(--b2b-shadow);
}

.notice-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.notice-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.notice-text {
    flex: 1;
    min-width: 0;
}

.notice-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--b2b-notice-title);
    margin-bottom: 2px;
}

.notice-message {
    font-size: 13px;
    color: var(--b2b-notice-msg);
    line-height: 1.5;
}

.notice-nav {
    flex-shrink: 0;
}

.notice-dots {
    display: flex;
    gap: 8px;
}

.notice-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--b2b-text-muted);
    opacity: 0.5;
    cursor: pointer;
    transition: all 0.3s ease;
}

.notice-dot.active {
    background: var(--b2b-primary);
    opacity: 1;
    transform: scale(1.2);
}

.notice-dot:hover {
    background: var(--b2b-primary);
    opacity: 1;
}

/* ==========================================================================
   Steps Flow (Fluxo visual)
   ========================================================================== */
.b2b-steps-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--b2b-card);
    border-radius: var(--b2b-radius);
    box-shadow: var(--b2b-shadow);
    border: 1px solid var(--b2b-border);
}

.b2b-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 12px;
    background: var(--b2b-bg-alt);
    color: var(--b2b-text-muted);
    font-size: 14px;
    font-weight: 600;
    transition: var(--b2b-transition);
}

.b2b-step.b2b-step-active {
    background: var(--b2b-step-active-bg);
    color: var(--b2b-primary);
    border: 1px solid var(--b2b-primary);
}

.b2b-step-num {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--b2b-border);
    border-radius: 50%;
    font-size: 13px;
}

.b2b-step.b2b-step-active .b2b-step-num {
    background: var(--b2b-primary);
    color: #fff;
}

.b2b-step-badge {
    font-size: 11px;
    padding: 4px 10px;
    background: var(--b2b-primary);
    color: #fff;
    border-radius: 20px;
    font-weight: 600;
    animation: pulse 2s ease-in-out infinite;
}

.b2b-step-arrow {
    width: 24px;
    height: 2px;
    background: var(--b2b-border);
}

@media (max-width: 640px) {
    .b2b-steps-flow { flex-direction: column; gap: 8px; }
    .b2b-step-arrow { width: 2px; height: 16px; }
}

/* ==========================================================================
   Stats Cards
   ========================================================================== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.stat-box {
    background: var(--b2b-card);
    border-radius: 14px;
    padding: 22px;
    box-shadow: var(--b2b-shadow);
    border: 1px solid var(--b2b-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--b2b-shadow-lg);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

.stat-box.balance .stat-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.stat-box.licenses .stat-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stat-box.used .stat-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-number {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-box.balance .stat-number {
    color: var(--b2b-primary);
}

.stat-box.licenses .stat-number {
    color: var(--b2b-success);
}

.stat-box.used .stat-number {
    color: var(--b2b-warning);
}

.stat-text {
    font-size: 14px;
    color: var(--b2b-text-muted);
    font-weight: 500;
}

/* ==========================================================================
   Action Cards
   ========================================================================== */
.grid-2col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.action-card {
    background: var(--b2b-card);
    border-radius: 14px;
    padding: 24px;
    box-shadow: var(--b2b-shadow);
    border: 1px solid var(--b2b-border);
}

.action-card:hover {
    box-shadow: var(--b2b-shadow-lg);
}

.card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--b2b-text);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title svg {
    width: 20px;
    height: 20px;
    fill: var(--b2b-primary);
}

/* ==========================================================================
   Form Elements
   ========================================================================== */
.form-field {
    margin-bottom: 16px;
}

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--b2b-text-muted);
    margin-bottom: 6px;
}

.field-input,
.field-select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--b2b-border);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    background: var(--b2b-card);
    color: var(--b2b-text);
}

.field-input:focus,
.field-select:focus {
    outline: none;
    border-color: var(--b2b-primary);
    box-shadow: 0 0 0 3px var(--b2b-step-active-bg);
}

/* ==========================================================================
   Buttons - Visíveis em qualquer tema (override Elementor/Hello)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    min-height: 44px;
    border: 2px solid transparent !important;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    color: #ffffff !important;
    background-color: var(--b2b-primary) !important;
    -webkit-appearance: none;
    appearance: none;
}

.btn:focus {
    outline: 2px solid var(--b2b-primary);
    outline-offset: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    background-color: var(--b2b-primary) !important;
    color: #ffffff !important;
    border-color: #4f46e5 !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%) !important;
    background-color: var(--b2b-primary-dark) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    background-color: var(--b2b-success) !important;
    color: #ffffff !important;
    border-color: #059669 !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    background-color: var(--b2b-success-dark) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    background-color: var(--b2b-danger) !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
}

.btn-full {
    width: 100%;
}

.price-hint {
    font-size: 12px;
    color: var(--b2b-text-muted);
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--b2b-bg-alt);
    border-radius: 8px;
    border-left: 3px solid var(--b2b-primary);
}

/* ==========================================================================
   Full Width Cards
   ========================================================================== */
.full-card {
    background: var(--b2b-card);
    border-radius: 14px;
    padding: 28px;
    box-shadow: var(--b2b-shadow);
    border: 1px solid var(--b2b-border);
    margin-bottom: 24px;
}

.grid-4col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

/* ==========================================================================
   Data Tables
   ========================================================================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.data-table thead {
    background: var(--b2b-bg-alt);
    border-radius: 8px;
}

.data-table th {
    padding: 12px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--b2b-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 14px;
    border-top: 1px solid var(--b2b-border);
    font-size: 13px;
    color: var(--b2b-text);
}

.data-table tr:hover {
    background: var(--b2b-card-hover);
}

.data-table tbody tr:nth-child(even) {
    background: var(--b2b-bg-alt);
}

.data-table tbody tr:nth-child(even):hover {
    background: var(--b2b-card-hover);
}

/* Empty state */
.b2b-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--b2b-text-muted);
}

.b2b-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.b2b-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--b2b-text-muted);
    margin-bottom: 8px;
}

.b2b-empty-desc {
    font-size: 14px;
    color: var(--b2b-text-muted);
}

/* Price table collapsible */
.price-toggle {
    font-size: 12px;
    color: var(--b2b-primary);
    cursor: pointer;
    font-weight: 600;
    margin-top: 8px;
    display: inline-block;
}

.price-toggle:hover {
    text-decoration: underline;
}

.price-table-expand {
    margin-top: 12px;
    padding: 12px;
    background: var(--b2b-bg-alt);
    border-radius: 8px;
    font-size: 12px;
    color: var(--b2b-text-muted);
    border-left: 3px solid var(--b2b-primary);
    display: none;
}

.price-table-expand table {
    width: 100%;
    border-collapse: collapse;
}

.price-table-expand th,
.price-table-expand td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--b2b-border);
}

.price-table-expand th {
    font-weight: 600;
    color: var(--b2b-text);
}

.price-table-expand tr:nth-child(even) {
    background: var(--b2b-bg);
}

.price-table-expand.is-open {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ==========================================================================
   Badges
   ========================================================================== */
.badge {
    display: inline-block;
    padding: 5px 11px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
}

.badge-active {
    background: var(--b2b-badge-active-bg);
    color: var(--b2b-badge-active-color);
}

.badge-suspended {
    background: var(--b2b-badge-suspended-bg);
    color: var(--b2b-badge-suspended-color);
}

.badge-pending {
    background: var(--b2b-badge-pending-bg);
    color: var(--b2b-badge-pending-color);
}

.badge-approved {
    background: var(--b2b-badge-active-bg);
    color: var(--b2b-badge-active-color);
}

/* ==========================================================================
   Links
   ========================================================================== */
.link-action {
    color: var(--b2b-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: color 0.3s;
}

.link-action:hover {
    color: var(--b2b-primary-hover);
}

.link-danger {
    color: var(--b2b-danger);
}

.link-danger:hover {
    color: var(--b2b-danger);
}

.link-success {
    color: var(--b2b-success);
}

.link-success:hover {
    color: var(--b2b-success-dark);
}

.link-primary {
    color: var(--b2b-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: color 0.3s;
}

.link-primary:hover {
    color: var(--b2b-primary-hover);
}

.b2b-copy-btn {
    margin-left: 8px;
    padding: 6px 14px;
    background: var(--b2b-primary);
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--b2b-transition);
}

.b2b-copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--b2b-shadow-lg);
}

.btn.b2b-loading {
    opacity: 0.85;
    cursor: not-allowed;
}

/* ==========================================================================
   Alerts
   ========================================================================== */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: var(--b2b-alert-success-bg);
    color: var(--b2b-alert-success-color);
    border-left: 4px solid var(--b2b-success);
}

.alert-error {
    background: var(--b2b-alert-error-bg);
    color: var(--b2b-alert-error-color);
    border-left: 4px solid var(--b2b-danger);
}

.alert-warning {
    background: var(--b2b-notice-bg);
    color: var(--b2b-notice-title);
    border-left: 4px solid var(--b2b-warning);
}

/* ==========================================================================
   Modal
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--b2b-modal-backdrop);
    backdrop-filter: blur(3px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-box {
    background: #fff;
    padding: 32px;
    border-radius: 18px;
    max-width: 450px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: slideUp 0.3s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--b2b-text-muted);
    cursor: pointer;
    transition: color 0.3s;
    padding: 4px 8px;
}

.modal-close:hover {
    color: var(--b2b-text);
}

.modal-header {
    font-size: 20px;
    font-weight: 700;
    color: var(--b2b-text);
    margin-bottom: 20px;
}

.qr-area {
    text-align: center;
    margin: 16px 0;
}

.qr-area img {
    max-width: 280px;
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qr-text {
    background: var(--b2b-bg-alt);
    padding: 12px;
    border-radius: 8px;
    word-break: break-all;
    font-size: 11px;
    font-family: monospace;
    margin: 16px 0;
    border: 1.5px dashed var(--b2b-border);
    max-height: 80px;
    overflow-y: auto;
}

.amount-info {
    font-size: 15px;
    color: var(--b2b-text-muted);
    margin: 16px 0;
    text-align: center;
}

.amount-info strong {
    font-size: 22px;
    color: var(--b2b-primary);
    display: block;
    margin-top: 4px;
}

.license-code {
    background: var(--b2b-bg-alt);
    padding: 5px 9px;
    border-radius: 6px;
    font-size: 12px;
    font-family: monospace;
    color: var(--b2b-text);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 968px) {
    .grid-2col {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .grid-4col {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 480px) {
    .grid-2col {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .action-card {
        padding: 18px;
    }

    .full-card {
        padding: 18px;
    }
}

@media (max-width: 640px) {
    .stats-row {
        grid-template-columns: 1fr;
    }

    .dash-container {
        padding: 16px;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }

    .modal-box {
        padding: 24px;
    }

    .qr-area img {
        max-width: 240px;
    }

    .header-top {
        flex-direction: column;
        align-items: stretch;
    }

    .user-section {
        width: 100%;
        justify-content: space-between;
    }

    .btn-logout {
        width: 100%;
        margin-top: 8px;
    }

    .top-header {
        padding: 16px;
    }

    .login-container {
        padding: 40px 30px;
    }

    .login-container h1 {
        font-size: 24px;
    }

    .subtitle {
        font-size: 14px;
    }

    /* Botões responsivos em mobile */
    .btn,
    .btn-primary,
    .btn-success,
    .btn-danger {
        padding: 14px 20px;
        min-height: 48px;
        font-size: 15px;
    }

    .btn-full {
        width: 100%;
    }

    .grid-2col .action-card form .btn-full,
    .full-card form .btn,
    .full-card form .btn-full {
        width: 100%;
    }

    .modal-box .btn,
    .modal-box .btn-full {
        flex: 1;
        min-width: 0;
    }

    .modal-box div[style*="display:flex"] {
        flex-direction: column;
    }

    .modal-box div[style*="display:flex"] .btn {
        width: 100%;
    }
}

/* ==========================================================================
   Shortcode Specific Styles (for embedded login)
   ========================================================================== */
.b2b-login-shortcode {
    max-width: 420px;
    margin: 50px auto;
    padding: 50px 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.b2b-login-shortcode .logo-section {
    text-align: center;
    margin-bottom: 35px;
}

.b2b-login-shortcode .logo-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.b2b-login-shortcode h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.b2b-login-shortcode h2 span {
    background: linear-gradient(135deg, #667eea, #764ba2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.b2b-login-shortcode .form-field {
    margin-bottom: 22px;
}

.b2b-login-shortcode .field-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
}

.b2b-login-shortcode .field-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
}

.b2b-login-shortcode .btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}