/* ============================================
   ERP Varejo Inteligente - Estilos Gerais
   ============================================ */

:root {
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --border-radius: 4px;
    --transition: all 0.3s ease;

    /* Paleta visual SaaS/ERP */
    --brand-blue-900: #0f2f5f;
    --brand-blue-800: #16437e;
    --brand-blue-700: #1d5fa7;
    --brand-blue-600: #2563eb;
    --brand-blue-100: #dbeafe;
    --brand-blue-50: #eff6ff;
    --brand-gray-50: #f8fafc;
    --brand-gray-100: #f1f5f9;
    --brand-gray-200: #e2e8f0;
    --brand-gray-300: #cbd5e1;
    --brand-text: #0f172a;
    --brand-muted: #64748b;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius-lg: 4px;
    --radius-md: 4px;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
}

/* ============================================
   LOGIN PAGE
   ============================================ */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 10px;
}

.login-header p {
    color: var(--gray-500);
    font-size: 14px;
}

.login-form {
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 14px;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
}

.product-image-preview {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 10px;
    background: #f9fafb;
}

.image-preview {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px dashed var(--gray-300);
    border-radius: var(--border-radius);
    color: var(--gray-500);
    padding: 10px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-group.checkbox {
    display: flex;
    align-items: center;
}

.form-group.checkbox input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.form-group.checkbox label {
    margin-bottom: 0;
    display: inline;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-dark);
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background-color: #059669;
}

.btn-warning {
    background-color: var(--warning);
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background-color: #d97706;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background-color: #dc2626;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* ============================================
   LAYOUT - DASHBOARD
   ============================================ */

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

.sidebar {
    width: 260px;
    background-color: var(--gray-800);
    color: white;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 20px;
    color: var(--primary-light);
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li > a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.sidebar-nav li > a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-nav .nav-section {
    margin-top: 15px;
}

.sidebar-nav .nav-section > span {
    display: block;
    padding: 8px 20px;
    font-size: 12px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sidebar-nav .nav-section ul {
    margin-top: 8px;
}

.sidebar-nav .nav-section ul li a {
    padding-left: 40px;
    font-size: 14px;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.header {
    background-color: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.toggle-sidebar {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--gray-700);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logout-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--gray-700);
}

.content-area {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* ============================================
   CARDS & GRIDS
   ============================================ */

.card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--gray-100);
    padding-bottom: 15px;
}

.card-header h2 {
    font-size: 18px;
    color: var(--gray-900);
}

.card-body {
    padding: 15px 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

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

/* ============================================
   TABELAS - PADRÃO MODERNO DO ERP
   ============================================ */

.table-panel {
    background: var(--surface);
    border: 1px solid var(--brand-gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    margin-top: 16px;
    margin-bottom: 24px;
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--brand-blue-50), #ffffff);
    border-bottom: 1px solid var(--brand-gray-200);
}

.table-search-wrap {
    position: relative;
    flex: 1;
    max-width: 480px;
}

.table-search-wrap i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--brand-muted);
    font-size: 14px;
}

.table-search {
    width: 100%;
    height: 42px;
    padding: 10px 14px 10px 38px;
    border: 1px solid var(--brand-gray-300);
    border-radius: var(--radius-md);
    background: #ffffff;
    color: var(--brand-text);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.table-search:focus {
    border-color: var(--brand-blue-600);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.table-counter {
    white-space: nowrap;
    font-size: 13px;
    color: var(--brand-muted);
    font-weight: 600;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    color: var(--brand-text);
    background: #ffffff;
}

.table thead {
    background: var(--brand-blue-900);
}

.table th {
    padding: 13px 14px;
    text-align: left;
    font-weight: 700;
    color: #ffffff;
    border-bottom: 1px solid var(--brand-blue-800);
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--brand-gray-200);
    border-right: 1px solid var(--brand-gray-200);
    vertical-align: middle;
}

.table td:last-child,
.table th:last-child {
    border-right: none;
}

.table tbody tr:nth-child(odd) {
    background-color: var(--brand-blue-50);
}

.table tbody tr:nth-child(even) {
    background-color: var(--brand-gray-100);
}

.table tbody tr:hover {
    background-color: #bfdbfe;
    box-shadow: inset 4px 0 0 var(--brand-blue-600);
}

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

.table-empty-message {
    padding: 18px;
    color: var(--brand-muted);
    text-align: center;
    font-weight: 600;
    background: #ffffff;
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.table-actions .btn {
    padding: 7px 12px;
    font-size: 12px;
    border-radius: 9px;
}

/* ============================================
   FORMULÁRIOS - PADRÃO MODERNO DO ERP
   ============================================ */

.form-grid {
    background: #ffffff;
    border: 1px solid var(--brand-gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 22px;
}

.form-group label {
    color: var(--brand-text);
    font-weight: 700;
    margin-bottom: 7px;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    min-height: 42px;
    border: 1px solid var(--brand-gray-300);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
    color: var(--brand-text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--brand-blue-600);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--brand-gray-200);
}

.btn-secondary {
    background-color: var(--brand-gray-200);
    color: var(--brand-text);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--brand-gray-300);
}

/* ============================================
   MODAL
   ============================================ */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal.hidden {
    display: none !important;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    max-width: 720px;
    width: 100%;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    padding: 24px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-500);
}

.modal-close:hover {
    color: var(--gray-700);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.form-grid .full-width {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    padding: 12px 16px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    display: flex;
    gap: 12px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.16);
    white-space: pre-line;
}

.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    width: min(420px, calc(100vw - 40px));
    pointer-events: none;
}

.alert-container .alert {
    pointer-events: auto;
}

.alert-success {
    background-color: #d1fae5;
    border-left: 4px solid var(--success);
    color: #065f46;
}

.alert-error {
    background-color: #fee2e2;
    border-left: 4px solid var(--danger);
    color: #7f1d1d;
}

.alert-warning {
    background-color: #fef3c7;
    border-left: 4px solid var(--warning);
    color: #78350f;
}

.alert-info {
    background-color: #dbeafe;
    border-left: 4px solid var(--primary);
    color: #1e3a8a;
}

/* ============================================
   RESPONSIVO
   ============================================ */

@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }

    .grid,
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .table {
        font-size: 12px;
    }

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

    .login-box {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        position: fixed;
        left: -260px;
        height: 100vh;
        z-index: 999;
        transition: left 0.3s ease;
    }

    .sidebar.active {
        left: 0;
    }

    .content-area {
        padding: 15px;
    }
}

/* =====================================================
   VENDAS PDV
   ===================================================== */
.page-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}

.text-muted {
    color: #64748b;
    margin-top: 4px;
}

.text-center {
    text-align: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
}

.status-finalizado {
    background: #dcfce7;
    color: #166534;
}

.status-cancelado {
    background: #fee2e2;
    color: #991b1b;
}

.status-rascunho {
    background: #e0f2fe;
    color: #075985;
}

.sale-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
    margin: 14px 0 18px;
}

.sale-totals {
    margin: 16px 0;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.sale-totals p {
    display: flex;
    justify-content: space-between;
    margin: 6px 0;
}

.sale-totals .total {
    border-top: 1px solid #cbd5e1;
    padding-top: 10px;
    font-size: 18px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

@media (max-width: 768px) {
    .page-header,
    .sale-detail-grid {
        display: block;
    }

    .page-header .btn {
        margin-top: 12px;
    }
}


/* =====================================================
   BOTÕES DE AÇÃO COM ÍCONES - PADRÃO ERP
   ===================================================== */
.table-actions {
    align-items: center;
}

.action-icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .18s ease;
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(15, 23, 42, .10);
}

.action-icon-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(.96);
}

.action-icon-btn i {
    font-size: 14px;
}

.action-view {
    background: #1e40af;
}

.action-edit {
    background: #f59e0b;
}

.action-delete,
.action-cancel {
    background: #ef4444;
}

.action-disabled {
    background: #cbd5e1;
    color: #64748b;
    cursor: not-allowed;
    box-shadow: none;
}

.sale-row-cancelled td {
    background: #fff1f2 !important;
    color: #7f1d1d;
}

.sale-row-cancelled:hover td {
    background: #ffe4e6 !important;
}

/* =====================================================
   ALTERAÇÃO DE VENDA PDV - FORMULÁRIOS E CAMPOS MODERNOS
   ===================================================== */
.sale-edit-client-box,
.sale-edit-add-product {
    position: relative;
    margin-bottom: 18px;
}

.sale-edit-client-box label,
.sale-edit-add-product label {
    display: block;
    margin-bottom: 7px;
    color: var(--brand-text);
    font-weight: 700;
    font-size: 13px;
}

.form-control,
.sale-edit-search-row input,
#editSaleClientSearch,
#editSaleProductSearch,
#editSaleDiscount,
.payment-line select,
.payment-line input,
.edit-sale-table input {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--brand-gray-300);
    border-radius: 10px;
    background: #ffffff;
    color: var(--brand-text);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.form-control:focus,
.sale-edit-search-row input:focus,
#editSaleClientSearch:focus,
#editSaleProductSearch:focus,
#editSaleDiscount:focus,
.payment-line select:focus,
.payment-line input:focus,
.edit-sale-table input:focus {
    border-color: var(--brand-blue-600);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.sale-edit-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 54px;
    gap: 8px;
    align-items: center;
}

.sale-edit-search-row .btn {
    height: 42px;
    min-width: 54px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.edit-sale-suggestions {
    display: none;
    position: absolute;
    z-index: 1100;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--brand-gray-200);
    border-radius: 12px;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.16);
    overflow: hidden;
    max-height: 260px;
    overflow-y: auto;
}

.edit-sale-suggestions.show,
.edit-sale-suggestions:not(:empty) {
    display: block;
}

.product-suggestion-item {
    width: 100%;
    border: none;
    background: #ffffff;
    padding: 11px 13px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    cursor: pointer;
    color: var(--brand-text);
    border-bottom: 1px solid var(--brand-gray-200);
}

.product-suggestion-item:hover {
    background: var(--brand-blue-50);
}

.product-suggestion-item strong {
    display: block;
    font-weight: 800;
}

.product-suggestion-item small {
    display: block;
    color: var(--brand-muted);
    margin-top: 2px;
}

.edit-sale-table .qty-input {
    max-width: 110px;
}

.sale-totals {
    background: #ffffff;
    border: 1px solid var(--brand-gray-200);
    border-radius: 14px;
    padding: 16px;
    margin: 16px 0 20px;
}

.sale-totals p {
    align-items: center;
    gap: 14px;
}

.sale-totals .compact-money {
    max-width: 180px;
    text-align: right;
}

#editSalePayments {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.payment-line {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(120px, 1fr) 42px;
    gap: 8px;
    align-items: center;
}

.payment-line .payment-amount-input {
    text-align: right;
}

.btn-add-payment-edit {
    margin-bottom: 12px;
}

.payment-totals {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    background: var(--brand-blue-50);
    border: 1px solid var(--brand-gray-200);
    border-radius: 12px;
    padding: 12px 14px;
    margin-top: 10px;
}

.payment-totals span {
    color: var(--brand-text);
}

@media (max-width: 720px) {
    .payment-line {
        grid-template-columns: 1fr;
    }

    .sale-edit-search-row {
        grid-template-columns: 1fr 48px;
    }
}

/* =====================================================
   VENDAS PDV - FILTROS, PAGINAÇÃO E RELATÓRIOS
   ===================================================== */
.page-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.pdv-sales-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 14px;
    margin: 18px 0;
}

.summary-card {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
    display: flex;
    flex-direction: column-reverse;
    gap: 6px;
}

.summary-card small {
    display: block;
    color: #64748b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.summary-card strong {
    color: #163b70;
    font-size: 20px;
    line-height: 1.2;
}

.summary-card-danger strong {
    color: #b91c1c;
}

.pdv-sales-filter-panel {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 12px;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 160px;
}

.filter-field-search {
    flex: 1 1 280px;
}

.filter-field span {
    color: #1e40af;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.filter-field input,
.filter-field select {
    height: 42px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 0 12px;
    background: #f8fafc;
    color: #0f172a;
    outline: none;
}

.filter-field input:focus,
.filter-field select:focus {
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
    background: #ffffff;
}

.period-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.period-btn {
    height: 42px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1e40af;
    padding: 0 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s ease;
}

.period-btn:hover,
.period-btn.active {
    background: #1e40af;
    color: #ffffff;
    border-color: #1e40af;
}

.table-meta-row,
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0;
    color: #475569;
}

.pagination-bar {
    justify-content: flex-end;
}

.pagination-bar .btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

@media (max-width: 1100px) {
    .pdv-sales-summary-grid {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }
}

@media (max-width: 700px) {
    .page-header-actions,
    .filter-row,
    .table-meta-row,
    .pagination-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .pdv-sales-summary-grid {
        grid-template-columns: 1fr;
    }

    .period-buttons,
    .period-btn,
    .filter-field,
    .filter-field-search {
        width: 100%;
    }
}

/* =====================================================
   Vendas e Orçamentos fora do PDV
   ===================================================== */
.commercial-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.commercial-filter-card { margin: 14px 0 18px; padding: 14px; }
.commercial-filter-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr .8fr auto; gap: 12px; align-items: end; }
.commercial-filter-grid .form-group { margin-bottom: 0; }
.filter-buttons { display: flex; align-items: end; }
.commercial-form .form-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.autocomplete-wrap { position: relative; }
.commercial-add-row { position: relative; display: flex; gap: 10px; margin: 10px 0 16px; }
.commercial-add-row input { flex: 1; }
.commercial-totals { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 12px; align-items: center; background: #f8fafc; border: 1px solid #dbe6f5; border-radius: 12px; padding: 14px; margin: 14px 0; }
.commercial-totals input { width: 100%; }
.commercial-payment-line { display: grid; grid-template-columns: 1.4fr 1fr .7fr 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.pagination-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; }
.row-cancelled { background: #fee2e2 !important; color: #991b1b; }
.status-orcamento { background: #fef3c7; color: #92400e; }
.status-aprovado { background: #dbeafe; color: #1d4ed8; }
.status-finalizado { background: #dcfce7; color: #166534; }
.status-cancelado { background: #fee2e2; color: #991b1b; }
.muted-text { color: #64748b; }
@media (max-width: 980px) {
  .commercial-filter-grid, .commercial-totals, .commercial-payment-line { grid-template-columns: 1fr; }
  .commercial-add-row { flex-direction: column; }
}
.product-suggestions {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 62px;
    z-index: 9999;
    background: #fff;
    border: 1px solid #d9e0ea;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.14);
    max-height: 320px;
    overflow-y: auto;
}

.product-suggestions.show {
    display: block;
}

.product-suggestion-item {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #edf0f5;
    background: #fff;
    padding: 12px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    font-size: 14px;
}

.product-suggestion-item:last-child {
    border-bottom: 0;
}

.product-suggestion-item:hover,
.product-suggestion-item.selected {
    background: #f2f6ff;
}

.product-suggestion-item strong {
    display: block;
    color: #12213f;
    font-size: 14px;
    margin-bottom: 3px;
}

.product-suggestion-item small {
    color: #64748b;
    font-size: 12px;
}

.product-suggestion-item.disabled {
    opacity: 0.55;
}

.suggestion-price {
    color: #153da9;
    font-weight: 700;
    white-space: nowrap;
}

/* =====================================================
   Correção visual - Vendas/Orçamentos
   ===================================================== */
.commercial-form {
    background: transparent;
}

.commercial-form .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px 20px;
    background: #ffffff;
    border: 1px solid #dbe6f5;
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 20px;
}

.commercial-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0;
}

.commercial-form .form-group label,
.commercial-add-row .form-group label,
.commercial-payment-line .form-group label,
.commercial-total-box label {
    font-size: 13px;
    font-weight: 700;
    color: #0f2f5f;
}

.commercial-form input,
.commercial-form select,
.commercial-form textarea,
.commercial-add-row input,
.commercial-payment-line input,
.commercial-payment-line select,
.commercial-total-box input {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #cbd8ea;
    border-radius: 10px;
    background: #ffffff;
    color: #0f172a;
    font-size: 14px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.commercial-form input:focus,
.commercial-form select:focus,
.commercial-form textarea:focus,
.commercial-add-row input:focus,
.commercial-payment-line input:focus,
.commercial-payment-line select:focus,
.commercial-total-box input:focus {
    border-color: #2448b8;
    box-shadow: 0 0 0 3px rgba(36, 72, 184, .14);
    background: #fbfdff;
}

.commercial-add-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 110px 170px auto;
    gap: 12px;
    align-items: end;
    background: #ffffff;
    border: 1px solid #dbe6f5;
    border-radius: 14px;
    padding: 16px;
    margin: 10px 0 16px;
}

.commercial-add-row .form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0;
}

.commercial-add-btn {
    min-height: 42px;
    padding-inline: 22px;
}

.commercial-totals {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 14px;
    align-items: stretch;
    background: #f8fbff;
    border: 1px solid #dbe6f5;
    border-radius: 14px;
    padding: 16px;
    margin: 16px 0 22px;
}

.commercial-total-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
}

.commercial-total-box span {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.commercial-total-box strong {
    color: #0f2f5f;
    font-size: 18px;
}

.commercial-total-final strong {
    font-size: 22px;
    color: #1438a6;
}

.commercial-payment-line {
    display: grid;
    grid-template-columns: 1.3fr 1fr .7fr 1fr 44px;
    gap: 10px;
    align-items: end;
    background: #ffffff;
    border: 1px solid #dbe6f5;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 10px;
}

.commercial-payment-line .form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0;
}

.commercial-remove-payment {
    width: 42px;
    height: 42px;
    align-self: end;
}

@media (max-width: 980px) {
    .commercial-add-row,
    .commercial-payment-line,
    .commercial-totals {
        grid-template-columns: 1fr;
    }

    .commercial-add-btn,
    .commercial-remove-payment {
        width: 100%;
    }
}


/* =====================================================
   Vendas/Orçamentos V17 - autocomplete e formulário refinado
   ===================================================== */
.commercial-form .form-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(180px, 1fr)) !important;
    gap: 18px 20px !important;
    align-items: end !important;
}

.commercial-form .autocomplete-wrap {
    position: relative !important;
}

.commercial-add-row {
    display: grid !important;
    grid-template-columns: minmax(320px, 1.6fr) 120px 190px 110px !important;
    gap: 12px !important;
    align-items: end !important;
    background: #ffffff !important;
    border: 1px solid #dbe6f5 !important;
    border-radius: 14px !important;
    padding: 16px !important;
    margin: 10px 0 16px !important;
}

.commercial-add-row .form-group,
.commercial-payment-line .form-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
    margin: 0 !important;
}

.commercial-add-row input,
.commercial-add-row select,
.commercial-payment-line input,
.commercial-payment-line select,
.commercial-form input,
.commercial-form select {
    width: 100% !important;
    min-height: 42px !important;
    padding: 10px 12px !important;
    border: 1px solid #cbd8ea !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #0f172a !important;
    font-size: 14px !important;
}

.commercial-add-btn {
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 14px !important;
    align-self: end !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.commercial-payment-line {
    display: grid !important;
    grid-template-columns: 1.25fr 1fr .8fr 1fr 44px !important;
    gap: 10px !important;
    align-items: end !important;
    background: #fff !important;
    border: 1px solid #dbe6f5 !important;
    border-radius: 14px !important;
    padding: 14px !important;
    margin-bottom: 10px !important;
}

.commercial-remove-payment {
    width: 42px !important;
    height: 42px !important;
    align-self: end !important;
}

.product-suggestions,
.client-suggestions,
.commercial-suggestions {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 99999;
    background: #fff;
    border: 1px solid #d9e0ea;
    border-radius: 10px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16);
    max-height: 320px;
    overflow-y: auto;
}

.product-suggestions.show,
.client-suggestions.show,
.commercial-suggestions.show {
    display: block;
}

.product-suggestion-item .suggestion-meta,
.client-suggestion-item .suggestion-meta {
    color: #64748b;
    font-size: 12px;
    margin-top: 2px;
}

.client-suggestion-item {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #edf0f5;
    background: #fff;
    padding: 12px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
}

.client-suggestion-item:hover,
.client-suggestion-item.selected {
    background: #f2f6ff;
}

@media (max-width: 1100px) {
    .commercial-form .form-grid,
    .commercial-add-row,
    .commercial-payment-line {
        grid-template-columns: 1fr !important;
    }

    .commercial-add-btn,
    .commercial-remove-payment {
        width: 100% !important;
    }
}

/* =====================================================
   Vendas/Orçamentos V18 - pagamentos em container e tabela sem busca interna
   ===================================================== */
.commercial-items-table + .table-search-wrap,
.commercial-items-table ~ .table-search-wrap {
    display: none !important;
}

.commercial-payment-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    margin-top: 20px !important;
    margin-bottom: 12px !important;
}

.commercial-payment-header h3 {
    margin: 0 0 4px !important;
}

.commercial-payments-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-bottom: 18px !important;
}

.commercial-payment-empty {
    padding: 18px !important;
    border: 1px dashed #cbd8ea !important;
    border-radius: 14px !important;
    background: #f8fafc !important;
    color: #64748b !important;
    font-size: 14px !important;
}

.commercial-payment-card {
    background: #ffffff !important;
    border: 1px solid #dbe6f5 !important;
    border-radius: 16px !important;
    padding: 16px !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06) !important;
}

.commercial-payment-card-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 12px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #e5edf7 !important;
    color: #15396d !important;
}

.commercial-payment-grid {
    display: grid !important;
    grid-template-columns: 1.25fr .9fr .9fr .7fr 1fr 1.6fr !important;
    gap: 12px !important;
    align-items: end !important;
}

.commercial-payment-grid .form-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
    margin: 0 !important;
}

.commercial-payment-grid label {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #0f2f66 !important;
}

.commercial-payment-grid input,
.commercial-payment-grid select {
    width: 100% !important;
    min-height: 42px !important;
    padding: 10px 12px !important;
    border: 1px solid #cbd8ea !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #0f172a !important;
    font-size: 14px !important;
}

.commercial-payment-grid input:focus,
.commercial-payment-grid select:focus {
    outline: none !important;
    border-color: #2447c6 !important;
    box-shadow: 0 0 0 3px rgba(36, 71, 198, 0.12) !important;
}

.commercial-payment-note {
    min-width: 220px !important;
}

@media (max-width: 1280px) {
    .commercial-payment-grid {
        grid-template-columns: repeat(3, minmax(180px, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    .commercial-payment-header {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .commercial-payment-grid {
        grid-template-columns: 1fr !important;
    }
}

/* =====================================================
   Vendas/Orçamentos V19 - pagamento visível, desconto R$/% e parcelas
   ===================================================== */
.commercial-form .table-search-wrap {
    display: none !important;
}

.commercial-totals-enhanced {
    grid-template-columns: minmax(180px, 1fr) minmax(320px, 1.3fr) minmax(180px, 1fr) !important;
}

.commercial-discount-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    width: 100% !important;
}

.commercial-input-prefix {
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
}

.commercial-input-prefix span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 44px !important;
    padding: 0 10px !important;
    background: #2447c6 !important;
    color: #ffffff !important;
    border: 1px solid #2447c6 !important;
    border-radius: 10px 0 0 10px !important;
    font-weight: 800 !important;
}

.commercial-input-prefix input {
    border-radius: 0 10px 10px 0 !important;
    min-height: 44px !important;
}

.commercial-payment-header {
    background: #ffffff !important;
    border: 1px solid #dbe6f5 !important;
    border-radius: 16px !important;
    padding: 16px !important;
}

.commercial-payments-container {
    background: #f8fafc !important;
    border: 1px solid #dbe6f5 !important;
    border-radius: 16px !important;
    padding: 14px !important;
}

.commercial-payment-card {
    margin-bottom: 12px !important;
}

.commercial-payment-card:last-child {
    margin-bottom: 0 !important;
}

.commercial-payment-grid {
    grid-template-columns: 1.25fr .85fr .85fr .7fr 1fr 1.4fr !important;
}

.commercial-installments-preview {
    display: grid !important;
    grid-template-columns: repeat(4, auto) !important;
    gap: 8px 12px !important;
    align-items: center !important;
    margin-top: 12px !important;
    padding: 12px !important;
    background: #eef6ff !important;
    border: 1px solid #cfe1f8 !important;
    border-radius: 12px !important;
    color: #0f2f66 !important;
    font-size: 13px !important;
}

.commercial-installments-preview span,
.commercial-installments-preview small {
    color: #526781 !important;
    font-weight: 700 !important;
}

.commercial-installments-list {
    grid-template-columns: .7fr 1fr 1fr !important;
}

.commercial-installments-list small {
    grid-column: 1 / -1 !important;
    margin-bottom: 4px !important;
}

@media (max-width: 1024px) {
    .commercial-totals-enhanced,
    .commercial-payment-grid {
        grid-template-columns: 1fr !important;
    }

    .commercial-discount-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Vendas/Orçamentos - usa o mesmo padrão visual do dashboard de Vendas PDV. */
.commercial-sales-summary-grid {
    grid-template-columns: repeat(6, minmax(140px, 1fr));
}

.commercial-sales-filter-panel {
    margin-top: 8px;
}

@media (max-width: 1280px) {
    .commercial-sales-summary-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }
}

@media (max-width: 700px) {
    .commercial-sales-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Clientes - filtros comerciais e resumo de crédito */
.module-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.module-subtitle {
    margin: 4px 0 0;
    color: #526480;
}
.clients-summary-grid {
    margin-bottom: 18px;
}
.clients-filter-panel {
    margin-bottom: 18px;
}
.clients-filter-panel .filter-actions {
    display: flex;
    align-items: end;
    gap: 8px;
}
.text-danger { color: #b91c1c !important; }
@media (max-width: 768px) {
    .module-header-row { flex-direction: column; }
    .clients-filter-panel .filter-actions { align-items: stretch; flex-direction: column; }
}

/* =====================================================
   CLIENTES - CORRECAO VISUAL DA POLITICA DE CREDITO V23
   Mantem o padrao visual usado em Vendas PDV: cards,
   filtros, botoes e tabela com boa leitura.
   ===================================================== */
.clients-summary-grid .summary-card {
    min-height: 88px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.clients-summary-grid .summary-card span,
.clients-summary-grid .summary-card small {
    display: block;
    color: #526480;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    line-height: 1.2;
}

.clients-summary-grid .summary-card strong {
    display: block;
    color: #163b70;
    font-size: 21px;
    line-height: 1.2;
    white-space: nowrap;
}

.clients-summary-grid .summary-card .text-danger,
.clients-summary-grid .summary-card strong.text-danger {
    color: #b91c1c !important;
}

.clients-filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 160px 230px auto;
    gap: 14px;
    align-items: end;
    padding: 16px !important;
    background: #ffffff !important;
    border: 1px solid #dbeafe !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .05) !important;
}

.clients-filter-panel .filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.clients-filter-panel .filter-group label {
    color: #1e40af;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin: 0;
}

.clients-filter-panel .filter-grow {
    min-width: 260px;
}

.clients-filter-panel input,
.clients-filter-panel select {
    width: 100%;
    height: 42px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 0 12px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 14px;
    outline: none;
    transition: all .18s ease;
}

.clients-filter-panel input:focus,
.clients-filter-panel select:focus {
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
    background: #ffffff;
}

.clients-filter-panel .filter-actions {
    display: flex !important;
    align-items: end !important;
    gap: 8px !important;
    flex-wrap: nowrap;
}

.clients-filter-panel .filter-actions .btn {
    height: 42px;
    border-radius: 10px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .clients-filter-panel {
        grid-template-columns: 1fr 1fr;
    }
    .clients-filter-panel .filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 680px) {
    .clients-summary-grid {
        grid-template-columns: 1fr !important;
    }
    .clients-filter-panel {
        grid-template-columns: 1fr;
    }
    .clients-filter-panel .filter-actions {
        flex-direction: column;
        align-items: stretch !important;
    }
    .clients-filter-panel .filter-actions .btn {
        width: 100%;
    }
}

/* =====================================================
   CLIENTES - PAGINACAO E VISUALIZACAO V24
   ===================================================== */
.clients-filter-panel-v24 {
    grid-template-columns: minmax(260px, 1fr) 160px 230px 160px auto !important;
}

.clients-table tbody tr.client-click-row {
    cursor: pointer;
    transition: background .18s ease, transform .12s ease, box-shadow .12s ease;
}

.clients-table tbody tr.client-click-row:hover {
    background: #dbeafe !important;
    box-shadow: inset 4px 0 0 #1e40af;
}

.clients-pagination-bar {
    justify-content: space-between !important;
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    padding: 12px;
}

.client-detail-page .page-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.client-detail-card {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
    padding: 18px;
    margin-bottom: 16px;
}

.client-detail-card h2 {
    margin: 0 0 14px;
    color: #0f2f5f;
    font-size: 18px;
}

.client-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}

.client-detail-grid > div {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
}

.client-detail-grid span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: 5px;
}

.client-detail-grid strong {
    display: block;
    color: #0f172a;
    font-size: 15px;
    word-break: break-word;
}

.status-badge.credit-success {
    background: #dcfce7;
    color: #166534;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
}

.status-badge.credit-warning {
    background: #fef3c7;
    color: #92400e;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
}

.status-badge.credit-danger {
    background: #fee2e2;
    color: #991b1b;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
}

@media (max-width: 1180px) {
    .clients-filter-panel-v24 {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 680px) {
    .clients-filter-panel-v24 {
        grid-template-columns: 1fr !important;
    }
    .client-detail-page .page-header-actions,
    .clients-pagination-bar {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Clientes V25 - visual de desativação lógica */
.clients-table .client-click-row {
    cursor: pointer;
}
.clients-table .client-click-row:hover td {
    background: #dbeafe !important;
}
.clients-table .client-inactive-row td {
    opacity: 0.72;
    background: #f3f4f6 !important;
}
.action-icon-btn.action-disabled {
    background: #cbd5e1;
    color: #64748b;
    cursor: not-allowed;
    opacity: .75;
}


/* Ação positiva em tabelas: ativar cliente, confirmar registro etc. */
.action-success {
    background: #10b981 !important;
    color: #ffffff !important;
}
.action-success:hover {
    background: #059669 !important;
}
.client-click-row {
    cursor: pointer;
}

/* V27 - ações de relatório na tela de clientes */
.clients-export-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.clients-export-actions .btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}


/* =====================================================
   V32 - Módulo Caixa
   ===================================================== */
.module-header.cash-module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.cash-module-header h1 { margin-bottom: 4px; }
.cash-module-header p { color: #64748b; margin: 0; }
.cash-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
    white-space: nowrap;
}
.cash-status-badge.cash-open { background: #dcfce7; color: #166534; }
.cash-status-badge.cash-closed { background: #fee2e2; color: #991b1b; }
.cash-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
    gap: 18px;
    margin-bottom: 18px;
}
.cash-open-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    line-height: 1.7;
    margin-bottom: 14px;
}
.cash-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.cash-summary-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.cash-summary-list > div,
.cash-report-summary > div {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
}
.cash-summary-list span,
.cash-report-summary span {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}
.cash-summary-list strong,
.cash-report-summary strong {
    color: #0f172a;
    font-size: 16px;
}
.cash-filter-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr)) auto;
    align-items: end;
    gap: 12px;
    margin-bottom: 18px;
}
.cash-report-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}
.cash-table th,
.cash-table td {
    white-space: nowrap;
}
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
}
.status-badge.status-active { background: #dcfce7; color: #166534; }
.status-badge.status-inactive { background: #e2e8f0; color: #334155; }
@media (max-width: 1100px) {
    .cash-grid,
    .cash-filter-form { grid-template-columns: 1fr; }
    .cash-report-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =====================================================
   V33 - Correção responsiva do módulo Caixa
   ===================================================== */
.layout {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}
.sidebar {
    flex: 0 0 260px;
    min-width: 260px;
    max-width: 260px;
}
.main-content {
    min-width: 0;
    overflow-x: hidden;
}
.content-area,
#contentContainer {
    min-width: 0;
    max-width: 100%;
}
.cash-report-card,
.cash-summary-card,
.cash-action-card {
    min-width: 0;
}
.cash-report-card .card-body,
#cashReportResult {
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
}
.cash-table {
    min-width: 980px;
}
.cash-report-summary {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
@media (max-width: 900px) {
    .sidebar {
        flex-basis: 240px;
        min-width: 240px;
        max-width: 240px;
    }
}

/* V34 - Importação de clientes por CSV */
.import-client-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    gap: 20px;
    margin-top: 18px;
}

.import-client-card,
.import-result-card,
.loading-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.import-client-card h3,
.import-result-card h3 {
    margin: 0 0 12px;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.client-import-form label {
    display: block;
    font-weight: 700;
    color: #334155;
    margin-bottom: 7px;
}

.client-import-form input[type="file"],
.client-import-form select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 11px 12px;
    background: #fff;
}

.client-import-form small {
    display: block;
    color: #64748b;
    margin-top: 6px;
}

.import-actions-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.import-client-help ul {
    margin: 10px 0 14px 18px;
    color: #475569;
}

.import-warning {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    padding: 12px;
    border-radius: 12px;
}

.client-import-result {
    margin-top: 20px;
}

.import-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.import-preview-table td,
.import-preview-table th {
    white-space: nowrap;
}

.success-note {
    color: #15803d;
    font-weight: 700;
}

.alert.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 14px;
    border-radius: 12px;
}

@media (max-width: 900px) {
    .import-client-grid,
    .import-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   DASHBOARD EXECUTIVO V35
   ============================================ */
.executive-dashboard {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 100%;
}

.dashboard-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    background: linear-gradient(135deg, #0f2f5f 0%, #1d4ed8 58%, #2563eb 100%);
    color: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 38px rgba(15, 47, 95, 0.22);
}

.dashboard-hero h1 {
    font-size: 26px;
    margin: 4px 0 2px;
    color: #fff;
}

.dashboard-hero p {
    margin: 0;
    color: rgba(255,255,255,.82);
    font-size: 14px;
}

.dashboard-eyebrow {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 800;
    color: #bfdbfe;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(150px, 1fr));
    gap: 14px;
}

.dashboard-kpi-card,
.dashboard-panel {
    background: #fff;
    border: 1px solid var(--brand-gray-200);
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.dashboard-kpi-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    min-height: 92px;
}

.dashboard-kpi-card span {
    display: block;
    color: var(--brand-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.dashboard-kpi-card strong {
    display: block;
    color: var(--brand-text);
    font-size: 20px;
    line-height: 1.2;
    margin-top: 4px;
    white-space: nowrap;
}

.kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    flex-shrink: 0;
}

.tone-success .kpi-icon { background: #10b981; }
.tone-primary .kpi-icon { background: #2563eb; }
.tone-info .kpi-icon { background: #0ea5e9; }
.tone-purple .kpi-icon { background: #7c3aed; }
.tone-warning .kpi-icon { background: #f59e0b; }
.tone-danger .kpi-icon { background: #ef4444; }

.dashboard-financial-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-panel {
    padding: 18px;
    overflow: hidden;
}

.panel-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.panel-title-row span {
    display: block;
    color: var(--brand-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 800;
}

.panel-title-row h2 {
    font-size: 17px;
    color: var(--brand-text);
    margin: 2px 0 0;
}

.panel-title-row > i {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--brand-blue-50);
    color: var(--brand-blue-600);
    display: grid;
    place-items: center;
}

.finance-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.finance-cards div {
    background: var(--brand-gray-50);
    border: 1px solid var(--brand-gray-200);
    border-radius: 14px;
    padding: 14px;
    min-height: 82px;
}

.finance-cards small,
.cash-dashboard-box small,
.compact-list-item small,
.top-product-item small {
    display: block;
    color: var(--brand-muted);
    font-size: 12px;
    font-weight: 700;
}

.finance-cards strong {
    display: block;
    margin-top: 6px;
    font-size: 18px;
    color: var(--brand-text);
}

.text-success { color: #059669 !important; }
.text-danger { color: #dc2626 !important; }

.dashboard-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 16px;
}

.cashflow-chart {
    display: flex;
    flex-direction: column;
    gap: 11px;
    min-height: 230px;
}

.cashflow-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 110px;
    align-items: center;
    gap: 12px;
    font-size: 12px;
}

.cashflow-row > span {
    color: var(--brand-muted);
    font-weight: 700;
}

.cashflow-row > strong {
    font-size: 12px;
    text-align: right;
    color: var(--brand-text);
}

.cashflow-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cashflow-bars i {
    display: block;
    height: 7px;
    border-radius: 999px;
    min-width: 3px;
}

.bar-income, .legend-income { background: #22c55e; }
.bar-expense, .legend-expense { background: #f43f5e; }
.bar-balance, .legend-balance { background: #315c85; }

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 14px;
    color: var(--brand-muted);
    font-size: 12px;
    font-weight: 700;
}

.chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.chart-legend i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.sales-bars-chart {
    display: flex;
    align-items: end;
    gap: 10px;
    height: 250px;
    padding-top: 8px;
}

.sales-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 24px;
}

.sales-bar-track {
    width: 100%;
    height: 205px;
    display: flex;
    align-items: end;
    background: linear-gradient(180deg, var(--brand-gray-50), #fff);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--brand-gray-200);
}

.sales-bar-track i {
    display: block;
    width: 100%;
    background: linear-gradient(180deg, #60a5fa, #22c55e);
    border-radius: 12px 12px 0 0;
    min-height: 4px;
}

.sales-bar-item span {
    font-size: 11px;
    color: var(--brand-muted);
    font-weight: 700;
}

.dashboard-operations-grid {
    display: grid;
    grid-template-columns: .75fr 1fr 1fr;
    gap: 16px;
}

.cash-dashboard-box {
    display: grid;
    gap: 10px;
}

.cash-dashboard-box div,
.compact-list-item,
.top-product-item {
    border: 1px solid var(--brand-gray-200);
    background: var(--brand-gray-50);
    border-radius: 13px;
    padding: 12px;
}

.cash-dashboard-box strong {
    display: block;
    color: var(--brand-text);
    font-size: 15px;
    margin-top: 3px;
}

.compact-list,
.top-products-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compact-list-item,
.top-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.compact-list-item strong,
.top-product-item strong {
    color: var(--brand-text);
    font-size: 13px;
}

.compact-list-item span,
.top-product-item b {
    white-space: nowrap;
    color: var(--brand-blue-700);
    font-weight: 800;
    font-size: 13px;
}

.top-product-item > span {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--brand-blue-900);
    color: #fff;
    font-weight: 900;
    flex-shrink: 0;
}

.top-product-item > div {
    flex: 1;
}

.dashboard-empty {
    color: var(--brand-muted);
    font-size: 13px;
    margin: 0;
    padding: 14px;
    border: 1px dashed var(--brand-gray-300);
    border-radius: 12px;
    background: var(--brand-gray-50);
}

@media (max-width: 1280px) {
    .dashboard-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dashboard-operations-grid { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
    .dashboard-main-grid,
    .dashboard-financial-grid { grid-template-columns: 1fr; }
    .finance-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .dashboard-hero { flex-direction: column; align-items: flex-start; }
    .dashboard-kpi-grid { grid-template-columns: 1fr; }
    .finance-cards { grid-template-columns: 1fr; }
    .cashflow-row { grid-template-columns: 44px 1fr; }
    .cashflow-row > strong { grid-column: 2; text-align: left; }
    .sales-bars-chart { overflow-x: auto; }
    .sales-bar-item { min-width: 38px; }
}

/* =====================================================
   V36 - PADRAO VISUAL ERP PREMIUM
   Paleta azul claro, tipografia menor e tabelas corporativas
   Aplicado ao dashboard, clientes, produtos, vendas e tabelas gerais.
   ===================================================== */
:root {
    --premium-bg: #f5f8fc;
    --premium-surface: #ffffff;
    --premium-surface-soft: #f8fbff;
    --premium-line: #dfe8f4;
    --premium-line-soft: #edf2f8;
    --premium-text: #243247;
    --premium-muted: #6f7f95;
    --premium-blue: #6B4AF0;
    --premium-blue-soft: #e8f2ff;
    --premium-blue-soft-2: #f2f7ff;
    --premium-sidebar: #5B3FD6;
    --premium-shadow: 0 6px 18px rgba(34, 52, 78, .055);
    --premium-radius: 12px;
}

html, body {
    background: var(--premium-bg) !important;
    color: var(--premium-text) !important;
    font-size: 13px !important;
}

/* Layout principal */
.sidebar {
    width: 250px !important;
    min-width: 250px !important;
    background: var(--premium-sidebar) !important;
    box-shadow: none !important;
    height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-bottom: 40px !important;
}
.sidebar-header {
    padding: 18px 20px !important;
    border-bottom: 1px solid rgba(255,255,255,.07) !important;
}
.sidebar-header h2 {
    color: #d9e9ff !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    letter-spacing: -.02em !important;
}
.sidebar-nav { padding: 12px 0 20px !important; }
.sidebar-nav li > a {
    min-height: 38px !important;
    padding: 9px 18px !important;
    gap: 10px !important;
    color: rgba(255, 255, 255, .92) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    border-left: 3px solid transparent !important;
}
.sidebar-nav li > a i {
    width: 16px !important;
    font-size: 13px !important;
    color: rgba(255,255,255,.92) !important;
}
.sidebar-nav li > a:hover,
.sidebar-nav li > a.active {
    background: rgba(255,255,255,.14) !important;
    color: #ffffff !important;
    border-left-color: rgba(255,255,255,.65) !important;
}
.sidebar-nav .nav-section { margin-top: 10px !important; }
.sidebar-nav .nav-section > span {
    padding: 7px 20px !important;
    color: rgba(235, 244, 255, .45) !important;
    font-size: 10px !important;
    letter-spacing: .08em !important;
}
.sidebar-nav .nav-section ul { margin-top: 3px !important; }
.sidebar-nav .nav-section ul li a {
    padding-left: 36px !important;
    font-size: 12.5px !important;
}

.header {
    height: 58px !important;
    padding: 0 20px !important;
    background: rgba(255,255,255,.92) !important;
    border-bottom: 1px solid var(--premium-line) !important;
    box-shadow: 0 2px 12px rgba(34,52,78,.035) !important;
}
.toggle-sidebar,
.logout-btn {
    color: #52647c !important;
    font-size: 17px !important;
}
.user-profile span { font-size: 13px !important; color: var(--premium-text) !important; }
.content-area { padding: 18px !important; }

/* Cabeçalhos de módulos */
.module-header,
.module-header-row,
.cash-module-header {
    padding: 14px 2px 16px !important;
    margin-bottom: 12px !important;
    border-bottom: 1px solid var(--premium-line-soft) !important;
}
.module-header h1,
.module-header-row h1,
.cash-module-header h1 {
    font-size: 20px !important;
    color: var(--premium-text) !important;
    font-weight: 700 !important;
    letter-spacing: -.03em !important;
}
.module-header p,
.module-subtitle,
.cash-module-header p {
    color: var(--premium-muted) !important;
    font-size: 12.5px !important;
    margin-top: 3px !important;
}

/* Cards padrão */
.card,
.dashboard-panel,
.dashboard-kpi-card,
.table-panel,
.clients-filter-panel,
.cash-action-card,
.cash-summary-card,
.cash-report-card {
    background: var(--premium-surface) !important;
    border: 1px solid var(--premium-line) !important;
    border-radius: var(--premium-radius) !important;
    box-shadow: var(--premium-shadow) !important;
}
.card { padding: 16px !important; margin-bottom: 16px !important; }
.card-header {
    margin-bottom: 12px !important;
    padding-bottom: 11px !important;
    border-bottom: 1px solid var(--premium-line-soft) !important;
}
.card-header h2,
.card-header h3 {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--premium-text) !important;
}
.card-body { padding: 10px 0 !important; }

/* Botões mais discretos */
.btn {
    min-height: 34px !important;
    padding: 8px 14px !important;
    border-radius: 9px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}
.btn-primary {
    background: #3f7fc8 !important;
    color: #fff !important;
}
.btn-primary:hover:not(:disabled) { background: #346fae !important; }
.btn-secondary {
    background: #eef4fb !important;
    color: #325777 !important;
    border: 1px solid #d8e5f2 !important;
}
.btn-success { background: #5f9f89 !important; }
.btn-warning { background: #c9994e !important; }
.btn-danger { background: #c96a6a !important; }

/* Inputs e filtros */
.form-group label,
.filter-group label,
.clients-filter-panel .filter-group label {
    color: #52647c !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: .01em !important;
}
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="file"],
.form-group input[type="date"],
.form-group select,
.form-group textarea,
.clients-filter-panel input,
.clients-filter-panel select,
.cash-filter-form input,
.cash-filter-form select,
.form-control {
    min-height: 36px !important;
    height: 36px !important;
    border: 1px solid #d5dfec !important;
    border-radius: 9px !important;
    background: #fff !important;
    color: var(--premium-text) !important;
    font-size: 12.5px !important;
    padding: 7px 10px !important;
}
.form-group textarea { height: auto !important; min-height: 82px !important; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.clients-filter-panel input:focus,
.clients-filter-panel select:focus,
.form-control:focus {
    border-color: #82acd9 !important;
    box-shadow: 0 0 0 3px rgba(63,127,200,.10) !important;
    outline: none !important;
}

/* Dashboard premium */
.executive-dashboard {
    gap: 14px !important;
}
.dashboard-hero {
    padding: 14px 16px !important;
    background: #ffffff !important;
    color: var(--premium-text) !important;
    border: 1px solid var(--premium-line) !important;
    border-radius: var(--premium-radius) !important;
    box-shadow: var(--premium-shadow) !important;
}
.dashboard-hero h1 {
    color: var(--premium-text) !important;
    font-size: 20px !important;
    line-height: 1.2 !important;
}
.dashboard-hero p {
    color: var(--premium-muted) !important;
    font-size: 12.5px !important;
}
.dashboard-eyebrow {
    color: #4f7faf !important;
    font-size: 10.5px !important;
    letter-spacing: .10em !important;
}
.dashboard-kpi-grid {
    grid-template-columns: repeat(6, minmax(135px, 1fr)) !important;
    gap: 10px !important;
}
.dashboard-kpi-card {
    min-height: 72px !important;
    padding: 12px !important;
    gap: 10px !important;
}
.dashboard-kpi-card span {
    font-size: 10.5px !important;
    color: var(--premium-muted) !important;
    font-weight: 700 !important;
    letter-spacing: .035em !important;
}
.dashboard-kpi-card strong {
    font-size: 16px !important;
    color: var(--premium-text) !important;
    margin-top: 2px !important;
}
.kpi-icon {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    color: #346fae !important;
    background: var(--premium-blue-soft) !important;
}
.tone-success .kpi-icon,
.tone-primary .kpi-icon,
.tone-info .kpi-icon,
.tone-purple .kpi-icon,
.tone-warning .kpi-icon,
.tone-danger .kpi-icon {
    background: var(--premium-blue-soft) !important;
    color: #346fae !important;
}
.dashboard-financial-grid,
.dashboard-main-grid,
.dashboard-operations-grid { gap: 12px !important; }
.dashboard-panel { padding: 14px !important; }
.panel-title-row { margin-bottom: 12px !important; }
.panel-title-row span {
    font-size: 10.5px !important;
    color: var(--premium-muted) !important;
}
.panel-title-row h2 {
    font-size: 14px !important;
    color: var(--premium-text) !important;
}
.panel-title-row > i {
    width: 30px !important;
    height: 30px !important;
    border-radius: 9px !important;
    background: var(--premium-blue-soft-2) !important;
    color: #4c83bd !important;
}
.finance-cards { gap: 9px !important; }
.finance-cards div {
    min-height: 64px !important;
    padding: 10px !important;
    border-radius: 10px !important;
    background: var(--premium-surface-soft) !important;
}
.finance-cards small,
.cash-dashboard-box small,
.compact-list-item small,
.top-product-item small {
    font-size: 10.8px !important;
    color: var(--premium-muted) !important;
}
.finance-cards strong {
    font-size: 14px !important;
    margin-top: 3px !important;
    color: var(--premium-text) !important;
}
.text-success { color: #4d8b78 !important; }
.text-danger { color: #b35f5f !important; }
.cashflow-chart { gap: 8px !important; min-height: 188px !important; }
.cashflow-row { font-size: 11.5px !important; grid-template-columns: 48px minmax(0,1fr) 96px !important; }
.cashflow-bars i { height: 5px !important; opacity: .72 !important; }
.bar-income, .legend-income { background: #78a996 !important; }
.bar-expense, .legend-expense { background: #c98686 !important; }
.bar-balance, .legend-balance { background: #6c92bd !important; }
.sales-bars-chart { height: 210px !important; gap: 8px !important; }
.sales-bar-track {
    height: 170px !important;
    background: #f7fafd !important;
    border-radius: 9px !important;
}
.sales-bar-track i {
    background: linear-gradient(180deg, #8bb7e3, #4e86bf) !important;
    opacity: .84 !important;
}
.sales-bar-item span { font-size: 10.5px !important; color: var(--premium-muted) !important; }
.cash-dashboard-box div,
.compact-list-item,
.top-product-item {
    padding: 9px 10px !important;
    border-radius: 10px !important;
    background: var(--premium-surface-soft) !important;
}
.compact-list, .top-products-grid { gap: 8px !important; }
.compact-list-item strong,
.top-product-item strong { font-size: 12.5px !important; }
.compact-list-item span,
.top-product-item b { color: #4f7faf !important; font-size: 12px !important; }
.top-product-item > span {
    width: 26px !important;
    height: 26px !important;
    border-radius: 8px !important;
    background: var(--premium-blue-soft) !important;
    color: #346fae !important;
    font-size: 12px !important;
}
.dashboard-empty {
    font-size: 12px !important;
    padding: 10px !important;
    background: var(--premium-surface-soft) !important;
}

/* Tabelas premium: clientes, produtos, vendas, caixa e demais listagens */
.table-panel {
    margin-top: 12px !important;
    margin-bottom: 18px !important;
    overflow: hidden !important;
}
.table-toolbar {
    padding: 10px 12px !important;
    background: #fff !important;
    border-bottom: 1px solid var(--premium-line-soft) !important;
}
.table-search-wrap { max-width: 390px !important; }
.table-search-wrap i { font-size: 12px !important; color: #7b8ca3 !important; }
.table-search {
    height: 34px !important;
    padding: 7px 10px 7px 32px !important;
    font-size: 12.5px !important;
    border-radius: 9px !important;
    border-color: #d5dfec !important;
}
.table-search:focus { border-color: #82acd9 !important; box-shadow: 0 0 0 3px rgba(63,127,200,.10) !important; }
.table-counter { font-size: 11.5px !important; color: var(--premium-muted) !important; font-weight: 600 !important; }
.table {
    font-size: 12.5px !important;
    color: var(--premium-text) !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}
.table thead { background: #f2f7ff !important; }
.table th {
    padding: 10px 12px !important;
    color: #475b76 !important;
    background: #f2f7ff !important;
    border-bottom: 1px solid var(--premium-line) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: .025em !important;
}
.table td {
    padding: 9px 12px !important;
    border-bottom: 1px solid var(--premium-line-soft) !important;
    border-right: none !important;
    font-size: 12.5px !important;
    vertical-align: middle !important;
}
.table tbody tr:hover { background: #f8fbff !important; }
.table tbody tr:last-child td { border-bottom: none !important; }
.table .btn,
.table-actions .btn,
td .btn {
    min-height: 28px !important;
    padding: 5px 9px !important;
    font-size: 11.5px !important;
    border-radius: 7px !important;
}
.status-badge,
.badge {
    border-radius: 999px !important;
    padding: 4px 8px !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
}
.status-active { background: #eaf7f1 !important; color: #4d8b78 !important; }
.status-inactive { background: #f8ecec !important; color: #a46161 !important; }

/* Resumos, filtros e cards das páginas de listagem */
.summary-grid,
.clients-summary-grid,
.commercial-sales-summary-grid,
.pdv-sales-summary-grid,
.cash-report-summary,
.cash-summary-list {
    gap: 10px !important;
}
.summary-card,
.clients-summary-grid .summary-card,
.cash-report-summary div,
.cash-summary-list div {
    min-height: 66px !important;
    padding: 11px !important;
    border: 1px solid var(--premium-line) !important;
    border-radius: 11px !important;
    background: #fff !important;
    box-shadow: var(--premium-shadow) !important;
}
.summary-card span,
.summary-card small,
.clients-summary-grid .summary-card span,
.clients-summary-grid .summary-card small,
.cash-report-summary span,
.cash-summary-list span {
    color: var(--premium-muted) !important;
    font-size: 10.8px !important;
    font-weight: 700 !important;
}
.summary-card strong,
.clients-summary-grid .summary-card strong,
.cash-report-summary strong,
.cash-summary-list strong {
    color: var(--premium-text) !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
}
.clients-filter-panel,
.commercial-filter-card,
.sales-filter-panel,
.pdv-sales-filter-panel,
.cash-filter-form {
    padding: 12px !important;
    background: #fff !important;
    border: 1px solid var(--premium-line) !important;
    border-radius: var(--premium-radius) !important;
    box-shadow: var(--premium-shadow) !important;
}

/* Caixa */
.cash-grid { gap: 12px !important; }
.cash-status-badge {
    padding: 7px 11px !important;
    border-radius: 999px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
}
.cash-open { background: #eaf7f1 !important; color: #4d8b78 !important; }
.cash-closed { background: #f8ecec !important; color: #a46161 !important; }
.cash-open-box {
    background: #f8fbff !important;
    border: 1px solid var(--premium-line) !important;
    border-radius: 10px !important;
    padding: 11px !important;
    font-size: 12.5px !important;
}
.cash-action-buttons { gap: 8px !important; }

@media (max-width: 1280px) {
    .dashboard-kpi-grid { grid-template-columns: repeat(3, minmax(0,1fr)) !important; }
}
@media (max-width: 900px) {
    .sidebar { width: 230px !important; min-width: 230px !important; }
    .content-area { padding: 14px !important; }
}
@media (max-width: 640px) {
    .dashboard-kpi-grid { grid-template-columns: 1fr !important; }
    .table-toolbar { flex-direction: column !important; align-items: stretch !important; }
    .table-search-wrap { max-width: none !important; }
}

/* =====================================================
   V37 - Ficha premium de visualização do cliente
   PADRÃO DE CÓDIGO/UX: seguir este modelo em futuras telas de visualização
   (fornecedores, produtos, vendas, compras e financeiro): layout clean,
   baixa saturação, tipografia compacta, hierarquia por seções e accordions.
   ===================================================== */
.client-profile-page {
    --profile-bg: #f5f8fc;
    --profile-card: #ffffff;
    --profile-border: #d9e3f1;
    --profile-border-soft: #e7edf6;
    --profile-text: #1f2d3d;
    --profile-muted: #6b7a90;
    --profile-blue: #2f6fed;
    --profile-blue-soft: #eaf2ff;
    --profile-success-bg: #dff7e8;
    --profile-success-text: #18733f;
    --profile-warning-bg: #fff4d6;
    --profile-warning-text: #7a5300;
    --profile-danger-bg: #ffe7e7;
    --profile-danger-text: #c92a2a;
    color: var(--profile-text);
    font-size: 13px;
}

.client-profile-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.client-profile-toolbar h1 {
    margin: 0 0 4px;
    font-size: 18px;
    line-height: 1.25;
    color: #1f2937;
    font-weight: 700;
}

.client-profile-toolbar p {
    margin: 0;
    color: var(--profile-muted);
    font-size: 12.5px;
}

.client-profile-card,
.client-profile-section {
    background: var(--profile-card);
    border: 1px solid var(--profile-border);
    border-radius: 5px;
    box-shadow: 0 8px 24px rgba(31, 45, 61, .035);
}

.client-profile-card {
    padding: 16px 18px;
    margin-bottom: 12px;
}

.client-profile-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
}

.client-profile-identity h2 {
    margin: 0 0 7px;
    font-size: 14px;
    color: #3f4650;
    font-weight: 700;
    letter-spacing: .01em;
    text-transform: uppercase;
}

.client-profile-identity span {
    color: #111827;
    font-size: 12.5px;
}

.client-profile-finance-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(110px, auto)) auto;
    align-items: center;
    gap: 18px;
    text-align: right;
}

.client-profile-finance-strip span,
.profile-info-item span,
.client-profile-section-grid span {
    display: block;
    color: #59697f;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
}

.client-profile-finance-strip strong {
    display: block;
    margin-top: 2px;
    font-size: 18px;
    line-height: 1.1;
    color: var(--profile-blue);
    font-weight: 700;
}

.client-profile-finance-strip strong.danger,
.client-profile-money-grid strong.danger {
    color: var(--profile-danger-text);
}

.client-profile-status {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: 24px;
    border-radius: 4px;
    padding: 0 10px;
    font-size: 11px !important;
    font-weight: 700;
    white-space: nowrap;
}

.client-profile-status.success {
    background: var(--profile-success-bg);
    color: var(--profile-success-text);
}

.client-profile-status.warning {
    background: var(--profile-warning-bg);
    color: var(--profile-warning-text);
}

.client-profile-status.danger {
    background: var(--profile-danger-bg);
    color: var(--profile-danger-text);
}

.client-profile-divider {
    height: 1px;
    background: var(--profile-border);
    margin: 14px 0;
}

.client-profile-main-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 20px 28px;
}

.profile-info-item strong {
    display: block;
    margin-top: 6px;
    color: #374151;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.35;
    word-break: break-word;
}

.profile-info-address {
    grid-column: span 2;
}

.client-role-chip,
.client-active-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    padding: 2px 7px;
    font-style: normal;
    font-size: 10.5px;
    font-weight: 700;
}

.client-role-chip,
.client-active-chip.active {
    background: var(--profile-success-bg);
    color: var(--profile-success-text);
}

.client-active-chip.inactive {
    background: #eef2f7;
    color: #617085;
}

.client-map-link {
    margin-top: 18px;
}

.btn-link-soft {
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--profile-blue);
    padding: 0;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.btn-link-soft:disabled {
    color: #9aa8ba;
    cursor: not-allowed;
}

.client-profile-section {
    margin-bottom: 12px;
    overflow: hidden;
}

.client-profile-section summary {
    list-style: none;
    cursor: pointer;
    padding: 13px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #2b3542;
    font-size: 13.5px;
    font-weight: 600;
    border-bottom: 1px solid var(--profile-border-soft);
    background: #ffffff;
}

.client-profile-section summary::-webkit-details-marker {
    display: none;
}

.client-profile-section summary i {
    color: #6b7a90;
    font-size: 11px;
    transition: transform .18s ease;
}

.client-profile-section[open] summary i {
    transform: rotate(180deg);
}

.client-profile-section-grid {
    padding: 17px 16px 18px;
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 22px 28px;
}

.client-profile-section-grid strong {
    display: block;
    margin-top: 6px;
    color: #374151;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.35;
    word-break: break-word;
}

.client-profile-money-grid strong {
    font-size: 14px;
    font-weight: 700;
    color: #243247;
}

.section-grid-full {
    grid-column: 1 / -1;
}

.client-profile-footer-actions {
    position: sticky;
    bottom: 0;
    z-index: 4;
    margin-top: 12px;
    padding: 12px 4px 0;
    background: linear-gradient(180deg, rgba(245, 248, 252, 0), var(--profile-bg) 28%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.client-profile-footer-actions > div {
    display: flex;
    gap: 8px;
}

.client-profile-page .btn {
    min-height: 34px;
    font-size: 12px;
    border-radius: 5px;
}

@media (max-width: 1180px) {
    .client-profile-header,
    .client-profile-toolbar,
    .client-profile-footer-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .client-profile-finance-strip {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
        text-align: left;
    }

    .client-profile-main-grid,
    .client-profile-section-grid {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }
}

@media (max-width: 680px) {
    .client-profile-main-grid,
    .client-profile-section-grid,
    .client-profile-finance-strip {
        grid-template-columns: 1fr;
    }

    .profile-info-address,
    .section-grid-full {
        grid-column: auto;
    }

    .client-profile-footer-actions > div {
        flex-direction: column;
    }
}

/* =====================================================
   V38 - PADRÃO PREMIUM PARA ÍCONES DE AÇÃO EM TABELAS
   -----------------------------------------------------
   Observação de padrão visual do ERP:
   As ações em tabelas devem evitar cores saturadas e botões grandes.
   Use ícones discretos, fundo claro, borda suave e cor forte apenas no hover.
   Este padrão deve ser reutilizado em clientes, produtos, vendas, caixa,
   financeiro, categorias, marcas, fornecedores e demais listagens.
   ===================================================== */
.table-actions {
    gap: 6px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
}

.action-icon-btn,
.table .action-icon-btn,
td .action-icon-btn,
.table-actions .action-icon-btn {
    width: 31px !important;
    height: 31px !important;
    min-width: 31px !important;
    min-height: 31px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    border: 1px solid #d9e2ef !important;
    background: #f8fafc !important;
    color: #64748b !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease !important;
}

.action-icon-btn i,
.table .action-icon-btn i,
td .action-icon-btn i,
.table-actions .action-icon-btn i {
    font-size: 12.5px !important;
    line-height: 1 !important;
}

.action-icon-btn:hover:not(:disabled),
.table .action-icon-btn:hover:not(:disabled),
td .action-icon-btn:hover:not(:disabled),
.table-actions .action-icon-btn:hover:not(:disabled) {
    transform: translateY(-1px) !important;
    filter: none !important;
}

/* Visualizar */
.action-icon-btn.action-view:hover:not(:disabled),
.table .action-icon-btn.action-view:hover:not(:disabled) {
    background: #eef5ff !important;
    border-color: #bfd6f6 !important;
    color: #2f6fed !important;
}

/* Editar */
.action-icon-btn.action-edit:hover:not(:disabled),
.table .action-icon-btn.action-edit:hover:not(:disabled) {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
}

/* Ativar/confirmar */
.action-icon-btn.action-success,
.table .action-icon-btn.action-success {
    background: #f8fafc !important;
    border-color: #d9e2ef !important;
    color: #64748b !important;
}

.action-icon-btn.action-success:hover:not(:disabled),
.table .action-icon-btn.action-success:hover:not(:disabled) {
    background: #edf9f3 !important;
    border-color: #bfe8d2 !important;
    color: #23845d !important;
}

/* Desativar, excluir, cancelar e remover */
.action-icon-btn.action-delete,
.action-icon-btn.action-cancel,
.table .action-icon-btn.action-delete,
.table .action-icon-btn.action-cancel {
    background: #f8fafc !important;
    border-color: #d9e2ef !important;
    color: #64748b !important;
}

.action-icon-btn.action-delete:hover:not(:disabled),
.action-icon-btn.action-cancel:hover:not(:disabled),
.table .action-icon-btn.action-delete:hover:not(:disabled),
.table .action-icon-btn.action-cancel:hover:not(:disabled) {
    background: #fff1f2 !important;
    border-color: #fecdd3 !important;
    color: #be123c !important;
}

/* Desabilitado */
.action-icon-btn.action-disabled,
.action-icon-btn:disabled,
.table .action-icon-btn.action-disabled,
.table .action-icon-btn:disabled {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    opacity: .75 !important;
    transform: none !important;
}

/* Mantém a coluna de ações compacta em tabelas premium */
.table th:last-child,
.table td:last-child {
    white-space: nowrap !important;
}

/* =====================================================
   V39 - VISUALIZAÇÃO PREMIUM DE VENDAS
   -----------------------------------------------------
   PADRÃO DE CÓDIGO/UX: visualizações de registros devem seguir
   uma ficha técnica limpa, com baixa saturação, fontes menores,
   tabelas compactas e seções organizadas. Evitar alerts simples
   para dados importantes; usar modal/página de detalhes premium.
   ===================================================== */
.modal-content:has(.sale-view-page),
.sale-view-modal-content {
    max-width: min(1120px, calc(100vw - 42px));
    padding: 18px;
    border-radius: 8px;
    background: #f5f8fc;
}

.sale-view-page {
    --sale-view-blue: #2f6fed;
    --sale-view-border: #d9e3f1;
    --sale-view-muted: #6b7a90;
    font-size: 12.5px;
}

.sale-view-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.sale-view-header h2 {
    margin: 0 0 4px;
    color: #1f2937;
    font-size: 17px;
    line-height: 1.25;
    font-weight: 700;
}

.sale-view-header p {
    margin: 0;
    color: var(--sale-view-muted);
    font-size: 12px;
}

.sale-view-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.sale-view-header-actions .btn {
    min-height: 32px;
    border-radius: 5px;
    font-size: 12px;
}

.sale-view-summary-card {
    margin-bottom: 12px;
}

.sale-view-finance-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(118px, auto));
    align-items: center;
    gap: 18px;
    text-align: right;
}

.sale-view-finance-strip span {
    display: block;
    color: #59697f;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
}

.sale-view-finance-strip strong {
    display: block;
    margin-top: 3px;
    color: #243247;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.1;
}

.sale-view-main-grid {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.sale-view-section {
    margin-bottom: 10px;
}

.sale-view-table-wrap {
    padding: 12px 14px 14px;
    overflow-x: auto;
}

.sale-view-table {
    margin: 0;
    min-width: 760px;
    font-size: 12px;
}

.sale-view-table thead th {
    padding: 9px 10px !important;
    background: #f8fafc !important;
    color: #4b5d75 !important;
    border-bottom: 1px solid var(--sale-view-border) !important;
    font-size: 10.5px !important;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.sale-view-table tbody td {
    padding: 9px 10px !important;
    border-bottom: 1px solid #edf2f8 !important;
    color: #2f3a4a;
    vertical-align: middle;
}

.sale-view-table tbody tr:hover td {
    background: #f8fbff !important;
}

.sale-view-table strong {
    font-weight: 700;
    color: #1f2937;
}

.sale-view-money-grid {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
}

@media (max-width: 900px) {
    .sale-view-header,
    .client-profile-header {
        flex-direction: column;
        align-items: stretch;
    }

    .sale-view-finance-strip,
    .sale-view-main-grid,
    .sale-view-money-grid {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
        text-align: left;
    }
}

@media (max-width: 620px) {
    .sale-view-finance-strip,
    .sale-view-main-grid,
    .sale-view-money-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   Módulo Contas a Receber - padrão ERP premium
   ===================================================== */
.premium-module-header,
.module-header.premium-module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.premium-module-header h1 { font-size: 22px; margin: 0 0 4px; color: #102a56; }
.premium-module-header p { margin: 0; color: #667085; font-size: 13px; }
.module-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.receivable-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.receivable-kpi {
    background: #fff;
    border: 1px solid #e6edf5;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 8px 22px rgba(16, 42, 86, .04);
}
.receivable-kpi span { display: block; font-size: 12px; color: #667085; margin-bottom: 8px; }
.receivable-kpi strong { display: block; font-size: 21px; color: #102a56; letter-spacing: -.02em; }
.receivable-kpi small { display: block; color: #8a94a6; margin-top: 6px; font-size: 11px; }
.receivable-kpi.warning { border-left: 4px solid #f2b84b; }
.receivable-kpi.danger { border-left: 4px solid #df5b5b; }
.receivable-kpi.success { border-left: 4px solid #39a96b; }
.premium-table-card { border: 1px solid #e6edf5; border-radius: 16px; overflow: hidden; }
.compact-card-header { padding: 14px 18px; background: #f8fbff; }
.compact-card-header h3 { margin: 0; font-size: 15px; color: #102a56; }
.premium-filter-form {
    display: grid;
    grid-template-columns: 150px 170px 170px 1fr auto auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 16px;
}
.premium-filter-form label,
.premium-form-grid label { font-size: 11px; color: #667085; font-weight: 600; margin-bottom: 4px; }
.premium-data-table th { font-size: 11px; color: #334155; text-transform: uppercase; letter-spacing: .03em; background: #f8fbff; }
.premium-data-table td { font-size: 12px; vertical-align: middle; }
.actions-cell { white-space: nowrap; display: flex; gap: 6px; }
.btn-icon {
    width: 32px;
    height: 32px;
    border: 1px solid #d8e2ef;
    border-radius: 9px;
    background: #fff;
    color: #334155;
    cursor: pointer;
}
.btn-icon:hover { background: #eef5ff; color: #123a73; }
.status-badge.status-warning { background: #fff4d6; color: #8a5d00; }
.status-badge.status-danger { background: #fde2e2; color: #9f1d1d; }
.premium-modal-header { margin-bottom: 18px; }
.premium-modal-header h2 { margin: 0 0 4px; font-size: 20px; color: #102a56; }
.premium-modal-header p { margin: 0; font-size: 13px; color: #667085; }
.premium-form-grid,
.detail-grid.receivable-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.premium-form-grid .full,
.detail-grid .full { grid-column: 1 / -1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.detail-grid div {
    border: 1px solid #e6edf5;
    background: #fbfdff;
    border-radius: 12px;
    padding: 12px;
}
.detail-grid span { display: block; color: #667085; font-size: 11px; margin-bottom: 5px; }
.detail-grid strong { color: #102a56; font-size: 13px; }
@media (max-width: 980px) {
    .receivable-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .premium-filter-form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
    .premium-module-header { align-items: flex-start; flex-direction: column; }
    .receivable-kpi-grid,
    .premium-form-grid,
    .detail-grid.receivable-detail-grid { grid-template-columns: 1fr; }
    .premium-filter-form { grid-template-columns: 1fr; }
}

/* Recebimento detalhado - Contas a Receber */
.receivable-settlement-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.receivable-summary-box {
    border: 1px solid #dbe7f5;
    background: linear-gradient(180deg, #fbfdff, #f6f9fd);
    border-radius: 14px;
    padding: 14px;
}
.receivable-summary-box h3 {
    margin: 0 0 12px;
    font-size: 14px;
    color: #102a56;
}
.compact-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.compact-detail-grid div {
    border: 0;
    background: transparent;
    padding: 0;
}
.settlement-total {
    border: 1px solid #dbe7f5;
    background: #f8fbff;
    border-radius: 12px;
    padding: 10px 12px;
}
.settlement-total span,
.settlement-total small {
    display: block;
    color: #667085;
    font-size: 11px;
}
.settlement-total strong {
    display: block;
    color: #0f3f87;
    font-size: 20px;
    margin: 4px 0;
}
@media (max-width: 980px) {
    .receivable-settlement-form,
    .compact-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .receivable-settlement-form,
    .compact-detail-grid { grid-template-columns: 1fr; }
}

/* ============================================
   Identidade Visual - Nortex ERP
   ============================================ */
.brand-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.brand-logo {
    display: block;
    width: 178px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.sidebar-header {
    padding: 15px 18px;
    background: linear-gradient(180deg, rgba(15, 47, 95, 0.62), rgba(31, 41, 55, 0));
}

.login-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.login-brand-logo {
    width: 220px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Nortex ERP v49: logo branca exclusiva no menu lateral */
.sidebar-header .brand-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
}

.sidebar-header .brand-logo {
    max-width: 168px;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* =========================================================
   Dashboard premium charts - linhas e faturamento por período
   ========================================================= */
.dashboard-chart-title-row {
    align-items: flex-start !important;
    gap: 12px !important;
}

.dashboard-chart-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px;
    background: #f4f8fc;
    border: 1px solid #d9e5f2;
    border-radius: 999px;
}

.chart-period-btn {
    border: 0;
    background: transparent;
    color: #48617c;
    font-size: 10.5px;
    font-weight: 700;
    padding: 5px 9px;
    border-radius: 999px;
    cursor: pointer;
    transition: all .18s ease;
}

.chart-period-btn:hover,
.chart-period-btn.active {
    color: #ffffff;
    background: #315c85;
    box-shadow: 0 6px 14px rgba(49, 92, 133, .18);
}

.line-chart-shell,
.sales-revenue-chart-wrap {
    width: 100%;
    min-height: 218px;
}

.cashflow-line-chart,
.sales-revenue-chart {
    width: 100%;
    height: 230px;
    overflow: hidden;
}

.cashflow-line-chart svg,
.sales-revenue-chart svg {
    width: 100%;
    height: 100%;
    display: block;
}

.chart-grid-line {
    stroke: #e7eef6;
    stroke-width: 1;
}

.chart-axis-line {
    stroke: #cbd9e8;
    stroke-width: 1.2;
}

.chart-axis-value {
    fill: #5f748b;
    font-size: 10px;
    font-weight: 700;
}

.chart-axis-label {
    fill: #48617c;
    font-size: 10.5px;
    font-weight: 700;
}

.chart-line {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.chart-line-income { stroke: #78a996; }
.chart-line-expense { stroke: #c98686; }
.chart-line-balance { stroke: #6c92bd; }

.chart-dot {
    stroke: #ffffff;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.chart-dot-income { fill: #78a996; }
.chart-dot-expense { fill: #c98686; }
.chart-dot-balance { fill: #6c92bd; }

.sales-bar-bg {
    fill: #f7fafd;
    stroke: #d8e5f3;
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.sales-bar-fill {
    fill: #7faede;
    transition: all .18s ease;
}

.sales-bar-fill:hover {
    fill: #4e86bf;
}

.cashflow-panel .cashflow-chart,
.cashflow-panel .cashflow-row,
.cashflow-panel .cashflow-bars,
.sales-chart-panel .sales-bars-chart,
.sales-chart-panel .sales-bar-item,
.sales-chart-panel .sales-bar-track {
    all: unset;
}

@media (max-width: 900px) {
    .dashboard-chart-title-row {
        flex-direction: column;
    }
    .dashboard-chart-actions {
        width: 100%;
        justify-content: space-between;
    }
    .chart-period-btn {
        flex: 1;
    }
}

/* =========================================================
   Dashboard - fluxo de caixa em colunas + saldo em linha
   ========================================================= */
.panel-subtitle {
    display: block;
    margin-top: 3px;
    color: #7a8fa6;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
}

.cashflow-combo-chart {
    width: 100%;
    height: 240px;
    min-height: 220px;
    overflow: hidden;
}

.cashflow-combo-chart svg {
    width: 100%;
    height: 100%;
    display: block;
}

.chart-zero-line {
    stroke: #b9cadd;
    stroke-width: 1.2;
    stroke-dasharray: 4 5;
    vector-effect: non-scaling-stroke;
}

.cashflow-bar {
    transition: opacity .18s ease, filter .18s ease;
    vector-effect: non-scaling-stroke;
}

.cashflow-bar:hover {
    opacity: .86;
    filter: drop-shadow(0 5px 7px rgba(36, 63, 92, .13));
}

.cashflow-bar-income { fill: #78a996; }
.cashflow-bar-expense { fill: #c98686; }
.cashflow-bar-balance { fill: #6f95c5; }
.cashflow-balance-line { stroke-width: 2.8; }

.cashflow-panel .chart-legend {
    margin-top: 8px;
}

/* =====================================================
   Módulo Fiscal - Importação de XML NF-e
   Mantém a estética premium: baixo contraste, cards limpos e leitura objetiva.
   ===================================================== */
.xml-import-card,
.xml-preview-card {
    margin-bottom: 18px;
}

.xml-import-form .form-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 260px;
    gap: 16px;
}

.xml-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0;
}

.xml-summary-grid.two-cols {
    grid-template-columns: 1.2fr 1fr;
}

.xml-summary-grid > div {
    border: 1px solid #e8eef6;
    border-radius: 14px;
    padding: 12px 14px;
    background: #fbfdff;
}

.xml-summary-grid span {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #6b7f99;
    letter-spacing: .03em;
    margin-bottom: 4px;
}

.xml-summary-grid strong {
    display: block;
    color: #183b63;
    font-size: 13px;
    word-break: break-word;
}

.xml-summary-grid small {
    display: block;
    color: #71849d;
    margin-top: 3px;
}

.status-badge.warning {
    background: #fff7df;
    color: #8a6500;
}

.status-badge.danger {
    background: #fdecec;
    color: #9d2d2d;
}

.xml-import-success {
    margin-top: 16px;
}

@media (max-width: 900px) {
    .xml-import-form .form-grid,
    .xml-summary-grid,
    .xml-summary-grid.two-cols {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   Importação XML NF-e - conferência de unidade/estoque
   Mantém a leitura fiscal original e deixa explícita a conversão gerencial.
   ===================================================== */
.xml-conversion-help {
    margin: 14px 0 18px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #eef6ff;
    border: 1px solid #cfe3f8;
    color: #31506f;
    font-size: 13px;
    line-height: 1.45;
}

.xml-conference-table th,
.xml-conference-table td {
    vertical-align: top;
}

.xml-conversion-box {
    min-width: 220px;
    padding: 10px;
    border: 1px solid #dde8f4;
    border-radius: 12px;
    background: #f8fbff;
}

.xml-conversion-fields {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 6px 8px;
    align-items: center;
    margin-bottom: 8px;
}

.xml-conversion-fields label {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    color: #60758a;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.compact-input {
    min-height: 32px;
    height: 32px;
    padding: 4px 8px;
    font-size: 12px;
}

/* =====================================================
   Módulo Estoque - padrão premium discreto
   ===================================================== */
.inventory-header-row {
    align-items: flex-start;
    gap: 16px;
}

.inventory-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.inventory-card,
.inventory-movements-card {
    margin-top: 16px;
    overflow: hidden;
}

.inventory-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 220px;
    gap: 14px;
    align-items: end;
    margin-bottom: 14px;
}

.inventory-search-group input {
    min-width: 260px;
}

.inventory-table td,
.inventory-table th,
.inventory-movements-table td,
.inventory-movements-table th {
    font-size: 11px;
    vertical-align: middle;
    padding: 7px 8px;
    line-height: 1.2;
}

.inventory-table td strong,
.inventory-movements-table td strong {
    color: #17345c;
    font-weight: 700;
}

.inventory-table small,
.inventory-movements-table small,
.inventory-modal-product small {
    color: #64748b;
    font-size: 11px;
}

.inventory-actions {
    gap: 6px;
    justify-content: flex-start;
}

.inventory-modal-product {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.inventory-movements-card .card-section-title {
    margin-bottom: 12px;
}

@media (max-width: 980px) {
    .inventory-kpi-grid {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }

    .inventory-toolbar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .inventory-kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   Módulo Fornecedores - padrão visual ERP premium
   ===================================================== */
.suppliers-card .inventory-toolbar,
.suppliers-header-row {
    align-items: flex-end;
}

.supplier-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}

.supplier-form-grid .form-group label {
    font-size: 12px;
    font-weight: 700;
    color: #39506c;
}

.form-hint {
    display: block;
    margin-top: 10px;
    color: #6b7d94;
}

.supplier-view .entity-view-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.supplier-view .entity-view-header h2 {
    margin: 4px 0 4px;
    font-size: 22px;
    color: #10233f;
}

@media (max-width: 760px) {
    .supplier-form-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   Contas a Pagar + Financeiro do XML NF-e
   Padrão visual premium: cards leves, tabela limpa e ações discretas.
   ===================================================== */
.xml-financial-card {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #fff;
}

.xml-payments-table input,
.xml-payments-table select,
.payable-table input,
.payable-table select {
    min-height: 34px;
    font-size: 0.86rem;
}

.toggle-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    color: #334155;
    cursor: pointer;
    user-select: none;
}

.toggle-inline input {
    width: 16px;
    height: 16px;
}

.payable-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.payable-toolbar {
    align-items: flex-end;
}

.payable-table td small {
    color: #64748b;
}

.payable-form-grid textarea {
    min-height: 84px;
}

/* =====================================================
   Histórico de produto em tela ampliada
   ===================================================== */
.modal.inventory-history-modal {
    padding: 18px;
    align-items: stretch;
}

.modal.inventory-history-modal .modal-content {
    width: min(96vw, 1320px);
    max-width: min(96vw, 1320px);
    max-height: calc(100vh - 36px);
    border-radius: 18px;
    padding: 24px 24px 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal.inventory-history-modal #modalBody {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.inventory-history-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
}

.inventory-history-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-right: 38px;
    align-items: flex-start;
}

.inventory-history-header h2 {
    margin: 2px 0 4px;
    font-size: 22px;
    color: #1e293b;
}

.inventory-history-header p {
    margin: 0;
    color: #475569;
    font-size: 13px;
}

.inventory-history-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 10px;
    min-width: 300px;
}

.inventory-history-summary div {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
}

.inventory-history-summary span {
    display: block;
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: 4px;
}

.inventory-history-summary strong {
    color: #17345c;
    font-size: 14px;
}

.inventory-history-alert {
    margin-bottom: 0;
    font-size: 12px;
}

.inventory-history-table-wrap {
    max-height: 420px;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}

.inventory-history-table {
    margin-bottom: 0;
    min-width: 980px;
}

.inventory-history-table thead th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 2;
}

.inventory-history-table td {
    line-height: 1.35;
}

.btn.btn-xs {
    padding: 5px 8px;
    font-size: 11px;
    border-radius: 8px;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .modal.inventory-history-modal {
        padding: 8px;
    }

    .modal.inventory-history-modal .modal-content {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
        padding: 18px 14px;
        border-radius: 14px;
    }

    .inventory-history-header {
        flex-direction: column;
        padding-right: 32px;
    }

    .inventory-history-summary {
        width: 100%;
        min-width: 0;
        grid-template-columns: 1fr;
    }

    .inventory-history-table-wrap {
        max-height: calc(100vh - 310px);
    }
}

/* =====================================================
   V63 - Modal premium de cadastro/edição de cliente
   Mantém o mesmo conceito visual do histórico de produto: tela ampla,
   cabeçalho fixo, formulário em blocos e rolagem interna.
   ===================================================== */
.modal.client-form-modal {
    padding: 18px;
    align-items: stretch;
}

.modal.client-form-modal .modal-content {
    width: min(90vw, 1220px);
    max-width: min(90vw, 1220px);
    max-height: calc(100vh - 36px);
    border-radius: 18px;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal.client-form-modal #modalBody {
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal.client-form-modal .modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 8;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #dbe7f6;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.client-form-page {
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #f8fbff;
}

.client-form-header {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    padding: 22px 64px 18px 24px;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid #dbe7f6;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}

.client-form-kicker {
    display: inline-block;
    margin-bottom: 5px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    color: #557199;
    text-transform: uppercase;
}

.client-form-header h2 {
    margin: 0 0 4px;
    font-size: 22px;
    color: #1e293b;
}

.client-form-header p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.client-form-status-card {
    min-width: 150px;
    border: 1px solid #dbe7f6;
    border-radius: 14px;
    background: #f8fafc;
    padding: 10px 12px;
}

.client-form-status-card span {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;
    color: #64748b;
    text-transform: uppercase;
}

.client-form-status-card strong {
    color: #17345c;
    font-size: 15px;
}

.client-form-premium {
    min-height: 0;
    overflow-y: auto;
    padding: 18px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.client-form-section {
    background: #ffffff;
    border: 1px solid #dbe7f6;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .04);
}

.client-form-section-title {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}

.client-form-section-title i {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: #eef5ff;
    color: #2f5f9d;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.client-form-section-title h3 {
    margin: 0 0 3px;
    font-size: 15px;
    color: #1e293b;
}

.client-form-section-title p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
}

.client-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.client-form-grid .form-group {
    margin-bottom: 0;
}

.client-form-grid label {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
}

.client-form-grid input,
.client-form-grid select,
.client-form-grid textarea {
    min-height: 39px;
    border-color: #cbdcf1;
    background: #fff;
}

.client-form-grid .input-group {
    display: flex;
    gap: 8px;
}

.client-form-grid .input-group input {
    min-width: 0;
}

.client-span-2 {
    grid-column: span 2;
}

.client-checkbox-box {
    min-height: 39px;
    padding: 9px 12px;
    border: 1px solid #dbe7f6;
    border-radius: 10px;
    background: #f8fafc;
    align-items: center;
}

.client-form-actions {
    position: sticky;
    bottom: -24px;
    z-index: 4;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 2px -24px -24px;
    padding: 14px 24px;
    background: rgba(255, 255, 255, .97);
    border-top: 1px solid #dbe7f6;
    box-shadow: 0 -8px 22px rgba(15, 23, 42, .04);
}

@media (max-width: 1024px) {
    .client-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .modal.client-form-modal {
        padding: 8px;
    }

    .modal.client-form-modal .modal-content {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
        border-radius: 14px;
    }

    .client-form-header {
        flex-direction: column;
        padding: 18px 54px 14px 16px;
    }

    .client-form-status-card {
        width: 100%;
        min-width: 0;
    }

    .client-form-premium {
        padding: 14px 14px 18px;
    }

    .client-form-section {
        padding: 14px;
    }

    .client-form-grid {
        grid-template-columns: 1fr;
    }

    .client-span-2 {
        grid-column: span 1;
    }

    .client-form-grid .input-group {
        flex-direction: column;
    }

    .client-form-actions {
        margin: 2px -14px -18px;
        padding: 12px 14px;
        flex-direction: column-reverse;
    }

    .client-form-actions .btn {
        width: 100%;
    }
}


/* V64.1 - Estoque com movimentações em página própria */
.inventory-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
    padding: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}

.inventory-subnav-link {
    border: 1px solid transparent;
    background: transparent;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all .16s ease;
}

.inventory-subnav-link:hover {
    background: #eef6ff;
    border-color: #d8e8fb;
    color: #17345c;
}

.inventory-subnav-link.active {
    background: #ffffff;
    border-color: #cfe0f5;
    color: #0f3f73;
    box-shadow: 0 6px 18px rgba(15, 63, 115, .06);
}

.inventory-subnav-link i {
    margin-right: 6px;
}

.inventory-movements-page .inventory-toolbar {
    grid-template-columns: minmax(260px, 1fr) 220px;
}

.inventory-movements-page .inventory-history-table-wrap {
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
}

.inventory-movements-page .inventory-movements-table th,
.inventory-movements-page .inventory-movements-table td {
    font-size: 11px;
    padding: 8px 10px;
}

@media (max-width: 760px) {
    .inventory-subnav {
        display: grid;
        grid-template-columns: 1fr;
    }
    .inventory-movements-page .inventory-toolbar {
        grid-template-columns: 1fr;
    }
}

/* Produto premium com abas fiscal/geral/e-commerce */
.products-table .table-subtitle {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}
.product-form-premium {
    display: block;
}
.product-tabs {
    display: flex;
    gap: 8px;
    padding: 6px;
    margin-bottom: 18px;
    background: #f1f5f9;
    border: 1px solid #dbe7f3;
    border-radius: 14px;
}
.product-tab {
    border: 0;
    background: transparent;
    color: #38516f;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
}
.product-tab.active {
    background: #fff;
    color: #173b69;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .08);
}
.product-tab-panel {
    display: none;
}
.product-tab-panel.active {
    display: block;
}
.form-section-title {
    font-size: 13px;
    font-weight: 800;
    color: #173b69;
    margin: 8px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

/* =====================================================
   Produto - modal premium ampliado
   Observação: manter o cadastro de produto no mesmo padrão visual
   do modal premium de cliente: 90% da tela no desktop, cabeçalho
   e ações fixas, rolagem interna única e layout responsivo.
   ===================================================== */
.modal.product-form-modal {
    padding: 18px;
    align-items: stretch;
}

.modal.product-form-modal .modal-content {
    width: min(90vw, 1220px);
    max-width: min(90vw, 1220px);
    max-height: calc(100vh - 36px);
    border-radius: 18px;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.modal.product-form-modal #modalBody {
    min-height: 0;
    overflow: visible;
    display: block;
}

.modal.product-form-modal .modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 8;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #dbe7f6;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal.product-form-modal #modalBody > h1 {
    position: static;
    margin: 0;
    padding: 24px 64px 14px 24px;
    background: #ffffff;
    border-bottom: 1px solid #dbe7f6;
    color: #1e293b;
    font-size: 24px;
    box-shadow: none;
}

.modal.product-form-modal .product-form-premium {
    min-height: 0;
    overflow: visible;
    padding: 16px 24px 24px;
    background: #f8fbff;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal.product-form-modal .product-tabs {
    position: static;
    z-index: 1;
    margin: 0;
}

.modal.product-form-modal .product-tab-panel {
    background: #ffffff;
    border: 1px solid #dbe7f6;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .04);
}

.modal.product-form-modal .product-tab-panel.active {
    display: block;
}

.modal.product-form-modal .form-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.modal.product-form-modal .form-group {
    margin-bottom: 0;
}

.modal.product-form-modal label {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
}

.modal.product-form-modal input,
.modal.product-form-modal select,
.modal.product-form-modal textarea {
    min-height: 39px;
    border-color: #cbdcf1;
    background: #fff;
}

.modal.product-form-modal textarea {
    min-height: 88px;
}

.modal.product-form-modal .form-group.checkbox {
    min-height: 39px;
    padding: 9px 12px;
    border: 1px solid #dbe7f6;
    border-radius: 10px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal.product-form-modal .form-group.checkbox input {
    min-height: auto;
}

.modal.product-form-modal .image-preview {
    min-height: 160px;
    max-height: 280px;
    overflow: auto;
}

.modal.product-form-modal .product-image-preview {
    max-height: 240px;
    object-fit: contain;
}

.modal.product-form-modal .form-actions {
    position: static;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 2px -24px -24px;
    padding: 14px 24px;
    background: #ffffff;
    border-top: 1px solid #dbe7f6;
    box-shadow: none;
}

@media (max-width: 1024px) {
    .modal.product-form-modal .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .modal.product-form-modal {
        padding: 8px;
    }

    .modal.product-form-modal .modal-content {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
        border-radius: 14px;
    }

    .modal.product-form-modal #modalBody > h1 {
        padding: 18px 54px 14px 16px;
        font-size: 21px;
    }

    .modal.product-form-modal .product-form-premium {
        padding: 14px 14px 18px;
    }

    .modal.product-form-modal .product-tabs {
        overflow-x: auto;
    }

    .modal.product-form-modal .product-tab-panel {
        padding: 14px;
    }
}

@media (max-width: 560px) {
    .modal.product-form-modal .form-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   NCM autocomplete e módulo fiscal
   ===================================================== */
.ncm-autocomplete-group {
    position: relative;
}

.ncm-selected-description {
    margin-top: 8px;
    padding: 9px 11px;
    border: 1px dashed #cbd9ee;
    border-radius: 10px;
    background: #f8fbff;
    color: #334866;
    font-size: 12px;
    line-height: 1.35;
}

.ncm-suggestions {
    position: absolute;
    z-index: 9999;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid #cbd9ee;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 35, 70, 0.16);
    padding: 6px;
}

.ncm-suggestion-item {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 10px 12px;
    border-radius: 9px;
    cursor: pointer;
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 10px;
    align-items: start;
    color: #183153;
    font-size: 12px;
}

.ncm-suggestion-item:hover {
    background: #edf5ff;
}

.ncm-suggestion-item strong {
    color: #0b3b75;
    font-size: 13px;
}

.ncm-suggestion-item span {
    line-height: 1.35;
}

.ncm-suggestion-empty {
    padding: 12px;
    font-size: 12px;
    color: #5f7188;
}

.ncm-import-panel,
.ncm-search-panel {
    margin-top: 16px;
}

.ncm-import-result {
    margin-top: 12px;
}

.alert {
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
}
.alert-success { background: #eefaf2; border: 1px solid #c9efd5; color: #176c35; }
.alert-danger { background: #fff1f1; border: 1px solid #ffd0d0; color: #9b1c1c; }
.alert-info { background: #eef6ff; border: 1px solid #cfe5ff; color: #164b7d; }

@media (max-width: 768px) {
    .ncm-suggestion-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

/* Ajuste v69: NCM seleciona corretamente e o modal do produto rola por inteiro, sem abas flutuantes. */
.modal.product-form-modal .ncm-autocomplete-group {
    z-index: 20;
}
.modal.product-form-modal .ncm-suggestions {
    z-index: 30;
}
.ncm-selected-description.is-empty {
    color: #64748b;
}

/* =====================================================
   Contas a Pagar v71 - filtros, paginação e layout premium
   ===================================================== */
.payable-summary-filter {
    border: 1px solid #dbe6f5;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.payable-summary-filter:hover {
    border-color: #94b8ee;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.payable-filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 2.2fr) repeat(3, minmax(150px, 1fr)) repeat(2, minmax(145px, .9fr)) minmax(140px, .9fr) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 16px;
}

.payable-filter-panel .form-group {
    margin-bottom: 0;
}

.payable-search-field {
    min-width: 260px;
}

.payable-filter-actions {
    display: flex;
    align-items: end;
}

.payable-table-meta,
.payable-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #475569;
    font-size: 0.84rem;
    margin: 8px 0 10px;
}

.payable-table-responsive {
    width: 100%;
    overflow-x: auto;
}

.payable-pagination-bar {
    justify-content: flex-end;
    margin-top: 12px;
}

.payable-pagination-bar .btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

@media (max-width: 1280px) {
    .payable-filter-panel {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

@media (max-width: 780px) {
    .payable-filter-panel,
    .payable-table-meta,
    .payable-pagination-bar {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .payable-search-field,
    .payable-filter-actions .btn {
        width: 100%;
    }
}


/* =====================================================
   Ajuste visual v72 - cards de resumo do Contas a Pagar
   Valor em cima, descrição embaixo e cores por indicador.
   ===================================================== */
.payable-kpi-grid .payable-summary-filter {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 5px;
}

.payable-kpi-grid .payable-summary-filter strong {
    display: block;
    margin: 0;
    color: var(--premium-text) !important;
    font-size: 16px !important;
    line-height: 1.15 !important;
    font-weight: 800 !important;
}

.payable-kpi-grid .payable-summary-filter span {
    display: block;
    margin: 0;
    color: var(--premium-muted) !important;
    font-size: 10.8px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.payable-kpi-grid .payable-summary-overdue strong {
    color: #dc2626 !important;
}

.payable-kpi-grid .payable-summary-today strong {
    color: #111827 !important;
}

.payable-kpi-grid .payable-summary-paid-month strong {
    color: #2563eb !important;
}

/* =====================================================
   Contas a Receber v73 - mesmo padrão visual do Contas a Pagar
   ===================================================== */
.receivable-card .payable-table th,
.receivable-card .payable-table td {
    white-space: nowrap;
}

.receivable-card .payable-table td:first-child {
    min-width: 220px;
    white-space: normal;
}

.receivable-kpi-grid .receivable-summary-overdue strong {
    color: #dc2626 !important;
}

.receivable-kpi-grid .receivable-summary-today strong {
    color: #111827 !important;
}

.receivable-kpi-grid .receivable-summary-received-month strong {
    color: #2563eb !important;
}

/* =====================================================
   Visualização profissional - Contas a Pagar
   ===================================================== */
.modal.payable-view-modal {
    padding: 18px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(3px);
}

.modal.payable-view-modal .modal-content {
    width: min(92vw, 920px);
    max-width: min(92vw, 920px);
    max-height: calc(100vh - 36px);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.32);
}

.modal.payable-view-modal #modalBody {
    padding: 0;
    overflow-y: auto;
    max-height: calc(100vh - 36px);
}

.modal.payable-view-modal .modal-close {
    top: 18px;
    right: 18px;
    z-index: 4;
    color: #64748b;
}

.payable-view-page {
    background: #f8fafc;
    color: #0f2747;
}

.payable-view-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 22px;
    padding: 28px 32px 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f3f7fc 100%);
    border-bottom: 1px solid #e2e8f0;
}

.payable-view-title-block {
    min-width: 0;
    padding-right: 38px;
}

.payable-view-title-block h2 {
    margin: 6px 0 8px;
    color: #08213f;
    font-size: 22px;
    line-height: 1.28;
    font-weight: 800;
}

.payable-view-title-block p {
    margin: 0;
    color: #53677f;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.payable-view-status-block {
    min-width: 190px;
    padding: 16px 18px;
    border: 1px solid #dbe7f5;
    border-radius: 18px;
    background: #fff;
    text-align: right;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

.payable-view-status-block strong {
    display: block;
    margin-top: 12px;
    color: #08213f;
    font-size: 24px;
    line-height: 1;
}

.payable-view-status-block small {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.status-badge.status-overdue {
    background: #fee2e2;
    color: #b91c1c;
}

.payable-view-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.payable-view-grid-highlight {
    padding: 18px 32px 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.payable-view-section {
    padding: 18px 32px 24px;
}

.payable-view-section h3 {
    margin: 0 0 12px;
    color: #17345c;
    font-size: 14px;
    font-weight: 800;
}

.payable-view-info-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    padding: 13px 14px;
    min-width: 0;
}

.payable-view-info-card span {
    display: block;
    margin-bottom: 6px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.payable-view-info-card strong {
    display: block;
    color: #0f2747;
    font-size: 14px;
    line-height: 1.35;
    word-break: break-word;
}

.payable-view-info-card .payable-view-key {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    color: #334155;
}

.payable-view-actions {
    padding: 16px 32px 22px;
    background: #fff;
}

@media (max-width: 820px) {
    .payable-view-hero {
        flex-direction: column;
    }

    .payable-view-title-block {
        padding-right: 34px;
    }

    .payable-view-status-block {
        width: 100%;
        text-align: left;
    }

    .payable-view-grid-highlight,
    .payable-view-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   V77 - Dashboard moderno estilo React/Bootstrap
   Padrão visual inspirado no mockup aprovado: cards limpos, gráficos SVG,
   menu premium e distribuição de informações em blocos executivos.
   ===================================================== */
.nortex-modern-dashboard {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 2px 0 18px;
}
.nortex-dashboard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.nortex-dashboard-head h1 {
    margin: 0;
    font-size: 24px;
    color: #101828;
    letter-spacing: -.03em;
    font-weight: 800;
}
.nortex-dashboard-head p {
    margin: 4px 0 0;
    color: #667085;
    font-size: 13px;
}
.modern-date-filter,
.modern-panel-title button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #e5eaf1;
    border-radius: 9px;
    background: #fff;
    color: #344054;
    font-size: 12.5px;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(16, 24, 40, .04);
    cursor: pointer;
}
.modern-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}
.modern-kpi-card {
    position: relative;
    min-height: 105px;
    padding: 20px 20px 18px;
    border: 1px solid #e6edf6;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .055);
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
}
.modern-kpi-card:before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    bottom: 16px;
    width: 4px;
    border-radius: 999px;
    background: var(--kpi-color);
}
.modern-kpi-card.tone-blue { --kpi-color: #3b82f6; }
.modern-kpi-card.tone-green { --kpi-color: #22c55e; }
.modern-kpi-card.tone-orange { --kpi-color: #ff8a0a; }
.modern-kpi-card.tone-purple { --kpi-color: #7c3aed; }
.modern-kpi-card.tone-red { --kpi-color: #ef4444; }
.modern-kpi-content span {
    display: block;
    color: #667085;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 8px;
}
.modern-kpi-content strong {
    display: block;
    color: #101828;
    font-size: 21px;
    line-height: 1.1;
    letter-spacing: -.02em;
    white-space: nowrap;
}
.modern-kpi-content small {
    display: block;
    margin-top: 9px;
    color: var(--kpi-color);
    font-size: 11px;
    font-weight: 700;
}
.modern-kpi-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--kpi-color) 14%, white);
    color: #fff;
    box-shadow: inset 0 0 0 12px color-mix(in srgb, var(--kpi-color) 13%, white);
}
.modern-kpi-icon i {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--kpi-color);
    color: #fff;
    font-size: 15px;
}
.modern-dashboard-grid {
    display: grid;
    gap: 16px;
}
.modern-dashboard-grid.main-row {
    grid-template-columns: 1.52fr 1fr .78fr;
}
.modern-dashboard-grid.bottom-row {
    grid-template-columns: .95fr 1.05fr 1fr;
}
.modern-panel {
    background: #fff;
    border: 1px solid #e6edf6;
    border-radius: 13px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .055);
    padding: 18px;
    overflow: hidden;
}
.modern-panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.modern-panel-title h2 {
    margin: 0;
    font-size: 14px;
    color: #101828;
    font-weight: 800;
    letter-spacing: -.01em;
}
.modern-panel-title button {
    min-height: 33px;
    padding: 0 12px;
    font-size: 11px;
    box-shadow: none;
}
.panel-revenue { min-height: 300px; }
.modern-line-chart { height: 242px; }
.modern-line-chart svg { width: 100%; height: 100%; display: block; }
.modern-grid-line { stroke: #edf2f7; stroke-width: 1; }
.modern-axis-value,
.modern-axis-label { fill: #667085; font-size: 10.5px; font-weight: 700; }
.modern-line-area { fill: url(#none); fill: rgba(91, 70, 255, .085); }
.modern-line-stroke { fill: none; stroke: #5b46ff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.modern-donut-wrap {
    display: grid;
    grid-template-columns: 150px 1fr;
    align-items: center;
    gap: 16px;
    min-height: 230px;
}
.modern-donut {
    width: 150px;
    height: 150px;
    overflow: visible;
}
.modern-donut circle { transition: opacity .18s ease; }
.modern-donut-legend {
    display: flex;
    flex-direction: column;
    gap: 11px;
}
.donut-legend-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.donut-legend-item i {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    margin-top: 2px;
    flex: 0 0 auto;
}
.donut-legend-item strong {
    display: block;
    color: #101828;
    font-size: 12.5px;
    font-weight: 800;
}
.donut-legend-item small {
    display: block;
    color: #667085;
    font-size: 11px;
    margin-top: 2px;
}
.modern-cash-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.modern-cash-list div {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 13px;
    border: 1px solid #edf2f7;
    border-radius: 9px;
    background: #f8fafc;
}
.modern-cash-list span {
    color: #344054;
    font-size: 11.5px;
    font-weight: 700;
}
.modern-cash-list strong {
    color: #101828;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}
.modern-cash-list .income { background: #f6fdf8; }
.modern-cash-list .income strong { color: #22a655; }
.modern-cash-list .expense strong { color: #ef4444; }
.modern-cash-list .current { background: #f2f7ff; border-color: #dbeafe; }
.modern-cash-list .current strong { color: #2563eb; }
.modern-products-list,
.modern-activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.modern-product-row {
    display: grid;
    grid-template-columns: 22px 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}
.product-rank {
    color: #667085;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}
.product-thumb {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: linear-gradient(135deg, #e6f0ff, #f8fbff);
    color: #3b82f6;
    display: grid;
    place-items: center;
    border: 1px solid #e6edf6;
}
.product-info strong {
    display: block;
    color: #101828;
    font-size: 12.5px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-info small {
    display: block;
    color: #667085;
    font-size: 11px;
    margin-top: 2px;
}
.product-info em {
    display: block;
    height: 6px;
    border-radius: 999px;
    background: #edf2f7;
    margin-top: 7px;
    overflow: hidden;
}
.product-info em b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3b82f6, #22c55e);
}
.product-value {
    color: #101828;
    font-size: 11.5px;
    font-weight: 900;
    white-space: nowrap;
}
.modern-vendor-chart {
    display: grid;
    grid-template-columns: 32px 1fr;
    min-height: 238px;
}
.vendor-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #667085;
    font-size: 10.5px;
    font-weight: 700;
    padding: 7px 0 22px;
}
.vendor-bars {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 18px;
    padding: 22px 4px 20px;
    background-image: linear-gradient(#edf2f7 1px, transparent 1px);
    background-size: 100% 40px;
}
.modern-vendor-bar {
    height: 200px;
    flex: 1;
    min-width: 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}
.modern-vendor-bar span {
    color: #101828;
    font-size: 10.5px;
    font-weight: 800;
    white-space: nowrap;
}
.modern-vendor-bar i {
    display: block;
    width: 34px;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 8px 18px rgba(16, 24, 40, .12);
}
.modern-vendor-bar small {
    color: #344054;
    font-size: 10.5px;
    font-weight: 700;
    max-width: 64px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.modern-activity-item {
    display: grid;
    grid-template-columns: 38px minmax(0,1fr);
    align-items: center;
    gap: 12px;
    padding: 4px 0 10px;
    border-bottom: 1px solid #edf2f7;
}
.activity-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: grid;
    place-items: center;
}
.activity-icon.green { background: #eafaf0; color: #22a655; }
.activity-icon.blue { background: #eff6ff; color: #2563eb; }
.activity-icon.purple { background: #f4efff; color: #7c3aed; }
.activity-icon.orange { background: #fff7ed; color: #f97316; }
.modern-activity-item strong {
    display: block;
    color: #101828;
    font-size: 12.5px;
    font-weight: 800;
}
.modern-activity-item small {
    display: block;
    color: #667085;
    font-size: 11px;
    margin-top: 2px;
}
.view-all-activities {
    height: 35px;
    border: 1px solid #e5eaf1;
    border-radius: 9px;
    background: #fff;
    color: #2563eb;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
}
@media (max-width: 1320px) {
    .modern-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .modern-dashboard-grid.main-row,
    .modern-dashboard-grid.bottom-row { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .nortex-dashboard-head { flex-direction: column; align-items: flex-start; }
    .modern-kpi-grid { grid-template-columns: 1fr; }
    .modern-donut-wrap { grid-template-columns: 1fr; justify-items: center; }
    .modern-product-row { grid-template-columns: 22px 40px minmax(0,1fr); }
    .product-value { grid-column: 3; }
}

/* =====================================================
   Compras - Etapa 1: Dashboard operacional XML/NF-e
   ===================================================== */
.purchases-header-row { align-items: flex-start; }
.purchases-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(150px, 1fr));
    gap: 14px;
    margin: 18px 0;
}
.purchase-kpi-card {
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 18px;
    padding: 16px;
    display: flex;
    gap: 13px;
    align-items: center;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .055);
}
.purchase-kpi-icon {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #2563eb;
    flex: 0 0 auto;
}
.purchase-kpi-card.tone-green .purchase-kpi-icon { background:#ecfdf5; color:#059669; }
.purchase-kpi-card.tone-orange .purchase-kpi-icon { background:#fff7ed; color:#ea580c; }
.purchase-kpi-card.tone-red .purchase-kpi-icon { background:#fef2f2; color:#dc2626; }
.purchase-kpi-card.tone-purple .purchase-kpi-icon { background:#f5f3ff; color:#7c3aed; }
.purchase-kpi-copy strong {
    display: block;
    font-size: 1.18rem;
    line-height: 1.05;
    color: #0f172a;
    letter-spacing: -0.03em;
}
.purchase-kpi-copy span {
    display: block;
    margin-top: 6px;
    font-size: .78rem;
    font-weight: 700;
    color: #334155;
}
.purchase-kpi-copy small {
    display: block;
    margin-top: 4px;
    font-size: .69rem;
    color: #64748b;
}
.purchases-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, .85fr);
    gap: 18px;
    margin-top: 18px;
}
.purchase-column-chart { min-height: 260px; }
.purchase-column-chart svg { width: 100%; height: 260px; display: block; }
.purchase-chart-bar { fill: #2563eb; opacity: .86; }
.purchase-chart-bar:hover { opacity: 1; }
.purchase-supplier-bars { display: flex; flex-direction: column; gap: 14px; }
.purchase-supplier-row { display: flex; flex-direction: column; gap: 6px; }
.purchase-supplier-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.purchase-supplier-head span { font-size: .8rem; font-weight: 700; color: #334155; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.purchase-supplier-head strong { font-size: .8rem; color: #0f172a; }
.purchase-supplier-track { height: 8px; border-radius: 99px; background: #eef2f7; overflow: hidden; }
.purchase-supplier-track span { display: block; height: 100%; border-radius: inherit; background: #2563eb; }
.purchase-supplier-row small { color: #64748b; font-size: .7rem; }
.purchase-unlinked-list { display: flex; flex-direction: column; gap: 10px; }
.purchase-unlinked-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e8edf5;
    border-radius: 14px;
    background: #f8fafc;
}
.purchase-unlinked-item strong { display: block; color: #0f172a; font-size: .82rem; }
.purchase-unlinked-item span, .purchase-unlinked-item small { display: block; color: #64748b; font-size: .72rem; margin-top: 2px; }
.purchase-unlinked-item b { color: #0f172a; font-size: .78rem; white-space: nowrap; }
.purchase-empty-state {
    min-height: 170px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    color: #64748b;
    border: 1px dashed #d8e0ee;
    border-radius: 16px;
    background: #f8fafc;
    padding: 18px;
}
.purchase-empty-state i { font-size: 1.5rem; color: #2563eb; }
.purchase-empty-state strong { color: #0f172a; }
.purchase-empty-state span { font-size: .78rem; }
@media (max-width: 1400px) { .purchases-kpi-grid { grid-template-columns: repeat(3, minmax(180px, 1fr)); } }
@media (max-width: 980px) {
    .purchases-kpi-grid, .purchases-dashboard-grid { grid-template-columns: 1fr; }
}


/* Nortex ERP v84 - Configuração Fiscal / Dados da Empresa */
.fiscal-config-header { align-items: flex-start; gap: 16px; }
.fiscal-config-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.fiscal-config-summary-grid .summary-card { min-height: 86px; display: flex; flex-direction: column; justify-content: center; }
.fiscal-config-summary-grid .summary-card strong { font-size: 1.35rem; color: #172033; line-height: 1.15; }
.fiscal-config-summary-grid .summary-card span { margin-top: 6px; color: #64748b; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.fiscal-company-form { display: flex; flex-direction: column; gap: 18px; }
.fiscal-config-card { padding: 22px; border: 1px solid #e5edf7; box-shadow: 0 16px 34px rgba(15, 23, 42, .06); }
.section-title-row { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.section-title-row h2 { font-size: 1.05rem; color: #172033; margin: 0 0 4px; }
.section-title-row p { color: #64748b; margin: 0; font-size: .9rem; }
.fiscal-company-identity { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.company-logo-preview, .company-logo-placeholder { width: 180px; height: 130px; border: 1px solid #dbe7f3; border-radius: 18px; background: #f8fbff; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 12px; }
.company-logo-preview img { max-width: 150px; max-height: 100px; object-fit: contain; }
.company-logo-placeholder { flex-direction: column; color: #7c8da5; gap: 8px; }
.company-logo-placeholder i { font-size: 1.8rem; }
.file-btn { cursor: pointer; width: 180px; justify-content: center; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.four-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
.fiscal-status-badge { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 8px 12px; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.fiscal-status-badge.ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.fiscal-status-badge.warn { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.fiscal-config-note { display: flex; align-items: center; gap: 10px; margin-top: 14px; border-radius: 14px; padding: 12px 14px; }
.fiscal-config-actions { display: flex; justify-content: flex-end; gap: 10px; padding-bottom: 28px; }
@media (max-width: 1100px) { .fiscal-config-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid.four-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fiscal-company-identity { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .fiscal-config-summary-grid, .form-grid.two-cols, .form-grid.four-cols { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: span 1; } .section-title-row { flex-direction: column; } }

/* =====================================================
   Módulo Ordem de Serviço - Nortex ERP Smart
   Padrão visual premium, discreto e integrado ao dashboard.
   ===================================================== */
.service-orders-summary-grid { grid-template-columns: repeat(5, minmax(160px, 1fr)); }
.service-orders-table td { vertical-align: middle; }
.status-badge { display:inline-flex; align-items:center; gap:6px; padding:5px 10px; border-radius:999px; font-size:12px; font-weight:700; background:#eef3fb; color:#334155; }
.so-status-orcamento_pendente { background:#fff7ed; color:#9a3412; }
.so-status-aprovada { background:#ecfdf5; color:#047857; }
.so-status-em_execucao { background:#eff6ff; color:#1d4ed8; }
.so-status-aguardando_peca { background:#fefce8; color:#854d0e; }
.so-status-finalizada { background:#f0fdf4; color:#166534; }
.so-status-entregue { background:#eef2ff; color:#3730a3; }
.so-status-cancelada { background:#fef2f2; color:#991b1b; }
.priority-badge { display:inline-block; padding:4px 9px; border-radius:999px; font-size:12px; background:#f1f5f9; color:#475569; }
.priority-alta { background:#fff7ed; color:#c2410c; }
.priority-urgente { background:#fef2f2; color:#b91c1c; }
.priority-baixa { background:#f8fafc; color:#64748b; }
.maintenance-date { color:#1d4ed8; font-weight:600; white-space:nowrap; }
.checkbox-inline { display:inline-flex; gap:8px; align-items:center; color:#334155; font-size:13px; }
.compact-actions { margin-top: 12px; justify-content: flex-start; }
.service-order-modal .modal-content { width: min(1180px, 94vw); max-height: 92vh; overflow: auto; }
.service-order-form .form-section { border: 1px solid #e2e8f0; border-radius: 14px; padding: 16px; margin-bottom: 14px; background:#fff; }
.service-order-form .form-section h3 { font-size: 14px; margin: 0 0 12px; color:#1e293b; }
.form-grid.one-col { display:grid; grid-template-columns: 1fr; gap: 12px; }
.form-grid.three-cols { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.form-grid.four-cols { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.form-grid.two-cols { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.form-group.wide { grid-column: span 2; }
.form-group small { color:#94a3b8; font-size: 11px; margin-top: 4px; display:block; }
.smart-maintenance-box { background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%) !important; border-color:#bfdbfe !important; }
.so-view-header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; border-bottom:1px solid #e2e8f0; padding-bottom:14px; margin-bottom:14px; }
.so-view-header h2 { margin-bottom:4px; }
.so-view-grid label, .so-text-grid label { color:#64748b; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.02em; }
.so-view-grid p, .so-text-grid p { margin:5px 0 0; background:#f8fafc; border:1px solid #e2e8f0; border-radius:10px; padding:10px; min-height:43px; }
.so-timeline { list-style:none; padding:0; margin:0; }
.so-timeline li { border-left:3px solid #bfdbfe; padding:0 0 14px 12px; margin-left:6px; }
.so-timeline li span { display:block; color:#64748b; font-size:12px; margin-top:3px; }
.so-timeline li p { margin:5px 0 0; color:#475569; }
.text-danger { color:#dc2626 !important; }
@media (max-width: 980px) {
    .service-orders-summary-grid, .form-grid.three-cols, .form-grid.four-cols, .form-grid.two-cols { grid-template-columns: 1fr; }
    .form-group.wide { grid-column: auto; }
}

/* OS profissional v2 - campos técnicos, checklist e orçamento */
.service-order-form-pro .form-section { box-shadow: 0 8px 24px rgba(15, 23, 42, 0.035); }
.service-order-form-pro .form-section h3 { display:flex; align-items:center; gap:8px; padding-bottom:10px; border-bottom:1px solid #e2e8f0; }
.os-checklist-grid { display:grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap:10px; }
.os-checklist-grid label, .checkbox-card label { display:flex; align-items:center; gap:8px; min-height:38px; padding:9px 10px; border:1px solid #dbe5f0; border-radius:10px; background:#f8fafc; color:#334155; font-size:12px; font-weight:600; }
.service-order-form-pro textarea { min-height:78px; }
.service-order-form-pro input[readonly], .service-order-form-pro input:disabled { background:#f8fafc; color:#64748b; }
.mt-10 { margin-top:10px; }
@media (max-width: 1180px) { .os-checklist-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 720px) { .os-checklist-grid { grid-template-columns: 1fr; } }

/* Ordem de Serviço v3 - cadastro em página, não em modal */
.service-order-page { padding: 6px 0 32px; }
.service-order-page .module-header-row { align-items: flex-start; margin-bottom: 18px; }
.service-order-page h1 { font-size: 22px; margin: 0 0 6px; color: #0f2746; }
.service-order-page .service-order-form { max-width: 100%; }
.service-order-page .form-section { border: 1px solid #dce7f3; border-radius: 16px; padding: 18px 20px; margin-bottom: 16px; background: #fff; box-shadow: 0 8px 22px rgba(15, 23, 42, 0.035); }
.service-order-page .form-section h3 { font-size: 15px; font-weight: 700; color: #1e293b; margin: 0 0 16px; padding-bottom: 11px; border-bottom: 1px solid #e5edf6; }
.service-order-page .form-group { margin-bottom: 0; }
.service-order-page .form-group label { color: #243b5a; font-size: 12px; font-weight: 700; margin-bottom: 7px; }
.service-order-page .form-group input,
.service-order-page .form-group input:not([type]),
.service-order-page .form-group input[type="date"],
.service-order-page .form-group input[type="text"],
.service-order-page .form-group input[type="number"],
.service-order-page .form-group select,
.service-order-page .form-group textarea {
    width: 100% !important;
    min-height: 38px !important;
    height: 38px !important;
    border: 1px solid #cfdced !important;
    border-radius: 9px !important;
    padding: 8px 11px !important;
    font-size: 13px !important;
    color: #0f2746 !important;
    background: #fff !important;
    box-sizing: border-box !important;
    outline: none !important;
}
.service-order-page .form-group textarea { height: auto !important; min-height: 86px !important; resize: vertical; }
.service-order-page .form-group input:focus,
.service-order-page .form-group select:focus,
.service-order-page .form-group textarea:focus { border-color: #7ba9df !important; box-shadow: 0 0 0 3px rgba(59, 130, 246, .10) !important; }
.service-order-page .form-grid { gap: 16px 18px; }
.service-order-page .form-grid.three-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.service-order-page .form-grid.four-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.service-order-page .form-grid.two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.service-order-page .form-group.wide { grid-column: span 2; }
.service-order-page .checkbox-card label,
.service-order-page .os-checklist-grid label { margin: 0; min-height: 40px; border: 1px solid #dbe7f3; border-radius: 10px; background: #f8fbff; }
.service-order-page .checkbox-card input,
.service-order-page .os-checklist-grid input,
.service-order-page .checkbox-inline input { width: auto !important; min-height: auto !important; height: auto !important; }
.service-order-page .form-page-actions { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; gap: 10px; padding: 14px 0 4px; background: linear-gradient(180deg, rgba(245, 248, 252, .25), #f5f8fc 65%); }
@media (max-width: 1180px) { .service-order-page .form-grid.four-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .service-order-page .form-grid.three-cols, .service-order-page .form-grid.two-cols, .service-order-page .form-grid.four-cols { grid-template-columns: 1fr; } .service-order-page .form-group.wide { grid-column: auto; } }

/* Ordem de Serviço v4 - filtros mais espaçosos e cliente com autocomplete */
.service-orders-filter-panel-v4 {
    padding: 16px !important;
    overflow: visible !important;
}
.service-orders-filter-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) minmax(155px, .8fr) minmax(155px, .8fr) minmax(140px, .7fr) minmax(210px, 1fr) auto;
    gap: 14px;
    align-items: end;
    width: 100%;
}
.service-orders-filter-panel-v4 .form-group {
    min-width: 0;
    margin-bottom: 0;
}
.service-orders-filter-panel-v4 input,
.service-orders-filter-panel-v4 select {
    width: 100% !important;
    min-width: 0 !important;
    height: 38px !important;
    box-sizing: border-box !important;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.service-orders-filter-panel-v4 .so-maintenance-check {
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #dbe7f3;
    border-radius: 10px;
    background: #f8fbff;
    line-height: 1.2;
}
.service-orders-filter-panel-v4 .so-maintenance-check input {
    width: auto !important;
    height: auto !important;
    min-height: auto !important;
    flex: 0 0 auto;
}
.service-orders-filter-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    white-space: nowrap;
}
.service-order-client-field {
    position: relative;
    overflow: visible !important;
}
.service-order-client-field input[type="text"] {
    padding-right: 36px !important;
}
.service-order-client-suggestions {
    width: 100%;
    max-height: 280px;
    overflow-y: auto;
    z-index: 60;
}
.service-order-client-suggestions .client-suggestion-item {
    width: 100%;
    border: 0;
    background: #fff;
    cursor: pointer;
}
.service-order-client-suggestions .client-suggestion-item:hover {
    background: #f1f7ff;
}
@media (max-width: 1280px) {
    .service-orders-filter-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .service-orders-filter-actions {
        grid-column: span 2;
    }
}
@media (max-width: 900px) {
    .service-orders-filter-grid {
        grid-template-columns: 1fr 1fr;
    }
    .service-orders-filter-actions {
        grid-column: 1 / -1;
    }
}
@media (max-width: 640px) {
    .service-orders-filter-grid {
        grid-template-columns: 1fr;
    }
    .service-orders-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ============================================================
   Padrão oficial Nortex v6: cadastros em página e modais rápidos
   - Cadastro/edição grande: usar .nortex-form-page dentro do conteúdo principal.
   - Modal/pop-up: usar somente para confirmação, status e ações curtas.
   ============================================================ */
.nortex-form-page {
    padding: 6px 0 36px;
}
.nortex-page-header {
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}
.nortex-page-header h1 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
    color: #0f2746;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.nortex-page-header .page-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.nortex-standard-form .form-section {
    border: 1px solid #dce7f3;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 16px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.035);
}
.nortex-standard-form .form-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 16px;
    padding-bottom: 11px;
    border-bottom: 1px solid #e5edf6;
}
.nortex-form-actions {
    position: sticky;
    bottom: 0;
    z-index: 8;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 0 4px;
    background: linear-gradient(180deg, rgba(245, 248, 252, .25), #f5f8fc 65%);
}
.modal.nortex-confirm-modal .modal-content {
    width: min(440px, 94vw);
    max-height: none;
    overflow: visible;
    padding: 24px;
    border-radius: 18px;
}
.nortex-confirm-box {
    text-align: center;
}
.nortex-confirm-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    background: #eef6ff;
    color: #2563eb;
}
.nortex-confirm-icon.danger {
    background: #fff1f2;
    color: #e11d48;
}
.nortex-confirm-box h2 {
    margin: 0 0 8px;
    font-size: 19px;
    color: #0f2746;
}
.nortex-confirm-box p {
    margin: 0 0 18px;
    color: #667085;
    line-height: 1.5;
}
@media (max-width: 768px) {
    .nortex-page-header {
        flex-direction: column;
    }
    .nortex-page-header .page-header-actions,
    .nortex-form-actions {
        width: 100%;
        justify-content: stretch;
    }
    .nortex-page-header .page-header-actions .btn,
    .nortex-form-actions .btn {
        flex: 1;
    }
}


/* Clientes no padrão oficial de página Nortex */
.client-form-page.nortex-form-page {
    background: transparent;
}
.client-page-status-card {
    max-width: 190px;
    margin: -8px 0 16px auto;
}
.client-form-page.nortex-form-page .client-form-premium {
    padding: 0;
}
.client-form-page.nortex-form-page .client-form-section {
    border: 1px solid #dce7f3;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 16px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.035);
}
.client-form-page.nortex-form-page .client-form-actions {
    display: none;
}
@media (max-width: 768px) {
    .client-page-status-card {
        max-width: none;
        margin: 0 0 14px;
    }
}

/* Produtos no padrão oficial de página Nortex */
.product-form-page.nortex-form-page {
    background: transparent;
}
.product-form-page.nortex-form-page .product-form-premium {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.product-form-page.nortex-form-page .product-tabs {
    margin-bottom: 0;
    overflow-x: auto;
}
.product-form-page.nortex-form-page .product-tab-panel {
    background: #ffffff;
    border: 1px solid #dce7f3;
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.035);
}
.product-form-page.nortex-form-page .product-tab-panel.active {
    display: block;
}
.product-form-page.nortex-form-page .form-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}
.product-form-page.nortex-form-page .form-group {
    margin-bottom: 0;
}
.product-form-page.nortex-form-page label {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
}
.product-form-page.nortex-form-page input,
.product-form-page.nortex-form-page select,
.product-form-page.nortex-form-page textarea {
    min-height: 39px;
    border-color: #cbdcf1;
    background: #fff;
}
.product-form-page.nortex-form-page textarea {
    min-height: 92px;
}
.product-form-page.nortex-form-page .form-group.checkbox {
    min-height: 39px;
    padding: 9px 12px;
    border: 1px solid #dbe7f6;
    border-radius: 10px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
}
.product-form-page.nortex-form-page .form-group.checkbox input {
    min-height: auto;
}
.product-form-page.nortex-form-page .image-preview {
    min-height: 160px;
    max-height: 280px;
    overflow: auto;
}
.product-form-page.nortex-form-page .product-image-preview {
    max-height: 240px;
    object-fit: contain;
}
.product-form-page.nortex-form-page .ncm-autocomplete-group {
    position: relative;
}
.product-form-page.nortex-form-page .ncm-suggestions {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dbe7f6;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .14);
    max-height: 260px;
    overflow: auto;
}

@media (max-width: 1024px) {
    .product-form-page.nortex-form-page .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .product-form-page.nortex-form-page .form-grid {
        grid-template-columns: 1fr;
    }
    .product-form-page.nortex-form-page .product-tab-panel {
        padding: 14px;
    }
}

/* =====================================================
   Vendas/Orçamentos - padrão Nortex página completa
   ===================================================== */
.commercial-sale-form-page.nortex-form-page {
    max-width: 1240px;
    margin: 0 auto;
}

.commercial-sale-form-page .commercial-form-section {
    background: #ffffff;
    border: 1px solid #dbe6f5;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
}

.commercial-sale-form-page .commercial-form-section > h3,
.commercial-sale-form-page .commercial-payment-header h3 {
    margin: 0 0 14px;
    font-size: 15px;
    color: #12213f;
    font-weight: 800;
}

.commercial-sale-form-page .commercial-form .form-grid {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
}

.commercial-sale-form-page .commercial-add-row,
.commercial-sale-form-page .commercial-totals,
.commercial-sale-form-page .commercial-payment-line,
.commercial-sale-form-page .commercial-payment-card {
    box-shadow: none;
}

.commercial-sale-form-page .commercial-items-table {
    margin-top: 12px;
}

.commercial-sale-form-page .nortex-form-actions {
    margin-top: 18px;
}

.commercial-sales-filter-panel .filter-row {
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}

.commercial-sales-filter-panel .filter-field {
    min-width: 160px;
}

.commercial-sales-filter-panel .filter-field-search {
    min-width: 260px;
    flex: 1 1 320px;
}

.commercial-sales-filter-panel select,
.commercial-sales-filter-panel input {
    min-width: 0;
}

/* Corrige container residual do autocomplete NCM quando está fechado. */
.ncm-suggestions.hidden,
.ncm-suggestions:empty {
    display: none !important;
    border: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    box-shadow: none !important;
}

@media (max-width: 980px) {
    .commercial-sale-form-page .commercial-form-section {
        padding: 14px;
    }

    .commercial-sales-filter-panel .filter-field,
    .commercial-sales-filter-panel .filter-field-search,
    .commercial-sales-filter-panel .btn {
        width: 100%;
        flex: 1 1 100%;
    }
}


/* =====================================================
   Nortex ERP v91 - Menu lateral profissional por grupos
   ===================================================== */
.sidebar {
    background: linear-gradient(180deg, #111d32 0%, #17263d 52%, #111827 100%) !important;
    border-right: 1px solid rgba(255,255,255,.06);
    box-shadow: 10px 0 30px rgba(15, 23, 42, .10);
}
.sidebar-header {
    padding: 22px 18px 18px !important;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.nortex-sidebar-nav {
    padding: 14px 10px 24px !important;
    overflow-y: auto;
    scrollbar-width: thin;
}
.nortex-sidebar-nav ul,
.nortex-menu-root,
.nav-submenu {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.nortex-menu-root { display: flex; flex-direction: column; gap: 6px; }
.nav-item-single { margin-bottom: 4px; }
.nortex-menu-link,
.nav-group-toggle,
.nortex-sidebar-nav .nav-submenu a {
    width: 100%;
    min-height: 40px;
    display: flex !important;
    align-items: center;
    gap: 11px;
    border: 0;
    text-decoration: none;
    border-radius: 12px;
    color: #dbe7f7 !important;
    background: transparent;
    font-size: 13.5px;
    font-weight: 650;
    line-height: 1.2;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.nortex-menu-link,
.nav-group-toggle { padding: 11px 13px; }
.nav-group-toggle { justify-content: space-between; font-family: inherit; }
.nav-group-toggle span { display: inline-flex; align-items: center; gap: 11px; }
.nortex-menu-link i,
.nav-group-toggle i:first-child,
.nortex-sidebar-nav .nav-submenu a i {
    width: 18px;
    text-align: center;
    color: #a8bdd8;
    font-size: 14px;
}
.nav-chevron {
    width: auto !important;
    font-size: 11px !important;
    color: #8fa3be !important;
    transition: transform .2s ease;
}
.nav-group.is-open > .nav-group-toggle .nav-chevron { transform: rotate(180deg); }
.nortex-menu-link:hover,
.nav-group-toggle:hover,
.nortex-sidebar-nav .nav-submenu a:hover {
    background: rgba(59, 130, 246, .14) !important;
    color: #fff !important;
    transform: translateX(2px);
}
.nortex-menu-link.active,
.nortex-sidebar-nav .nav-submenu a.active {
    background: linear-gradient(135deg, #2f6df6, #2457d6) !important;
    color: #fff !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, .24);
}
.nortex-menu-link.active i,
.nortex-sidebar-nav .nav-submenu a.active i { color: #fff !important; }
.nav-group {
    display: block;
    margin: 2px 0 !important;
}
.nav-submenu {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-3px);
    transition: max-height .24s ease, opacity .18s ease, transform .18s ease;
}
.nav-group.is-open > .nav-submenu {
    max-height: 520px;
    opacity: 1;
    transform: translateY(0);
    padding: 4px 0 6px 0 !important;
}
.nortex-sidebar-nav .nav-submenu li { margin: 2px 0 0 0 !important; }
.nortex-sidebar-nav .nav-submenu a {
    min-height: 35px;
    padding: 9px 10px 9px 20px !important;
    margin-left: 8px;
    width: calc(100% - 8px);
    border-left: 1px solid rgba(148, 163, 184, .18);
    border-radius: 10px;
    color: #c8d6ea !important;
    font-size: 12.8px;
    font-weight: 560;
}
.nav-group[style*="display: none"] { display: none !important; }
.sidebar-nav .nav-section > span { display: none !important; }
@media (max-width: 768px) {
    .nortex-sidebar-nav { max-height: calc(100vh - 92px); }
    .nortex-menu-link,
    .nav-group-toggle { min-height: 44px; }
}

/* =====================================================
   Nortex ERP v92 - Menu superior suspenso premium
   ===================================================== */
body.nortex-horizontal-menu-page {
    --nortex-blue: #1677ff;
    --nortex-blue-dark: #0959d9;
    --nortex-ink: #0f1f3d;
    --nortex-muted: #64748b;
    --nortex-line: #e6edf7;
    background: #f6f9fd;
}
body.nortex-horizontal-menu-page .layout.nortex-app-layout {
    display: block !important;
    min-height: 100vh;
    background: linear-gradient(180deg, #f8fbff 0%, #f3f7fc 100%);
}
body.nortex-horizontal-menu-page .nortex-topbar {
    height: 68px;
    position: sticky;
    top: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 26px;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--nortex-line);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .055);
}
body.nortex-horizontal-menu-page .nortex-topbar-brand {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}
body.nortex-horizontal-menu-page .nortex-topbar-logo {
    height: 36px;
    width: auto;
    display: block;
}
body.nortex-horizontal-menu-page .nortex-mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid #dbe7f6;
    border-radius: 12px;
    background: #fff;
    color: var(--nortex-ink);
    cursor: pointer;
}
body.nortex-horizontal-menu-page .nortex-top-nav {
    flex: 1 1 auto;
    min-width: 0;
    overflow: visible !important;
    padding: 0 !important;
    max-height: none !important;
}
body.nortex-horizontal-menu-page .nortex-top-nav .nortex-menu-root {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 6px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
}
body.nortex-horizontal-menu-page .nortex-top-nav .nav-item-single,
body.nortex-horizontal-menu-page .nortex-top-nav .nav-section,
body.nortex-horizontal-menu-page .nortex-top-nav .nav-group {
    position: relative;
    margin: 0 !important;
    display: block !important;
}
body.nortex-horizontal-menu-page .nortex-top-nav .nortex-menu-link,
body.nortex-horizontal-menu-page .nortex-top-nav .nav-group-toggle {
    min-height: 42px;
    width: auto;
    border-radius: 12px;
    padding: 10px 14px !important;
    gap: 8px;
    background: transparent !important;
    color: var(--nortex-ink) !important;
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: -0.01em;
    box-shadow: none !important;
    transform: none !important;
    white-space: nowrap;
}
body.nortex-horizontal-menu-page .nortex-top-nav .nortex-menu-link i,
body.nortex-horizontal-menu-page .nortex-top-nav .nav-group-toggle i:first-child {
    color: var(--nortex-blue) !important;
    font-size: 14px;
}
body.nortex-horizontal-menu-page .nortex-top-nav .nav-chevron {
    color: #385278 !important;
    font-size: 10px !important;
}
body.nortex-horizontal-menu-page .nortex-top-nav .nortex-menu-link:hover,
body.nortex-horizontal-menu-page .nortex-top-nav .nav-group-toggle:hover,
body.nortex-horizontal-menu-page .nortex-top-nav .nav-group:hover > .nav-group-toggle,
body.nortex-horizontal-menu-page .nortex-top-nav .nortex-menu-link.active {
    background: #eef5ff !important;
    color: var(--nortex-blue-dark) !important;
}
body.nortex-horizontal-menu-page .nortex-top-nav .nav-submenu {
    position: absolute;
    left: 0;
    top: calc(100% + 10px);
    min-width: 236px;
    max-height: none !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    pointer-events: none;
    display: block !important;
    padding: 9px !important;
    margin: 0 !important;
    background: rgba(255,255,255,.98);
    border: 1px solid #e2ebf7;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .14);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
body.nortex-horizontal-menu-page .nortex-top-nav .nav-group:hover > .nav-submenu,
body.nortex-horizontal-menu-page .nortex-top-nav .nav-group:focus-within > .nav-submenu,
body.nortex-horizontal-menu-page .nortex-top-nav .nav-group.is-open > .nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
body.nortex-horizontal-menu-page .nortex-top-nav .nav-submenu li {
    margin: 0 !important;
    list-style: none;
}
body.nortex-horizontal-menu-page .nortex-top-nav .nav-submenu a {
    min-height: 38px;
    width: 100%;
    margin: 0 !important;
    padding: 10px 12px !important;
    border: 0 !important;
    border-radius: 10px;
    display: flex !important;
    align-items: center;
    gap: 10px;
    color: #1c2f50 !important;
    background: transparent !important;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.2;
    transform: none !important;
    box-shadow: none !important;
}
body.nortex-horizontal-menu-page .nortex-top-nav .nav-submenu a i {
    width: 18px;
    color: var(--nortex-blue) !important;
    font-size: 13px;
    text-align: center;
}
body.nortex-horizontal-menu-page .nortex-top-nav .nav-submenu a:hover,
body.nortex-horizontal-menu-page .nortex-top-nav .nav-submenu a.active {
    background: #f0f6ff !important;
    color: var(--nortex-blue-dark) !important;
}
body.nortex-horizontal-menu-page .nortex-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}
body.nortex-horizontal-menu-page .top-icon-btn {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #13284b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: background .16s ease, color .16s ease;
}
body.nortex-horizontal-menu-page .top-icon-btn:hover {
    background: #eef5ff;
    color: var(--nortex-blue-dark);
}
body.nortex-horizontal-menu-page .top-icon-btn.has-badge span {
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 17px;
    height: 17px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}
body.nortex-horizontal-menu-page .nortex-user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 10px;
    border-left: 1px solid #edf2f8;
}
body.nortex-horizontal-menu-page .nortex-user-profile .user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: linear-gradient(135deg, #eaf3ff, #d8eaff);
    color: var(--nortex-blue-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
body.nortex-horizontal-menu-page .nortex-user-profile .user-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
body.nortex-horizontal-menu-page .nortex-user-profile strong {
    font-size: 13px;
    color: #0f1f3d;
    font-weight: 650;
}
body.nortex-horizontal-menu-page .nortex-user-profile small {
    font-size: 11px;
    color: #64748b;
}
body.nortex-horizontal-menu-page .nortex-user-profile .logout-btn {
    border: 0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    padding: 6px;
}
body.nortex-horizontal-menu-page .nortex-main-content,
body.nortex-horizontal-menu-page .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    min-height: calc(100vh - 68px);
}
body.nortex-horizontal-menu-page .content-area {
    padding: 26px 28px 34px !important;
    max-width: 100% !important;
}
body.nortex-horizontal-menu-page #contentContainer {
    max-width: 100% !important;
}
body.nortex-horizontal-menu-page .modern-line-stroke {
    stroke: var(--nortex-blue) !important;
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
body.nortex-horizontal-menu-page .modern-line-area {
    fill: rgba(22, 119, 255, .10) !important;
}
@media (max-width: 1180px) {
    body.nortex-horizontal-menu-page .nortex-topbar { gap: 10px; padding: 0 16px; }
    body.nortex-horizontal-menu-page .nortex-top-nav .nortex-menu-link,
    body.nortex-horizontal-menu-page .nortex-top-nav .nav-group-toggle { padding: 10px 9px !important; font-size: 12.5px; }
    body.nortex-horizontal-menu-page .nortex-topbar-actions .top-icon-btn:nth-child(n+3) { display: none; }
}
@media (max-width: 880px) {
    body.nortex-horizontal-menu-page .nortex-mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
    body.nortex-horizontal-menu-page .nortex-topbar { flex-wrap: wrap; height: auto; min-height: 68px; padding-top: 10px; padding-bottom: 10px; }
    body.nortex-horizontal-menu-page .nortex-top-nav { order: 10; flex-basis: 100%; display: none; }
    body.nortex-horizontal-menu-page .nortex-top-nav.is-mobile-open { display: block; }
    body.nortex-horizontal-menu-page .nortex-top-nav .nortex-menu-root { flex-direction: column !important; align-items: stretch; }
    body.nortex-horizontal-menu-page .nortex-top-nav .nav-submenu { position: static; visibility: visible; opacity: 1; pointer-events: auto; transform: none; box-shadow: none; margin: 4px 0 8px !important; }
    body.nortex-horizontal-menu-page .nortex-topbar-actions { margin-left: auto; }
    body.nortex-horizontal-menu-page .nortex-user-profile .user-text { display: none; }
}


/* =====================================================
   Nortex ERP v93 - Sidebar premium azul claro
   Mantém menu lateral para comportar muitos módulos.
   ===================================================== */
body.nortex-sidebar-premium-page {
    --nortex-blue: #1677ff;
    --nortex-blue-dark: #0959d9;
    --nortex-sidebar-bg: #f6faff;
    --nortex-sidebar-bg-2: #eef6ff;
    --nortex-ink: #10213f;
    --nortex-muted: #64748b;
    --nortex-line: #dceafd;
    background: #f6f9fd;
}
body.nortex-sidebar-premium-page .layout.nortex-app-layout {
    background: linear-gradient(180deg, #f8fbff 0%, #f3f7fc 100%);
}
body.nortex-sidebar-premium-page .sidebar.nortex-premium-sidebar {
    width: 248px !important;
    min-width: 248px !important;
    background: linear-gradient(180deg, #f9fcff 0%, #eef6ff 58%, #e9f3ff 100%) !important;
    color: var(--nortex-ink) !important;
    border-right: 1px solid var(--nortex-line) !important;
    box-shadow: 12px 0 34px rgba(20, 88, 160, .08) !important;
}
body.nortex-sidebar-premium-page .sidebar-header {
    min-height: 72px;
    display: flex;
    align-items: center;
    padding: 18px 18px 14px !important;
    border-bottom: 1px solid #e2eefc !important;
}
body.nortex-sidebar-premium-page .nortex-sidebar-logo {
    height: 34px;
    width: auto;
    display: block;
}
body.nortex-sidebar-premium-page .nortex-sidebar-nav {
    padding: 14px 10px 22px !important;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
}
body.nortex-sidebar-premium-page .nortex-menu-root,
body.nortex-sidebar-premium-page .nav-submenu {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.nortex-sidebar-premium-page .nortex-menu-root {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
body.nortex-sidebar-premium-page .nortex-menu-link,
body.nortex-sidebar-premium-page .nav-group-toggle,
body.nortex-sidebar-premium-page .nortex-sidebar-nav .nav-submenu a {
    width: 100%;
    min-height: 40px;
    display: flex !important;
    align-items: center;
    gap: 11px;
    border: 0;
    text-decoration: none;
    border-radius: 13px;
    color: #23385c !important;
    background: transparent;
    font-size: 13.2px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
body.nortex-sidebar-premium-page .nortex-menu-link,
body.nortex-sidebar-premium-page .nav-group-toggle {
    padding: 11px 12px !important;
}
body.nortex-sidebar-premium-page .nav-group-toggle {
    justify-content: space-between;
    font-family: inherit;
}
body.nortex-sidebar-premium-page .nav-group-toggle span {
    display: inline-flex;
    align-items: center;
    gap: 11px;
}
body.nortex-sidebar-premium-page .nortex-menu-link i,
body.nortex-sidebar-premium-page .nav-group-toggle i:first-child,
body.nortex-sidebar-premium-page .nortex-sidebar-nav .nav-submenu a i {
    width: 18px;
    color: var(--nortex-blue) !important;
    font-size: 14px;
    text-align: center;
}
body.nortex-sidebar-premium-page .nav-chevron {
    width: auto !important;
    font-size: 10px !important;
    color: #58739a !important;
    transition: transform .2s ease;
}
body.nortex-sidebar-premium-page .nav-group.is-open > .nav-group-toggle .nav-chevron {
    transform: rotate(180deg);
}
body.nortex-sidebar-premium-page .nortex-menu-link:hover,
body.nortex-sidebar-premium-page .nav-group-toggle:hover,
body.nortex-sidebar-premium-page .nortex-sidebar-nav .nav-submenu a:hover {
    background: rgba(22, 119, 255, .09) !important;
    color: var(--nortex-blue-dark) !important;
    transform: translateX(2px);
}
body.nortex-sidebar-premium-page .nortex-menu-link.active,
body.nortex-sidebar-premium-page .nortex-sidebar-nav .nav-submenu a.active {
    background: linear-gradient(135deg, #1677ff, #0b63e6) !important;
    color: #fff !important;
    box-shadow: 0 12px 24px rgba(22, 119, 255, .22) !important;
}
body.nortex-sidebar-premium-page .nortex-menu-link.active i,
body.nortex-sidebar-premium-page .nortex-sidebar-nav .nav-submenu a.active i {
    color: #fff !important;
}
body.nortex-sidebar-premium-page .nav-submenu {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-3px);
    transition: max-height .24s ease, opacity .18s ease, transform .18s ease;
}
body.nortex-sidebar-premium-page .nav-group.is-open > .nav-submenu {
    max-height: 560px;
    opacity: 1;
    transform: translateY(0);
    padding: 4px 0 6px 0 !important;
}
body.nortex-sidebar-premium-page .nortex-sidebar-nav .nav-submenu a {
    min-height: 35px;
    padding: 9px 10px 9px 22px !important;
    margin-left: 8px !important;
    width: calc(100% - 8px) !important;
    border-left: 1px solid rgba(22, 119, 255, .14) !important;
    border-radius: 11px;
    color: #385278 !important;
    font-size: 12.8px;
    font-weight: 400;
}
body.nortex-sidebar-premium-page .sidebar-nav .nav-section > span { display: none !important; }
body.nortex-sidebar-premium-page .main-content {
    min-width: 0;
    background: linear-gradient(180deg, #f8fbff 0%, #f4f8fd 100%);
}
body.nortex-sidebar-premium-page .nortex-page-topbar {
    min-height: 66px;
    padding: 0 24px !important;
    border-bottom: 1px solid #e4edf8 !important;
    background: rgba(255,255,255,.92) !important;
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .04) !important;
}
body.nortex-sidebar-premium-page .toggle-sidebar {
    width: 40px;
    height: 40px;
    border: 1px solid #dceafd;
    border-radius: 12px;
    background: #fff;
    color: #10213f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
body.nortex-sidebar-premium-page .nortex-global-search {
    margin-left: 16px;
    width: min(420px, 42vw);
    height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: 1px solid #dceafd;
    border-radius: 13px;
    background: #fff;
    color: #637895;
}
body.nortex-sidebar-premium-page .nortex-global-search input {
    border: 0;
    outline: 0;
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: #10213f;
    background: transparent;
}
body.nortex-sidebar-premium-page .nortex-global-search span {
    font-size: 11px;
    color: #64748b;
    border: 1px solid #e2eaf6;
    border-radius: 7px;
    padding: 2px 6px;
    background: #f8fbff;
}
body.nortex-sidebar-premium-page .top-icon-btn {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #13284b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
}
body.nortex-sidebar-premium-page .top-icon-btn:hover {
    background: #eef5ff;
    color: var(--nortex-blue-dark);
}
body.nortex-sidebar-premium-page .top-icon-btn.has-badge span {
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 17px;
    height: 17px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}
body.nortex-sidebar-premium-page .nortex-user-profile .user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: linear-gradient(135deg, #eaf3ff, #d8eaff);
    color: var(--nortex-blue-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
body.nortex-sidebar-premium-page .nortex-user-profile .user-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
body.nortex-sidebar-premium-page .nortex-user-profile strong {
    font-size: 13px;
    color: #0f1f3d;
    font-weight: 650;
}
body.nortex-sidebar-premium-page .nortex-user-profile small {
    font-size: 11px;
    color: #64748b;
}
body.nortex-sidebar-premium-page .content-area {
    padding: 24px 26px 34px !important;
}
body.nortex-sidebar-premium-page .modern-line-stroke {
    stroke: var(--nortex-blue) !important;
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
body.nortex-sidebar-premium-page .modern-line-area {
    fill: rgba(22, 119, 255, .10) !important;
}
@media (max-width: 860px) {
    body.nortex-sidebar-premium-page .sidebar.nortex-premium-sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left .22s ease;
    }
    body.nortex-sidebar-premium-page .sidebar.nortex-premium-sidebar.active { left: 0; }
    body.nortex-sidebar-premium-page .nortex-global-search { display: none; }
    body.nortex-sidebar-premium-page .nortex-user-profile .user-text { display: none; }
}


/* Ordem de Serviço - ações de impressão */
.so-print-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 0 8px;
    border-top: 1px solid rgba(148, 163, 184, .22);
    margin-top: 14px;
}
.so-print-actions .btn {
    min-height: 38px;
}


.sidebar::-webkit-scrollbar {
    width: 6px !important;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.22) !important;
    border-radius: 20px !important;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent !important;
}


/* =====================================================
   Nortex ERP v95 - Sidebar violeta premium sem barras visíveis
   Padrão visual solicitado: menu totalmente violeta, textos/ícones brancos,
   tipografia sem negrito e indicador inferior de continuidade.
   ===================================================== */
body.nortex-sidebar-premium-page {
    --nortex-purple-sidebar: #5127e8;
    --nortex-purple-sidebar-2: #6134f2;
    --nortex-purple-sidebar-3: #3f18c9;
    --nortex-sidebar-text: rgba(255,255,255,.94);
    --nortex-sidebar-muted: rgba(255,255,255,.76);
    --nortex-sidebar-active: rgba(255,255,255,.14);
    --nortex-sidebar-active-border: rgba(255,255,255,.22);
    --nortex-sidebar-shadow: rgba(44, 21, 139, .28);
}

body.nortex-sidebar-premium-page .layout.nortex-app-layout {
    min-height: 100vh !important;
    height: 100vh !important;
    overflow: hidden !important;
    background: linear-gradient(180deg, #f8fbff 0%, #f3f7fc 100%) !important;
}

body.nortex-sidebar-premium-page .sidebar.nortex-premium-sidebar {
    position: relative !important;
    width: 248px !important;
    min-width: 248px !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
    border-right: 0 !important;
    color: var(--nortex-sidebar-text) !important;
    background:
        radial-gradient(circle at 28% 8%, rgba(255,255,255,.16), transparent 30%),
        linear-gradient(180deg, var(--nortex-purple-sidebar-2) 0%, var(--nortex-purple-sidebar) 48%, var(--nortex-purple-sidebar-3) 100%) !important;
    box-shadow: 14px 0 34px var(--nortex-sidebar-shadow) !important;
}

body.nortex-sidebar-premium-page .sidebar.nortex-premium-sidebar::after {
    content: "\f078";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    opacity: .95;
    pointer-events: none;
    text-shadow: 0 8px 18px rgba(0,0,0,.22);
}

body.nortex-sidebar-premium-page .sidebar-header {
    min-height: 84px !important;
    padding: 24px 22px 18px !important;
    border-bottom: 0 !important;
    background: transparent !important;
}

body.nortex-sidebar-premium-page .nortex-sidebar-logo {
    height: 38px !important;
    max-width: 176px !important;
    object-fit: contain !important;
    filter: brightness(0) invert(1) !important;
}

body.nortex-sidebar-premium-page .nortex-sidebar-nav {
    height: calc(100vh - 84px) !important;
    max-height: calc(100vh - 84px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 20px 16px 74px !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
body.nortex-sidebar-premium-page .nortex-sidebar-nav::-webkit-scrollbar,
body.nortex-sidebar-premium-page .sidebar.nortex-premium-sidebar::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

body.nortex-sidebar-premium-page .nortex-menu-root {
    gap: 10px !important;
}

body.nortex-sidebar-premium-page .nortex-menu-link,
body.nortex-sidebar-premium-page .nav-group-toggle,
body.nortex-sidebar-premium-page .nortex-sidebar-nav .nav-submenu a {
    min-height: 44px !important;
    color: var(--nortex-sidebar-text) !important;
    background: transparent !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
}

body.nortex-sidebar-premium-page .nortex-menu-link,
body.nortex-sidebar-premium-page .nav-group-toggle {
    padding: 12px 14px !important;
    border-radius: 14px !important;
}

body.nortex-sidebar-premium-page .nav-group-toggle span {
    font-weight: 400 !important;
    color: var(--nortex-sidebar-text) !important;
}

body.nortex-sidebar-premium-page .nortex-menu-link i,
body.nortex-sidebar-premium-page .nav-group-toggle i:first-child,
body.nortex-sidebar-premium-page .nortex-sidebar-nav .nav-submenu a i,
body.nortex-sidebar-premium-page .nav-chevron {
    color: #fff !important;
    opacity: .96 !important;
}

body.nortex-sidebar-premium-page .nortex-menu-link i,
body.nortex-sidebar-premium-page .nav-group-toggle i:first-child {
    width: 24px !important;
    min-width: 24px !important;
    font-size: 18px !important;
}

body.nortex-sidebar-premium-page .nav-chevron {
    margin-left: auto !important;
    font-size: 12px !important;
}

body.nortex-sidebar-premium-page .nortex-menu-link:hover,
body.nortex-sidebar-premium-page .nav-group-toggle:hover,
body.nortex-sidebar-premium-page .nortex-sidebar-nav .nav-submenu a:hover {
    color: #fff !important;
    background: rgba(255,255,255,.10) !important;
    transform: none !important;
}

body.nortex-sidebar-premium-page .nortex-menu-link.active,
body.nortex-sidebar-premium-page .nortex-sidebar-nav .nav-submenu a.active {
    color: #fff !important;
    background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.10)) !important;
    border: 1px solid var(--nortex-sidebar-active-border) !important;
    box-shadow: 0 12px 26px rgba(26, 8, 96, .22) !important;
}

body.nortex-sidebar-premium-page .nav-group.is-open > .nav-group-toggle {
    background: rgba(255,255,255,.06) !important;
}

body.nortex-sidebar-premium-page .nav-submenu {
    margin-top: 4px !important;
}

body.nortex-sidebar-premium-page .nav-group.is-open > .nav-submenu {
    padding: 6px 0 8px 0 !important;
}

body.nortex-sidebar-premium-page .nortex-sidebar-nav .nav-submenu a {
    min-height: 42px !important;
    margin: 4px 0 0 0 !important;
    width: 100% !important;
    padding: 11px 14px 11px 42px !important;
    border-left: 0 !important;
    border-radius: 13px !important;
    font-size: 13.5px !important;
    color: var(--nortex-sidebar-text) !important;
}

body.nortex-sidebar-premium-page .nortex-sidebar-nav .nav-submenu a i {
    width: 20px !important;
    min-width: 20px !important;
    font-size: 16px !important;
}

body.nortex-sidebar-premium-page .main-content {
    height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f7fb 100%) !important;
}

body.nortex-sidebar-premium-page .toggle-sidebar {
    color: var(--nortex-purple-sidebar) !important;
    border-color: #e1e8f5 !important;
}

@media (max-width: 860px) {
    body.nortex-sidebar-premium-page .layout.nortex-app-layout {
        height: auto !important;
        overflow: visible !important;
    }
    body.nortex-sidebar-premium-page .sidebar.nortex-premium-sidebar {
        position: fixed !important;
        left: -260px;
        top: 0;
        height: 100vh !important;
        z-index: 1000;
        transition: left .22s ease;
    }
    body.nortex-sidebar-premium-page .sidebar.nortex-premium-sidebar.active { left: 0; }
    body.nortex-sidebar-premium-page .main-content {
        height: auto !important;
        min-height: 100vh !important;
    }
}

/* =====================================================
   Nortex ERP v97 - Restauração do menu lateral premium dark
   Objetivo: recuperar o padrão visual escuro/enterprise do menu,
   sem distorcer o layout principal e sem barras duplas de rolagem.
   ===================================================== */
body.nortex-sidebar-premium-page {
    --nx-sidebar-bg-1: #0f172a;
    --nx-sidebar-bg-2: #111827;
    --nx-sidebar-bg-3: #172033;
    --nx-sidebar-line: rgba(255,255,255,.07);
    --nx-sidebar-text: rgba(255,255,255,.90);
    --nx-sidebar-muted: rgba(226,232,240,.64);
    --nx-sidebar-hover: rgba(59,130,246,.12);
    --nx-sidebar-active-1: #3b82f6;
    --nx-sidebar-active-2: #2563eb;
}

body.nortex-sidebar-premium-page .layout.nortex-app-layout {
    min-height: 100vh !important;
    height: auto !important;
    overflow: visible !important;
    background: #f8fafc !important;
}

body.nortex-sidebar-premium-page .sidebar.nortex-premium-sidebar {
    width: 248px !important;
    min-width: 248px !important;
    height: 100vh !important;
    max-height: 100vh !important;
    position: sticky !important;
    top: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    color: var(--nx-sidebar-text) !important;
    border-right: 1px solid var(--nx-sidebar-line) !important;
    background:
        radial-gradient(circle at 10% 0%, rgba(59,130,246,.18), transparent 26%),
        linear-gradient(180deg, var(--nx-sidebar-bg-1) 0%, var(--nx-sidebar-bg-3) 48%, var(--nx-sidebar-bg-2) 100%) !important;
    box-shadow: 10px 0 32px rgba(15,23,42,.10) !important;
}

body.nortex-sidebar-premium-page .sidebar.nortex-premium-sidebar::after {
    display: none !important;
    content: none !important;
}

body.nortex-sidebar-premium-page .sidebar-header {
    min-height: 72px !important;
    padding: 20px 18px 16px !important;
    display: flex !important;
    align-items: center !important;
    border-bottom: 1px solid var(--nx-sidebar-line) !important;
    background: transparent !important;
}

body.nortex-sidebar-premium-page .nortex-sidebar-logo {
    height: 34px !important;
    max-width: 180px !important;
    object-fit: contain !important;
    filter: none !important;
}

body.nortex-sidebar-premium-page .nortex-sidebar-nav {
    flex: 1 1 auto !important;
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 14px 10px 26px !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(148,163,184,.28) transparent !important;
}

body.nortex-sidebar-premium-page .nortex-sidebar-nav::-webkit-scrollbar {
    width: 6px !important;
    display: block !important;
}
body.nortex-sidebar-premium-page .nortex-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,.26) !important;
    border-radius: 999px !important;
}
body.nortex-sidebar-premium-page .nortex-sidebar-nav::-webkit-scrollbar-track {
    background: transparent !important;
}

body.nortex-sidebar-premium-page .nortex-menu-root {
    gap: 6px !important;
}

body.nortex-sidebar-premium-page .nortex-menu-link,
body.nortex-sidebar-premium-page .nav-group-toggle,
body.nortex-sidebar-premium-page .nortex-sidebar-nav .nav-submenu a {
    width: 100% !important;
    min-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    gap: 11px !important;
    border: 0 !important;
    border-radius: 12px !important;
    color: var(--nx-sidebar-text) !important;
    background: transparent !important;
    text-decoration: none !important;
    font-size: 13.4px !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
    transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease !important;
}

body.nortex-sidebar-premium-page .nortex-menu-link,
body.nortex-sidebar-premium-page .nav-group-toggle {
    padding: 11px 12px !important;
}

body.nortex-sidebar-premium-page .nav-group-toggle {
    justify-content: space-between !important;
    font-family: inherit !important;
}

body.nortex-sidebar-premium-page .nav-group-toggle span {
    display: inline-flex !important;
    align-items: center !important;
    gap: 11px !important;
    color: var(--nx-sidebar-text) !important;
    font-weight: 400 !important;
}

body.nortex-sidebar-premium-page .nortex-menu-link i,
body.nortex-sidebar-premium-page .nav-group-toggle i:first-child,
body.nortex-sidebar-premium-page .nortex-sidebar-nav .nav-submenu a i {
    width: 18px !important;
    min-width: 18px !important;
    text-align: center !important;
    color: rgba(255,255,255,.82) !important;
    font-size: 14px !important;
    opacity: 1 !important;
}

body.nortex-sidebar-premium-page .nav-chevron {
    width: auto !important;
    margin-left: auto !important;
    font-size: 10px !important;
    color: var(--nx-sidebar-muted) !important;
    opacity: 1 !important;
    transition: transform .2s ease !important;
}

body.nortex-sidebar-premium-page .nav-group.is-open > .nav-group-toggle .nav-chevron {
    transform: rotate(180deg) !important;
}

body.nortex-sidebar-premium-page .nortex-menu-link:hover,
body.nortex-sidebar-premium-page .nav-group-toggle:hover,
body.nortex-sidebar-premium-page .nortex-sidebar-nav .nav-submenu a:hover {
    color: #fff !important;
    background: var(--nx-sidebar-hover) !important;
    transform: translateX(2px) !important;
}

body.nortex-sidebar-premium-page .nortex-menu-link.active,
body.nortex-sidebar-premium-page .nortex-sidebar-nav .nav-submenu a.active {
    color: #fff !important;
    background: linear-gradient(135deg, var(--nx-sidebar-active-1), var(--nx-sidebar-active-2)) !important;
    border: 0 !important;
    box-shadow: 0 12px 26px rgba(37,99,235,.28) !important;
}

body.nortex-sidebar-premium-page .nortex-menu-link.active i,
body.nortex-sidebar-premium-page .nortex-sidebar-nav .nav-submenu a.active i {
    color: #fff !important;
}

body.nortex-sidebar-premium-page .nav-group.is-open > .nav-group-toggle {
    background: transparent !important;
}

body.nortex-sidebar-premium-page .nav-submenu {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0 !important;
    transform: translateY(-3px);
    transition: max-height .24s ease, opacity .18s ease, transform .18s ease !important;
}

body.nortex-sidebar-premium-page .nav-group.is-open > .nav-submenu {
    max-height: 560px !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    padding: 4px 0 6px !important;
}

body.nortex-sidebar-premium-page .nortex-sidebar-nav .nav-submenu a {
    min-height: 35px !important;
    margin: 2px 0 0 8px !important;
    width: calc(100% - 8px) !important;
    padding: 9px 10px 9px 20px !important;
    border-left: 1px solid rgba(148,163,184,.16) !important;
    border-radius: 10px !important;
    color: rgba(226,232,240,.82) !important;
    font-size: 12.8px !important;
    font-weight: 400 !important;
}

body.nortex-sidebar-premium-page .main-content {
    min-width: 0 !important;
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
    background: #f8fafc !important;
}

body.nortex-sidebar-premium-page .toggle-sidebar {
    color: #0f172a !important;
    border-color: #e2e8f0 !important;
    background: #fff !important;
}

@media (max-width: 860px) {
    body.nortex-sidebar-premium-page .sidebar.nortex-premium-sidebar {
        position: fixed !important;
        left: -260px !important;
        top: 0 !important;
        height: 100vh !important;
        z-index: 1000 !important;
        transition: left .22s ease !important;
    }
    body.nortex-sidebar-premium-page .sidebar.nortex-premium-sidebar.active {
        left: 0 !important;
    }
}

/* ==========================================================
   NORTEX ERP — V98 ENTERPRISE TEAL DESIGN SYSTEM
   Base visual inspirada no novo layout aprovado pelo Hugo.
   Aplicar este padrão em todas as telas novas: dashboard,
   cadastros, financeiro, tabelas, formulários e modais.
   ========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --nx-bg: #F4F6F9;
    --nx-surface: #FFFFFF;
    --nx-surface-soft: #F8FAFC;
    --nx-sidebar: #1A1D23;
    --nx-sidebar-2: #11151B;
    --nx-sidebar-hover: rgba(255, 255, 255, 0.065);
    --nx-accent: #00BFA5;
    --nx-accent-hover: #00A892;
    --nx-accent-soft: rgba(0, 191, 165, 0.12);
    --nx-border: #E6EAF0;
    --nx-border-strong: #D8DEE8;
    --nx-text: #0F172A;
    --nx-muted: #64748B;
    --nx-muted-2: #94A3B8;
    --nx-success: #22C55E;
    --nx-warning: #F59E0B;
    --nx-danger: #EF4444;
    --nx-info: #3882F6;
    --nx-radius-sm: 10px;
    --nx-radius-md: 14px;
    --nx-radius-lg: 18px;
    --nx-shadow-sm: 0 4px 14px rgba(15, 23, 42, .04);
    --nx-shadow-md: 0 14px 34px rgba(15, 23, 42, .075);
    --primary: var(--nx-accent);
    --primary-light: #2DD4BF;
    --primary-dark: var(--nx-accent-hover);
    --brand-blue-600: var(--nx-accent);
    --brand-blue-900: var(--nx-sidebar);
    --brand-blue-800: #252A33;
    --brand-blue-50: #F4FBFA;
    --brand-text: var(--nx-text);
    --brand-muted: var(--nx-muted);
    --surface: var(--nx-surface);
    --surface-soft: var(--nx-surface-soft);
    --shadow-soft: var(--nx-shadow-sm);
    --radius-lg: var(--nx-radius-lg);
    --radius-md: var(--nx-radius-md);
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
    background: var(--nx-bg) !important;
    color: var(--nx-text) !important;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.layout, .nortex-app-layout { background: var(--nx-bg) !important; }
.content-area { background: var(--nx-bg) !important; padding: 22px 28px 34px !important; }
.main-content, .nortex-main-content { background: var(--nx-bg) !important; }

/* Sidebar enterprise escura */
body.nortex-sidebar-premium-page .sidebar.nortex-premium-sidebar,
.sidebar {
    background: radial-gradient(circle at top left, rgba(0,191,165,.09), transparent 35%), linear-gradient(180deg, var(--nx-sidebar), var(--nx-sidebar-2)) !important;
    color: #fff !important;
    border-right: 1px solid rgba(255,255,255,.06) !important;
    box-shadow: 14px 0 32px rgba(15, 23, 42, .12) !important;
}

body.nortex-sidebar-premium-page .sidebar-header {
    border-bottom: 1px solid rgba(255,255,255,.06) !important;
    padding: 22px 18px 18px !important;
}

body.nortex-sidebar-premium-page .nortex-sidebar-logo {
    max-width: 176px !important;
    object-fit: contain !important;
}

body.nortex-sidebar-premium-page .nortex-menu-link,
body.nortex-sidebar-premium-page .nav-group-toggle,
body.nortex-sidebar-premium-page .nortex-sidebar-nav .nav-submenu a {
    color: rgba(255,255,255,.82) !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
    border-radius: 12px !important;
}

body.nortex-sidebar-premium-page .nortex-menu-link i,
body.nortex-sidebar-premium-page .nav-group-toggle i,
body.nortex-sidebar-premium-page .nortex-sidebar-nav .nav-submenu a i {
    color: rgba(255,255,255,.76) !important;
}

body.nortex-sidebar-premium-page .nortex-menu-link:hover,
body.nortex-sidebar-premium-page .nav-group-toggle:hover,
body.nortex-sidebar-premium-page .nortex-sidebar-nav .nav-submenu a:hover {
    background: var(--nx-sidebar-hover) !important;
    color: #fff !important;
    transform: translateX(2px) !important;
}

body.nortex-sidebar-premium-page .nortex-menu-link.active,
body.nortex-sidebar-premium-page .nortex-sidebar-nav .nav-submenu a.active,
body.nortex-sidebar-premium-page .nav-group.is-open > .nav-group-toggle {
    background: linear-gradient(90deg, rgba(0,191,165,.18), rgba(255,255,255,.055)) !important;
    color: #fff !important;
    box-shadow: inset 3px 0 0 var(--nx-accent), 0 10px 20px rgba(0,0,0,.12) !important;
}

body.nortex-sidebar-premium-page .nortex-menu-link.active i,
body.nortex-sidebar-premium-page .nortex-sidebar-nav .nav-submenu a.active i,
body.nortex-sidebar-premium-page .nav-group.is-open > .nav-group-toggle i:first-child {
    color: var(--nx-accent) !important;
}

body.nortex-sidebar-premium-page .nortex-sidebar-nav .nav-submenu a {
    border-left: 1px solid rgba(0,191,165,.18) !important;
    background: transparent !important;
    color: rgba(255,255,255,.70) !important;
}

/* Topbar */
.header, .nortex-page-topbar {
    height: 72px !important;
    background: rgba(255,255,255,.92) !important;
    border-bottom: 1px solid var(--nx-border) !important;
    box-shadow: 0 1px 0 rgba(15,23,42,.03) !important;
    backdrop-filter: blur(14px) !important;
}

.nortex-global-search {
    border: 1px solid var(--nx-border) !important;
    background: #fff !important;
    border-radius: 14px !important;
    box-shadow: var(--nx-shadow-sm) !important;
}

.nortex-global-search input { font-family: inherit !important; }
.top-icon-btn, .toggle-sidebar {
    border: 1px solid var(--nx-border) !important;
    background: #fff !important;
    border-radius: 12px !important;
    color: var(--nx-text) !important;
}
.top-icon-btn.has-badge span { background: var(--nx-accent) !important; }

/* Botões */
.btn {
    border-radius: 12px !important;
    font-family: inherit !important;
    font-weight: 500 !important;
    min-height: 38px;
    box-shadow: none !important;
}
.btn-primary, .btn-success {
    background: linear-gradient(135deg, var(--nx-accent), var(--nx-accent-hover)) !important;
    color: #fff !important;
    border: 1px solid rgba(0,191,165,.18) !important;
}
.btn-primary:hover:not(:disabled), .btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--nx-accent-hover), #008B7A) !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0,191,165,.18) !important;
}
.btn-secondary, .btn-outline, .btn-small:not(.btn-danger):not(.btn-primary) {
    background: #fff !important;
    color: var(--nx-text) !important;
    border: 1px solid var(--nx-border) !important;
}
.btn-danger { background: #EF4444 !important; color: #fff !important; }

/* Cards e blocos */
.card, .dashboard-panel, .dashboard-kpi-card, .summary-card,
.table-panel, .client-detail-card, .cash-report-card,
.cash-summary-card, .cash-action-card, .import-client-card,
.import-result-card, .loading-card, .form-grid,
.nortex-form-section, .client-profile-card {
    background: var(--nx-surface) !important;
    border: 1px solid var(--nx-border) !important;
    border-radius: var(--nx-radius-lg) !important;
    box-shadow: var(--nx-shadow-sm) !important;
}
.card:hover, .dashboard-panel:hover, .dashboard-kpi-card:hover, .summary-card:hover, .table-panel:hover {
    box-shadow: var(--nx-shadow-md) !important;
}
.card-header { border-bottom: 1px solid var(--nx-border) !important; }
.card-header h2, .page-title, .dashboard-hero h1 { color: var(--nx-text) !important; font-weight: 700 !important; }

/* Inputs/formulários */
.form-group label, .nx-label, label {
    color: #334155 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="file"],
.form-group select,
.form-group textarea,
input[type="text"], input[type="search"], input[type="email"], input[type="number"], input[type="date"], select, textarea,
.table-search {
    border: 1px solid var(--nx-border-strong) !important;
    background: #fff !important;
    color: var(--nx-text) !important;
    border-radius: 12px !important;
    min-height: 42px !important;
    font-family: inherit !important;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease !important;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus,
input:focus, select:focus, textarea:focus, .table-search:focus {
    border-color: var(--nx-accent) !important;
    box-shadow: 0 0 0 4px rgba(0,191,165,.12) !important;
    outline: none !important;
}

/* Tabelas premium minimalistas */
.table-panel {
    overflow: hidden !important;
    margin-top: 18px !important;
}
.table-toolbar {
    background: #fff !important;
    border-bottom: 1px solid var(--nx-border) !important;
    padding: 18px 20px !important;
}
.table-counter { color: var(--nx-muted) !important; font-weight: 500 !important; }
.table {
    border-collapse: collapse !important;
    font-size: 13px !important;
    background: #fff !important;
}
.table thead { background: #F8FAFC !important; }
.table th {
    color: #334155 !important;
    background: #F8FAFC !important;
    border-bottom: 1px solid var(--nx-border) !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: .035em !important;
    font-weight: 700 !important;
    padding: 14px 18px !important;
}
.table td {
    border-right: 0 !important;
    border-bottom: 1px solid var(--nx-border) !important;
    padding: 15px 18px !important;
    background: #fff !important;
    color: #334155 !important;
}
.table tbody tr:nth-child(odd), .table tbody tr:nth-child(even) { background: #fff !important; }
.table tbody tr:hover td {
    background: #F9FEFD !important;
    box-shadow: inset 3px 0 0 var(--nx-accent) !important;
}
.table-actions .btn, .action-btn, .icon-btn {
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0 !important;
    justify-content: center;
    border-radius: 10px !important;
    background: #fff !important;
    border: 1px solid var(--nx-border) !important;
    color: #475569 !important;
}
.table-actions .btn:hover, .action-btn:hover, .icon-btn:hover {
    color: var(--nx-accent) !important;
    border-color: rgba(0,191,165,.35) !important;
    background: var(--nx-accent-soft) !important;
}

/* Badges */
.badge, .status-badge, .label, .tag {
    border-radius: 999px !important;
    padding: 5px 10px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    border: 0 !important;
}
.badge-success, .status-active, .status-paid, .status-open, .badge.active, .badge.approved {
    background: rgba(34,197,94,.12) !important;
    color: #14804A !important;
}
.badge-warning, .status-pending {
    background: rgba(245,158,11,.14) !important;
    color: #B45309 !important;
}
.badge-danger, .status-inactive, .status-overdue {
    background: rgba(239,68,68,.12) !important;
    color: #DC2626 !important;
}

/* Dashboard */
.executive-dashboard { background: transparent !important; }
.dashboard-kpi-card::before { background: var(--nx-accent) !important; }
.dashboard-kpi-icon, .kpi-icon { background: var(--nx-accent-soft) !important; color: var(--nx-accent) !important; }
.dashboard-panel h2, .dashboard-panel h3 { color: var(--nx-text) !important; font-weight: 700 !important; }

/* Modais enquanto não forem convertidos em páginas */
.modal-content {
    border-radius: 20px !important;
    border: 1px solid var(--nx-border) !important;
    box-shadow: 0 24px 70px rgba(15,23,42,.20) !important;
}
.modal-close { color: var(--nx-muted) !important; }
.modal-actions, .form-actions { border-top: 1px solid var(--nx-border) !important; }

/* Paginação */
.pagination button, .page-btn, .pagination a {
    border: 1px solid var(--nx-border) !important;
    background: #fff !important;
    color: var(--nx-text) !important;
    border-radius: 10px !important;
}
.pagination button.active, .page-btn.active, .pagination a.active {
    background: var(--nx-accent) !important;
    border-color: var(--nx-accent) !important;
    color: #fff !important;
}

@media (max-width: 900px) {
    .content-area { padding: 16px !important; }
    .header, .nortex-page-topbar { height: auto !important; min-height: 66px !important; }
}

/* =========================================================
   Nortex v99 - Clientes no padrão Enterprise Teal
   Mantém a lógica existente e altera somente a apresentação.
   ========================================================= */
.nx-enterprise-page {
    --nx-teal: #00BFA5;
    --nx-teal-dark: #00A991;
    --nx-teal-soft: rgba(0, 191, 165, .10);
    --nx-bg: #F4F6F9;
    --nx-card: #FFFFFF;
    --nx-border-soft: #E6EAF0;
    --nx-text-main: #0F172A;
    --nx-text-muted: #64748B;
    background: transparent;
}

.nx-page-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 22px;
}

.nx-page-hero h1 {
    margin: 2px 0 4px;
    color: var(--nx-text-main);
    font-size: 26px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.nx-page-hero p {
    margin: 0;
    color: var(--nx-text-muted);
    font-size: 14px;
}

.nx-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--nx-teal);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: .12em;
    font-weight: 700;
}

.nx-page-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.nx-btn {
    height: 42px !important;
    border-radius: 12px !important;
    padding: 0 16px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600 !important;
    font-size: 13px !important;
    box-shadow: none !important;
    transition: all .18s ease;
}

.nx-btn-primary {
    background: var(--nx-teal) !important;
    border-color: var(--nx-teal) !important;
    color: #fff !important;
}

.nx-btn-primary:hover {
    background: var(--nx-teal-dark) !important;
    border-color: var(--nx-teal-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(0, 191, 165, .22) !important;
}

.nx-btn-outline {
    background: #fff !important;
    border: 1px solid var(--nx-border-soft) !important;
    color: #334155 !important;
}

.nx-btn-outline:hover {
    border-color: rgba(0, 191, 165, .38) !important;
    color: var(--nx-teal-dark) !important;
    background: #F9FFFE !important;
}

.nx-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.nx-kpi-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 96px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--nx-border-soft);
    border-radius: 16px;
    box-shadow: 0 14px 38px rgba(15, 23, 42, .055);
}

.nx-kpi-card span {
    display: block;
    color: #64748B;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}

.nx-kpi-card strong {
    display: block;
    color: #0F172A;
    font-size: 22px;
    font-weight: 750;
    letter-spacing: -0.03em;
    margin-bottom: 3px;
}

.nx-kpi-card small {
    color: #64748B;
    font-size: 12px;
}

.nx-kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--nx-teal);
    background: var(--nx-teal-soft);
    font-size: 20px;
    flex: 0 0 auto;
}

.nx-kpi-icon-blue { color: #2563EB; background: rgba(37, 99, 235, .10); }
.nx-kpi-icon-danger { color: #EF4444; background: rgba(239, 68, 68, .10); }
.nx-kpi-icon-purple { color: #7C3AED; background: rgba(124, 58, 237, .10); }
.nx-kpi-icon-success { color: #16A34A; background: rgba(22, 163, 74, .10); }
.nx-text-danger { color: #DC2626 !important; }

.nx-panel {
    background: #fff;
    border: 1px solid var(--nx-border-soft);
    border-radius: 18px;
    box-shadow: 0 16px 42px rgba(15, 23, 42, .055);
}

.nx-filter-panel {
    padding: 18px;
    margin-bottom: 22px;
}

.nx-filter-row {
    display: grid;
    grid-template-columns: minmax(280px, 1.6fr) minmax(150px, .75fr) minmax(190px, .9fr) minmax(140px, .7fr) minmax(110px, .55fr);
    gap: 14px;
    align-items: end;
}

.nx-search-field {
    position: relative;
}

.nx-search-field i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    pointer-events: none;
}

.nx-search-field input,
.nx-select-field select {
    width: 100%;
    height: 44px;
    border: 1px solid #DDE5EF;
    border-radius: 12px;
    background: #fff;
    color: #0F172A;
    font-size: 13px;
    outline: none;
    transition: all .18s ease;
}

.nx-search-field input {
    padding: 0 14px 0 42px;
}

.nx-select-field label {
    display: block;
    margin-bottom: 6px;
    color: #475569;
    font-size: 12px;
    font-weight: 650;
}

.nx-select-field select {
    padding: 0 12px;
}

.nx-search-field input:focus,
.nx-select-field select:focus {
    border-color: rgba(0, 191, 165, .65);
    box-shadow: 0 0 0 4px rgba(0, 191, 165, .10);
}

.nx-filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.nx-table-panel {
    overflow: hidden;
}

.nx-table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    color: #64748B;
    font-size: 13px;
    border-bottom: 1px solid var(--nx-border-soft);
}

.nx-table-toolbar strong {
    color: #0F172A;
    font-weight: 700;
}

.nx-table {
    margin: 0 !important;
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #fff !important;
}

.nx-table thead th {
    height: 52px;
    padding: 14px 18px !important;
    background: #FAFBFD !important;
    border-bottom: 1px solid var(--nx-border-soft) !important;
    color: #334155 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: .01em !important;
}

.nx-table tbody td {
    padding: 16px 18px !important;
    border-bottom: 1px solid #EEF2F7 !important;
    color: #334155 !important;
    background: #fff !important;
    vertical-align: middle;
    font-size: 13px;
}

.nx-table tbody tr {
    cursor: pointer;
    transition: background .16s ease, box-shadow .16s ease;
}

.nx-table tbody tr:hover td {
    background: #F8FFFD !important;
    box-shadow: none !important;
}

.nx-table tbody tr:hover td:first-child {
    box-shadow: inset 3px 0 0 var(--nx-teal) !important;
}

.nx-entity-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 260px;
}

.nx-entity-cell strong {
    display: block;
    color: #0F172A;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 3px;
}

.nx-entity-cell small {
    display: block;
    color: #64748B;
    font-size: 12px;
    line-height: 1.25;
}

.nx-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--nx-teal-soft);
    color: var(--nx-teal-dark);
    font-weight: 750;
    flex: 0 0 auto;
}

.nx-type-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    background: #F1F5F9;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
}

.nx-row-actions {
    justify-content: flex-end;
    gap: 8px;
}

.nx-row-actions .action-icon-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 11px !important;
    background: #fff !important;
    border: 1px solid #DDE5EF !important;
    color: #64748B !important;
    box-shadow: none !important;
}

.nx-row-actions .action-icon-btn:hover {
    color: var(--nx-teal-dark) !important;
    border-color: rgba(0, 191, 165, .45) !important;
    background: #F8FFFD !important;
}

.nx-table-actions-col { text-align: right !important; }
.nx-table .table-actions { display: flex; }

.nx-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 18px;
    border-top: 1px solid var(--nx-border-soft);
    background: #fff;
}

.nx-page-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #DDE5EF;
    background: #fff;
    color: #334155;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    transition: all .18s ease;
}

.nx-page-btn:hover:not(:disabled),
.nx-page-btn.active {
    background: var(--nx-teal);
    border-color: var(--nx-teal);
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 191, 165, .20);
}

.nx-page-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.nx-page-dots {
    color: #94A3B8;
    padding: 0 4px;
}

.clients-table .client-inactive-row td {
    color: #94A3B8 !important;
    background: #FBFCFE !important;
}

.clients-table .status-completed {
    background: rgba(0, 191, 165, .11) !important;
    color: #008F7C !important;
}

.clients-table .status-cancelled {
    background: rgba(239, 68, 68, .11) !important;
    color: #DC2626 !important;
}

@media (max-width: 1280px) {
    .nx-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .nx-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .nx-page-hero { flex-direction: column; }
    .nx-page-actions { justify-content: flex-start; width: 100%; }
    .nx-kpi-grid { grid-template-columns: 1fr; }
    .nx-filter-row { grid-template-columns: 1fr; }
    .nx-table-panel { overflow-x: auto; }
    .nx-table { min-width: 980px; }
}

/* =========================================================
   Nortex v100 - Ajustes Clientes Enterprise Teal
   - Reduz peso das fontes dos cards de indicadores
   - Corrige espaçamento da paginação da listagem de clientes
   ========================================================= */
.nx-kpi-card span,
.nx-kpi-card small,
.clients-summary-grid .summary-card span,
.clients-summary-grid .summary-card small,
.summary-card span,
.summary-card small {
    font-weight: 400 !important;
}

.nx-kpi-card strong,
.clients-summary-grid .summary-card strong,
.summary-card strong {
    font-weight: 500 !important;
    letter-spacing: -0.01em !important;
}

.nx-kpi-card .nx-text-danger,
.summary-card .text-danger,
.clients-summary-grid .summary-card .text-danger {
    font-weight: 500 !important;
}

.nx-pagination,
.clients-pagination-bar .nx-pagination,
.pagination-bar.nx-pagination {
    justify-content: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    width: 100% !important;
}

.nx-page-btn,
.pagination .nx-page-btn,
.clients-pagination-bar .nx-page-btn {
    flex: 0 0 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    font-weight: 500 !important;
}

.nx-page-dots,
.clients-pagination-bar .nx-page-dots {
    flex: 0 0 auto !important;
    padding: 0 6px !important;
    margin: 0 !important;
}

/* =========================================================
   Nortex v101 - Produtos no padrão Enterprise Teal
   - Organiza listagem, indicadores, filtros, tabela e paginação
   - Mantém consistência com a tela de Clientes v100
   ========================================================= */
.products-enterprise-page .nx-products-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.products-enterprise-page .products-filter-row {
    grid-template-columns: minmax(320px, 1fr) minmax(180px, 240px) minmax(120px, 160px);
}

.products-enterprise-page .products-page-actions .nx-btn,
.products-enterprise-page .products-filter-panel .nx-btn {
    font-weight: 500 !important;
}

.products-enterprise-page .nx-kpi-card span,
.products-enterprise-page .nx-kpi-card small {
    font-weight: 400 !important;
}

.products-enterprise-page .nx-kpi-card strong {
    font-weight: 500 !important;
}

.products-enterprise-table-panel .table-responsive {
    overflow-x: auto;
}

.products-enterprise-table-panel .products-table {
    min-width: 1080px;
}

.products-enterprise-table-panel .products-table thead th,
.products-enterprise-table-panel .products-table tbody td {
    white-space: nowrap;
}

.products-enterprise-table-panel .products-table tbody td:first-child {
    white-space: normal;
}

.products-enterprise-table-panel .nx-product-cell {
    min-width: 300px;
}

.products-enterprise-table-panel .nx-product-avatar {
    background: rgba(0, 191, 165, .11);
    color: #008F7C;
}

.products-enterprise-table-panel .product-inactive-row td {
    color: #94A3B8 !important;
    background: #FBFCFE !important;
}

.products-enterprise-table-panel .status-completed {
    background: rgba(0, 191, 165, .11) !important;
    color: #008F7C !important;
}

.products-enterprise-table-panel .status-cancelled {
    background: rgba(239, 68, 68, .11) !important;
    color: #DC2626 !important;
}

.products-pagination-bar {
    justify-content: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

.products-pagination-bar .nx-page-btn {
    flex: 0 0 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    font-weight: 500 !important;
}

.products-pagination-bar .nx-page-dots {
    flex: 0 0 auto !important;
    padding: 0 6px !important;
    margin: 0 !important;
}

@media (max-width: 1280px) {
    .products-enterprise-page .nx-products-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .products-enterprise-page .products-filter-row {
        grid-template-columns: 1fr;
    }
    .products-enterprise-page .nx-products-kpis {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   Fornecedores - Enterprise Teal refinado
   ===================================================== */
.suppliers-page {
    padding: 0 0 24px;
}

.nx-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.nx-page-header h1 {
    margin: 0 0 6px;
    color: #0F172A;
    font-size: 24px;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.nx-page-header .module-subtitle {
    margin: 0;
    color: #64748B;
    font-size: 13px;
    line-height: 1.45;
}

.suppliers-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.nx-kpi-icon-teal { color: #00A891; background: rgba(0, 191, 165, .12); }
.nx-kpi-icon-red { color: #EF4444; background: rgba(239, 68, 68, .10); }

.suppliers-page .nx-kpi-card strong {
    font-weight: 600;
    font-size: 22px;
}

.suppliers-page .nx-kpi-card span,
.suppliers-page .nx-kpi-card small {
    font-weight: 400;
}

.nx-filter-card {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(180px, 240px);
    align-items: end;
    gap: 14px;
    margin-bottom: 22px;
    padding: 18px;
    background: #fff;
    border: 1px solid #E6EAF0;
    border-radius: 16px;
    box-shadow: 0 14px 38px rgba(15, 23, 42, .045);
}

.nx-filter-card .form-group { margin: 0; }
.nx-filter-card label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 12px;
    font-weight: 500;
}

.nx-input-icon {
    position: relative;
}

.nx-input-icon i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 13px;
    pointer-events: none;
}

.nx-input-icon .form-control {
    padding-left: 40px !important;
}

.suppliers-page .form-control {
    height: 44px;
    border: 1px solid #DDE5EF;
    border-radius: 12px;
    background: #fff;
    color: #0F172A;
    font-size: 13px;
    font-weight: 400;
    box-shadow: none;
}

.suppliers-page .form-control:focus {
    border-color: rgba(0, 191, 165, .65);
    box-shadow: 0 0 0 4px rgba(0, 191, 165, .10);
}

.nx-table-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid #E6EAF0;
    border-radius: 18px;
    box-shadow: 0 16px 42px rgba(15, 23, 42, .055);
}

.suppliers-table-card .nx-table-toolbar {
    padding: 16px 18px;
}

.nx-table-search {
    width: min(420px, 100%);
}

.nx-table-search .form-control {
    height: 42px;
}

#supplierTableCount {
    color: #64748B;
    font-size: 13px;
    font-weight: 400;
}

.suppliers-table.nx-table th,
.suppliers-table.nx-table td {
    border-left: 0 !important;
    border-right: 0 !important;
}

.suppliers-table.nx-table tbody tr td {
    box-shadow: none !important;
}

.suppliers-table.nx-table tbody td small {
    display: block;
    margin-top: 3px;
    color: #64748B;
    font-size: 12px;
    font-weight: 400;
}

.suppliers-table.nx-table tbody td span {
    font-weight: 400;
}

.suppliers-table.nx-table .table-actions {
    justify-content: flex-start;
    gap: 8px;
}

.suppliers-table.nx-table .action-icon-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 11px !important;
    background: #fff !important;
    border: 1px solid #DDE5EF !important;
    color: #64748B !important;
    box-shadow: none !important;
}

.suppliers-table.nx-table .action-icon-btn:hover {
    color: #00A891 !important;
    border-color: rgba(0, 191, 165, .45) !important;
    background: #F8FFFD !important;
}

.suppliers-table.nx-table .nx-entity-cell strong {
    font-weight: 550;
}

.suppliers-table.nx-table .nx-avatar-1 { background: rgba(0, 191, 165, .12); color: #00A891; }
.suppliers-table.nx-table .nx-avatar-2 { background: rgba(59, 130, 246, .12); color: #2563EB; }
.suppliers-table.nx-table .nx-avatar-3 { background: rgba(249, 115, 22, .12); color: #EA580C; }
.suppliers-table.nx-table .nx-avatar-4 { background: rgba(124, 58, 237, .12); color: #7C3AED; }
.suppliers-table.nx-table .nx-avatar-5 { background: rgba(16, 185, 129, .12); color: #059669; }
.suppliers-table.nx-table .nx-avatar-6 { background: rgba(245, 158, 11, .12); color: #D97706; }

@media (max-width: 1100px) {
    .suppliers-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .nx-page-header { flex-direction: column; }
    .nx-filter-card { grid-template-columns: 1fr; }
    .suppliers-kpi-grid { grid-template-columns: 1fr; }
    .suppliers-table-card { overflow-x: auto; }
}

/* =========================================================
   Nortex v103 - Ajustes Fornecedores Enterprise Teal
   - Remove campo duplicado de busca da tabela
   - Bloqueia auto-enhancer no módulo de fornecedores
   - Adiciona paginação consistente com Clientes/Produtos
   ========================================================= */
.suppliers-table-card > .nx-table-toolbar,
.suppliers-table-card .table-panel > .table-toolbar {
    display: none !important;
}

.suppliers-enterprise-table-panel {
    overflow: hidden;
}

.suppliers-table-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--nx-border-soft, #E7ECF5);
}

.suppliers-pagination-bar {
    justify-content: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    width: 100% !important;
}

.suppliers-pagination-bar .nx-page-btn {
    flex: 0 0 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    font-weight: 500 !important;
}

.suppliers-pagination-bar .nx-page-dots {
    flex: 0 0 auto !important;
    padding: 0 6px !important;
    margin: 0 !important;
}

/* =========================================================
   Nortex v104 - Técnicos/Usuários no padrão Enterprise Teal
   - Remove busca duplicada automática da tabela de usuários
   - Organiza KPIs, listagem, formulário e matriz de permissões
   ========================================================= */
.nx-users-page .nx-users-kpi-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.nx-users-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, .75fr);
    gap: 18px;
    align-items: start;
}

.nx-users-toolbar {
    align-items: center;
}

.nx-users-toolbar strong {
    font-weight: 500 !important;
}

.nx-users-toolbar small {
    color: var(--nx-muted);
    font-weight: 400;
}

.nx-users-progress {
    width: 210px;
    height: 8px;
    background: #E8EEF6;
    border-radius: 999px;
    overflow: hidden;
}

.nx-users-progress span {
    display: block;
    height: 100%;
    background: var(--nx-accent);
    border-radius: inherit;
}

.nx-users-search-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--nx-border);
    background: #fff;
}

.nx-users-search-row .nx-search-field {
    max-width: 420px;
    width: 100%;
}

.nx-users-search-row small {
    color: var(--nx-muted);
    font-size: 12px;
    white-space: nowrap;
}

.nx-users-table .nx-entity-cell strong,
.nx-users-table .nx-entity-cell small,
.nx-users-table td,
.nx-user-form-panel label,
.nx-user-form-panel p,
.nx-profile-chips h3,
.nx-acl-panel p {
    font-weight: 400 !important;
}

.nx-users-table .nx-entity-cell strong {
    color: var(--nx-text);
    font-weight: 500 !important;
}

.nx-user-form-panel {
    padding: 20px;
}

.nx-form-section-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.nx-form-section-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--nx-accent);
    background: var(--nx-accent-soft);
    flex: 0 0 auto;
}

.nx-form-section-head h2 {
    margin: 0 0 4px;
    color: var(--nx-text);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -.01em;
}

.nx-form-section-head p {
    margin: 0;
    color: var(--nx-muted);
    font-size: 13px;
}

.nx-form-grid.form-grid {
    gap: 14px;
}

.nx-user-form-panel .form-actions {
    justify-content: flex-end;
    padding-top: 18px;
    margin-top: 4px;
}

.nx-profile-chips {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--nx-border);
}

.nx-profile-chips h3 {
    margin: 0 0 10px;
    color: var(--nx-text);
    font-size: 14px;
}

.nx-acl-panel {
    margin-top: 18px;
    padding: 20px;
}

.nx-acl-panel .acl-tabs {
    gap: 10px;
    margin: 12px 0 16px;
}

.nx-acl-panel .acl-tab {
    border: 1px solid var(--nx-border);
    background: #fff;
    color: var(--nx-text);
    border-radius: 999px;
    padding: 9px 13px;
    font-weight: 400;
}

.nx-acl-panel .acl-tab.active {
    background: var(--nx-accent);
    border-color: var(--nx-accent);
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 191, 165, .16);
}

.nx-acl-panel .acl-profile-card {
    border-color: var(--nx-border);
    border-radius: 16px;
    box-shadow: none;
}

.nx-acl-panel .acl-profile-head h3,
.nx-acl-panel .acl-group h4,
.nx-acl-panel .acl-module strong {
    font-weight: 500 !important;
}

.nx-acl-panel .acl-actions label {
    font-weight: 400;
}

.nx-users-page .status-completed,
.nx-users-page .status-cancelled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 400 !important;
}

.nx-row-actions .action-icon-btn.danger:hover {
    color: var(--nx-danger) !important;
    border-color: rgba(239, 68, 68, .35) !important;
    background: rgba(239, 68, 68, .06) !important;
}

@media (max-width: 1280px) {
    .nx-users-page .nx-users-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .nx-users-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .nx-users-page .nx-users-kpi-grid { grid-template-columns: 1fr; }
    .nx-users-search-row { align-items: stretch; flex-direction: column; }
    .nx-users-search-row .nx-search-field { max-width: none; }
    .nx-users-progress { width: 100%; }
    .nx-users-table { min-width: 860px; }
}

/* =====================================================
   Nortex v105 - Usuários: lista, formulário e permissões separados
   ===================================================== */
.nx-users-top-tabs{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 18px}.nx-top-tab{height:40px;border:1px solid var(--nx-border,#E6EAF0);background:#fff;color:var(--nx-text,#0F172A);border-radius:12px;padding:0 14px;font-size:13px;font-weight:500;display:inline-flex;align-items:center;gap:8px;cursor:pointer;transition:.18s ease}.nx-top-tab:hover{border-color:rgba(0,191,165,.35);color:var(--nx-primary,#00BFA5);box-shadow:0 8px 18px rgba(15,23,42,.06)}.nx-top-tab.active{background:var(--nx-primary,#00BFA5);border-color:var(--nx-primary,#00BFA5);color:#fff;box-shadow:0 12px 24px rgba(0,191,165,.20)}
.nx-users-list-page .nx-filter-card.compact{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 18px;margin-bottom:0;border-bottom:1px solid var(--nx-border,#E6EAF0);border-radius:18px 18px 0 0;background:#fff}.nx-users-list-page .nx-search-field{max-width:460px;width:100%}.nx-users-list-page #usersLimitSelect{width:150px;height:42px}.nx-table-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;color:#475569;font-size:13px;background:#fff;border-bottom:1px solid var(--nx-border,#E6EAF0)}.nx-table-meta strong{font-weight:600;color:#0F172A}.users-pagination{justify-content:center;gap:8px;padding:18px;background:#fff;border-top:1px solid var(--nx-border,#E6EAF0);border-radius:0 0 18px 18px}.users-pagination .nx-page-btn,.users-pagination button{min-width:38px;height:38px;border-radius:10px;margin:0 2px}.nx-users-layout{display:block}.nx-user-form-page .nx-form-page-panel{max-width:880px}.nx-user-form-page .nx-form-grid{max-width:760px}.nx-permissions-panel{overflow:hidden}.nx-permission-tabs{margin-bottom:18px}.nx-permission-card{display:none}.nx-permission-card.active{display:block}.nx-permission-row{display:grid;grid-template-columns:220px 1fr;gap:18px;align-items:flex-start;padding:14px 0;border-bottom:1px solid var(--nx-border,#E6EAF0)}.nx-permission-row:last-child{border-bottom:0}.nx-permission-actions{display:flex;flex-wrap:wrap;gap:8px 14px}.nx-permission-actions label{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:#334155;line-height:1.2}.nx-permission-actions input{accent-color:var(--nx-primary,#00BFA5)}.nx-permission-group{padding:16px 0}.nx-permission-group h4{margin:0 0 8px;color:#0F172A;font-size:14px;font-weight:600}.acl-profile-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:12px;border-bottom:1px solid var(--nx-border,#E6EAF0);margin-bottom:10px}.acl-profile-head h3{margin:0;font-size:18px;font-weight:600}.acl-profile-head p{margin:4px 0 0;color:#64748B;font-size:13px}@media(max-width:900px){.nx-users-list-page .nx-filter-card.compact{align-items:stretch;flex-direction:column}.nx-users-list-page #usersLimitSelect{width:100%}.nx-table-meta{align-items:flex-start;flex-direction:column}.nx-permission-row{grid-template-columns:1fr}.nx-page-actions{width:100%;justify-content:flex-start}.nx-users-top-tabs{overflow-x:auto;flex-wrap:nowrap;padding-bottom:4px}.nx-top-tab{white-space:nowrap}}

/* =========================================================
   Nortex v106 - Refinamento do Dashboard Enterprise Teal
   Objetivo: somente títulos dos containers em negrito, demais
   números/listas com peso visual mais leve; correção do campo
   de busca do cabeçalho que herdava estilo global de input.
   ========================================================= */

/* Correção do campo de busca superior: evita aparência de input dentro de input */
body.nortex-sidebar-premium-page .nortex-global-search,
.nortex-global-search {
    height: 42px !important;
    min-height: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 0 12px !important;
    border: 1px solid var(--nx-border, #E6EAF0) !important;
    border-radius: 14px !important;
    background: #FFFFFF !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03) !important;
    overflow: hidden !important;
}

body.nortex-sidebar-premium-page .nortex-global-search input[type="search"],
.nortex-global-search input[type="search"] {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
    border-radius: 0 !important;
    color: var(--nx-text, #0F172A) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    flex: 1 1 auto !important;
}

body.nortex-sidebar-premium-page .nortex-global-search input[type="search"]:focus,
.nortex-global-search input[type="search"]:focus {
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
}

body.nortex-sidebar-premium-page .nortex-global-search:focus-within,
.nortex-global-search:focus-within {
    border-color: var(--nx-accent, #00BFA5) !important;
    box-shadow: 0 0 0 4px rgba(0, 191, 165, .10) !important;
}

.nortex-global-search i { color: #64748B !important; font-size: 13px !important; }
.nortex-global-search span {
    flex: 0 0 auto !important;
    font-weight: 400 !important;
}

/* Base visual mais leve para o dashboard */
.nortex-modern-dashboard {
    gap: 18px !important;
}

.nortex-dashboard-head h1,
.modern-panel-title h2 {
    font-weight: 700 !important;
}

.nortex-dashboard-head p,
.modern-panel-title button,
.modern-date-filter {
    font-weight: 400 !important;
}

.modern-kpi-card,
.modern-panel {
    border-radius: 18px !important;
    border-color: #E6EAF0 !important;
    box-shadow: 0 1px 2px rgba(15,23,42,.035), 0 12px 30px rgba(15,23,42,.035) !important;
}

.modern-kpi-card:hover,
.modern-panel:hover {
    box-shadow: 0 2px 4px rgba(15,23,42,.04), 0 18px 38px rgba(15,23,42,.045) !important;
}

/* KPIs: valores e textos sem negrito pesado */
.modern-kpi-content span {
    font-weight: 500 !important;
    letter-spacing: .02em !important;
    text-transform: none !important;
}

.modern-kpi-content strong {
    font-weight: 500 !important;
    letter-spacing: -.015em !important;
}

.modern-kpi-content small {
    font-weight: 400 !important;
}

.modern-kpi-icon,
.modern-kpi-icon i {
    font-weight: 400 !important;
}

/* Gráficos e legendas: somente títulos dos containers ficam em destaque */
.donut-legend-item strong,
.donut-legend-item small,
.modern-axis-value,
.modern-axis-label,
.vendor-y-axis,
.modern-vendor-bar span,
.modern-vendor-bar small {
    font-weight: 400 !important;
}

.modern-cash-list span,
.modern-cash-list strong {
    font-weight: 400 !important;
}

.modern-cash-list strong {
    font-size: 12.5px !important;
}

/* Top produtos: nome, valor e ranking sem negrito pesado */
.product-rank,
.product-info strong,
.product-value {
    font-weight: 400 !important;
}

.product-info strong {
    color: #1E293B !important;
}

.product-value {
    color: #334155 !important;
}

/* Atividades recentes: atividades sem negrito, leitura mais limpa */
.modern-activity-item strong,
.modern-activity-item small,
.view-all-activities {
    font-weight: 400 !important;
}

.modern-activity-item strong {
    color: #1E293B !important;
}

/* Botão de ver atividades sem peso excessivo */
.view-all-activities {
    color: var(--nx-accent, #00BFA5) !important;
}

/* Linhas e preenchimento do gráfico um pouco mais suave */
.modern-grid-line {
    stroke: #EEF2F7 !important;
}

.modern-line-area {
    fill: rgba(0, 191, 165, .065) !important;
}

.modern-line-stroke {
    stroke: var(--nx-accent, #00BFA5) !important;
    stroke-width: 2.4 !important;
}

/* Ajuste fino da hierarquia em telas menores */
@media (max-width: 1100px) {
    .modern-kpi-content strong { font-size: 19px !important; }
}

/* =====================================================
   Nortex v107 - Vendas/Orçamentos Enterprise Teal
   - Padroniza módulo no mesmo padrão visual de Clientes
   - Corrige busca superior e melhora paginação/listagem
   ===================================================== */
.nx-commercial-sales-page .nx-page-hero {
    align-items: flex-start;
}
.nx-commercial-sales-kpis {
    grid-template-columns: repeat(6, minmax(145px, 1fr));
}
.nx-commercial-sales-kpis .nx-kpi-card {
    min-height: 96px;
}
.nx-commercial-sales-kpis .nx-kpi-card span,
.nx-commercial-sales-kpis .nx-kpi-card small,
.nx-commercial-sales-kpis .nx-kpi-card strong {
    font-weight: 400 !important;
}
.nx-commercial-sales-kpis .nx-kpi-card strong {
    font-size: 18px !important;
    letter-spacing: -0.01em;
}
.nx-commercial-filter-row {
    grid-template-columns: minmax(280px, 1fr) 180px 150px;
    align-items: end;
}
.nx-commercial-period-row {
    grid-template-columns: auto 160px 160px auto;
    align-items: end;
    margin-top: 14px;
}
.nx-period-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.nx-period-btn,
.period-buttons .nx-period-btn {
    height: 38px;
    padding: 0 15px;
    border: 1px solid #D8E1ED !important;
    border-radius: 999px !important;
    background: #FFFFFF !important;
    color: #334155 !important;
    font-size: 12.5px !important;
    font-weight: 400 !important;
    box-shadow: 0 1px 2px rgba(15,23,42,.03);
    transition: all .18s ease;
}
.nx-period-btn:hover,
.period-buttons .nx-period-btn:hover {
    color: #008D7B !important;
    border-color: rgba(0,191,165,.35) !important;
    background: rgba(0,191,165,.06) !important;
}
.nx-period-btn.active,
.period-buttons .nx-period-btn.active {
    background: var(--nx-accent, #00BFA5) !important;
    border-color: var(--nx-accent, #00BFA5) !important;
    color: #FFFFFF !important;
    box-shadow: 0 10px 22px rgba(0,191,165,.22) !important;
}
.nx-commercial-filter-actions {
    display: flex;
    gap: 10px;
    align-items: end;
}
.commercial-sales-table-panel {
    margin-top: 18px;
}
.commercial-sales-table .nx-entity-cell strong,
.commercial-sales-table td,
.commercial-sales-table .nx-sale-number {
    font-weight: 400 !important;
}
.commercial-sales-table .nx-entity-cell small {
    font-weight: 400 !important;
    color: #64748B;
}
.commercial-sales-table .nx-sale-number {
    min-width: 92px;
    justify-content: center;
}
.commercial-sales-pagination-bar {
    justify-content: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    padding-top: 16px;
}
.commercial-sales-pagination-bar .nx-page-btn {
    flex: 0 0 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    font-weight: 400 !important;
}
.commercial-sales-pagination-bar .nx-page-btn.active {
    font-weight: 500 !important;
}
.commercial-sales-pagination-bar .nx-page-dots {
    width: 28px;
    text-align: center;
    color: #94A3B8;
}
.nx-commercial-client-cell .nx-avatar {
    background: rgba(0,191,165,.12);
    color: #008D7B;
}
.sale-row-cancelled td {
    color: #991B1B !important;
    background: #FFF5F5 !important;
}

/* Reforço para corrigir busca superior com visual de campo único */
.nortex-page-topbar .nortex-global-search {
    width: min(380px, 38vw) !important;
    box-sizing: border-box !important;
    background: #FFFFFF !important;
    border: 1px solid #DCE5F0 !important;
    border-radius: 14px !important;
    padding: 0 12px !important;
}
.nortex-page-topbar .nortex-global-search input,
.nortex-page-topbar .nortex-global-search input[type="search"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 100% !important;
    min-width: 0 !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

@media (max-width: 1320px) {
    .nx-commercial-sales-kpis { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
}
@media (max-width: 980px) {
    .nx-commercial-filter-row,
    .nx-commercial-period-row {
        grid-template-columns: 1fr;
    }
    .nx-commercial-filter-actions,
    .nx-commercial-filter-actions .nx-btn {
        width: 100%;
    }
    .nx-commercial-sales-kpis { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
}
@media (max-width: 640px) {
    .nx-commercial-sales-kpis { grid-template-columns: 1fr; }
}

/* =====================================================
   Nortex v109 - PDV + Vendas/Orçamentos refinados
   - PDV com padrão Enterprise Teal
   - Cadastro de venda/orçamento em blocos premium com ícones
   - Datas usam calendário local para evitar divergência UTC
   - Busca superior reforçada para não parecer campo duplo
   ===================================================== */
.nx-pdv-sales-page .nx-page-hero,
.nx-commercial-sales-page .nx-page-hero {
    align-items: flex-start;
}

.nx-pdv-sales-kpis {
    grid-template-columns: repeat(5, minmax(155px, 1fr));
}

.nx-pdv-sales-kpis .nx-kpi-card,
.nx-commercial-sales-kpis .nx-kpi-card {
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .045);
}

.nx-pdv-sales-kpis .nx-kpi-card span,
.nx-pdv-sales-kpis .nx-kpi-card small,
.nx-pdv-sales-kpis .nx-kpi-card strong,
.nx-commercial-sales-kpis .nx-kpi-card span,
.nx-commercial-sales-kpis .nx-kpi-card small,
.nx-commercial-sales-kpis .nx-kpi-card strong {
    font-weight: 400 !important;
}

.nx-pdv-sales-kpis .nx-kpi-card strong,
.nx-commercial-sales-kpis .nx-kpi-card strong {
    font-size: 18px !important;
    letter-spacing: -0.01em;
}

.nx-kpi-icon-warning { color: #00A891; background: rgba(0, 191, 165, .10); }

.nx-pdv-filter-row {
    grid-template-columns: minmax(320px, 1fr) 180px 150px;
    align-items: end;
}

.nx-pdv-period-row {
    grid-template-columns: auto 160px 160px auto;
    align-items: end;
    margin-top: 14px;
}

.nx-pdv-filter-actions {
    display: flex;
    align-items: end;
    gap: 10px;
}

.pdv-sales-table-panel {
    margin-top: 18px;
}

.pdv-sales-table .nx-entity-cell strong,
.pdv-sales-table td,
.pdv-sales-table .nx-sale-number {
    font-weight: 400 !important;
}

.pdv-sales-table .nx-entity-cell small {
    font-weight: 400 !important;
    color: #64748B;
}

.pdv-sales-table .nx-sale-number {
    min-width: 108px;
    justify-content: center;
}

.pdv-sales-pagination-bar {
    justify-content: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    padding-top: 16px;
}

.pdv-sales-pagination-bar .nx-page-btn {
    flex: 0 0 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    font-weight: 400 !important;
}

.pdv-sales-pagination-bar .nx-page-btn.active {
    font-weight: 500 !important;
}

.nx-pdv-client-cell .nx-avatar {
    background: rgba(0,191,165,.12);
    color: #008D7B;
}

.commercial-sale-form-page.nortex-form-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 4px 0 34px;
}

.commercial-sale-form-page .nortex-standard-form {
    display: grid;
    gap: 18px;
}

.commercial-sale-form-page .nx-form-section-card {
    background: #fff;
    border: 1px solid var(--nx-border-soft, #E6EAF0);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 14px 38px rgba(15, 23, 42, .045);
}

.nx-form-section-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.nx-form-section-head h3 {
    margin: 0 0 4px;
    color: #0F172A;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.nx-form-section-head p {
    margin: 0;
    color: #64748B;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 400;
}

.nx-section-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(0, 191, 165, .10);
    color: #008D7B;
    flex: 0 0 auto;
}

.commercial-sale-form-page .commercial-form .form-grid,
.commercial-sale-form-page .commercial-add-row,
.commercial-sale-form-page .commercial-payment-line,
.commercial-sale-form-page .commercial-totals {
    border-radius: 16px !important;
    border-color: #E2E8F0 !important;
    box-shadow: none !important;
}

.commercial-sale-form-page .commercial-form .form-grid {
    background: #FBFCFE !important;
    padding: 18px !important;
    margin-bottom: 0 !important;
}

.commercial-sale-form-page .commercial-add-row,
.commercial-sale-form-page .commercial-payment-line {
    background: #FBFCFE !important;
}

.commercial-sale-form-page .commercial-items-wrap {
    overflow-x: auto;
    border: 1px solid #E6EAF0;
    border-radius: 16px;
    background: #fff;
}

.commercial-sale-form-page .commercial-items-table {
    min-width: 760px;
}

.commercial-sale-form-page label,
.commercial-sale-form-page .commercial-total-box label,
.commercial-sale-form-page .commercial-total-box span {
    color: #475569 !important;
    font-weight: 500 !important;
}

.commercial-sale-form-page input,
.commercial-sale-form-page select,
.commercial-sale-form-page textarea {
    border-color: #DDE5EF !important;
    border-radius: 12px !important;
}

.commercial-sale-form-page input:focus,
.commercial-sale-form-page select:focus,
.commercial-sale-form-page textarea:focus {
    border-color: rgba(0, 191, 165, .65) !important;
    box-shadow: 0 0 0 4px rgba(0, 191, 165, .10) !important;
}

.commercial-sale-form-page .commercial-total-box strong {
    font-weight: 500 !important;
    color: #0F172A !important;
}

.commercial-sale-form-page .commercial-total-final strong {
    color: #008D7B !important;
}

.commercial-payment-header.nx-form-section-head {
    justify-content: space-between;
    align-items: center;
}

/* Topbar: evita campo duplicado quando há herança de .search-box/.form-control */
.nortex-page-topbar .nortex-global-search,
.topbar .nortex-global-search,
.header .nortex-global-search {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    height: 42px !important;
    background: #fff !important;
    border: 1px solid #DDE5EF !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    overflow: hidden !important;
}

.nortex-page-topbar .nortex-global-search input,
.topbar .nortex-global-search input,
.header .nortex-global-search input,
.nortex-page-topbar .search-box input,
.topbar .search-box input,
.header .search-box input {
    height: 40px !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

@media (max-width: 1320px) {
    .nx-pdv-sales-kpis { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
}
@media (max-width: 980px) {
    .nx-pdv-filter-row,
    .nx-pdv-period-row {
        grid-template-columns: 1fr;
    }
    .nx-pdv-filter-actions,
    .nx-pdv-filter-actions .nx-btn {
        width: 100%;
    }
    .nx-pdv-sales-kpis { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
    .commercial-sale-form-page .commercial-form .form-grid {
        grid-template-columns: 1fr !important;
    }
}
@media (max-width: 640px) {
    .nx-pdv-sales-kpis { grid-template-columns: 1fr; }
}

/* =====================================================
   Nortex v110 - Vendas PDV + abertura do PDV em nova guia
   - Lista de vendas PDV no padrão Enterprise Teal
   - Botão PDV abre tela operacional em nova aba
   - Ajustes de respiro, hierarquia e tabela
   ===================================================== */
.nx-pdv-sales-page {
    max-width: 100%;
}
.nx-pdv-sales-page .nx-page-hero {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 8px 0 10px;
    margin-bottom: 12px;
}
.nx-pdv-sales-page .nx-page-hero h1 {
    font-size: 26px;
    line-height: 1.15;
    letter-spacing: -.03em;
    font-weight: 650;
    color: #0F172A;
}
.nx-pdv-sales-page .nx-page-hero p {
    color: #64748B;
    font-weight: 400;
}
.nx-pdv-sales-page .nx-eyebrow {
    color: #00A891;
    font-weight: 600;
    letter-spacing: .10em;
}
.nx-pdv-sales-page .nx-page-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}
.nx-pdv-sales-page .nx-page-actions .nx-btn {
    min-height: 40px;
    border-radius: 13px;
    font-weight: 500;
}
.nx-pdv-sales-kpis {
    gap: 14px;
    margin-bottom: 18px;
}
.nx-pdv-sales-kpis .nx-kpi-card {
    min-height: 106px;
    padding: 18px;
    border: 1px solid #E6EAF0;
    background: #FFFFFF;
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .045);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.nx-pdv-sales-kpis .nx-kpi-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 44px rgba(15, 23, 42, .065);
    border-color: rgba(0,191,165,.24);
}
.nx-pdv-sales-kpis .nx-kpi-card span {
    text-transform: none;
    color: #475569;
    font-size: 13px;
    font-weight: 400 !important;
}
.nx-pdv-sales-kpis .nx-kpi-card strong {
    margin-top: 4px;
    color: #0F172A;
    font-size: 20px !important;
    font-weight: 500 !important;
}
.nx-pdv-sales-kpis .nx-kpi-card small {
    color: #64748B;
    font-weight: 400 !important;
}
.nx-pdv-filter-panel {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid #E6EAF0;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .04);
    background: #FFFFFF;
}
.nx-pdv-filter-panel .nx-search-field {
    height: 44px;
    border-radius: 14px;
    border-color: #DCE5F0;
    background: #FFFFFF;
}
.nx-pdv-filter-panel .nx-select-field label {
    color: #334155;
    font-size: 12px;
    font-weight: 500;
    text-transform: none;
}
.nx-pdv-filter-panel select,
.nx-pdv-filter-panel input[type="date"] {
    height: 44px;
    border-radius: 13px;
    border-color: #DCE5F0;
    font-weight: 400;
}
.nx-pdv-period-row .period-buttons {
    gap: 8px;
}
.nx-pdv-period-row .nx-period-btn {
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    font-weight: 400;
    border-color: #CFE0F2;
    color: #0F172A;
    background: #FFFFFF;
}
.nx-pdv-period-row .nx-period-btn.active {
    background: #00BFA5;
    border-color: #00BFA5;
    color: #FFFFFF;
    box-shadow: 0 10px 24px rgba(0,191,165,.20);
}
.pdv-sales-table-panel {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #E6EAF0;
    box-shadow: 0 14px 38px rgba(15,23,42,.045);
    background: #FFFFFF;
}
.pdv-sales-table-panel .nx-table-toolbar {
    padding: 16px 18px;
    border-bottom: 1px solid #EEF2F7;
    color: #475569;
    font-weight: 400;
}
.pdv-sales-table-panel .nx-table-toolbar strong {
    font-weight: 500;
}
.pdv-sales-table {
    min-width: 980px;
}
.pdv-sales-table thead th {
    background: #F8FAFC;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    border-bottom: 1px solid #E6EAF0;
}
.pdv-sales-table tbody td {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    color: #0F172A;
    font-weight: 400 !important;
    border-bottom: 1px solid #EEF2F7;
}
.pdv-sales-table tbody tr:hover td {
    background: rgba(0,191,165,.035);
}
.pdv-sales-table .nx-entity-cell strong {
    font-weight: 400 !important;
    color: #0F172A;
}
.pdv-sales-table .nx-entity-cell small {
    display: block;
    margin-top: 2px;
    color: #64748B;
}
.pdv-sales-table .nx-type-pill {
    background: #F1F5F9;
    color: #334155;
    border: 0;
    font-weight: 400 !important;
}
.pdv-sales-table .action-icon-btn {
    border-radius: 12px;
    border-color: #DDE7F3;
    background: #FFFFFF;
}
.pdv-sales-table .action-icon-btn:hover {
    border-color: rgba(0,191,165,.45);
    color: #008D7B;
    background: rgba(0,191,165,.06);
}
.pdv-sales-pagination-bar {
    padding: 16px 18px 18px !important;
    border-top: 1px solid #EEF2F7;
}
@media (max-width: 1180px) {
    .nx-pdv-filter-row,
    .nx-pdv-period-row {
        grid-template-columns: 1fr 1fr;
    }
    .nx-pdv-filter-actions { align-items: center; }
}
@media (max-width: 720px) {
    .nx-pdv-filter-row,
    .nx-pdv-period-row {
        grid-template-columns: 1fr;
    }
    .nx-pdv-sales-page .nx-page-actions,
    .nx-pdv-filter-actions,
    .nx-pdv-filter-actions .nx-btn {
        width: 100%;
    }
}

/* =========================================================
   Nortex v112 - Ordens de Serviço Enterprise Teal
   Dashboard/listagem e formulário Nova/Editar OS no padrão atual
   ========================================================= */
.nx-service-orders-page {
    max-width: 100%;
    padding: 4px 0 34px;
}

.nx-page-shell .nx-page-hero,
.service-order-page .nx-page-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.nx-page-hero h1,
.service-order-page h1 {
    margin: 4px 0 6px !important;
    color: var(--nx-text) !important;
    font-size: 24px !important;
    line-height: 1.15;
    font-weight: 700 !important;
    letter-spacing: -0.025em;
}

.nx-page-hero p,
.service-order-page .nx-page-hero p {
    color: var(--nx-muted) !important;
    margin: 0 !important;
    font-size: 13px !important;
    line-height: 1.45;
    font-weight: 400 !important;
}

.nx-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #008D7B;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.nx-page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.nx-service-orders-page .nx-kpi-grid,
.service-orders-summary-grid.nx-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.nx-kpi-card {
    min-height: 102px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px !important;
    background: #fff !important;
    border: 1px solid var(--nx-border) !important;
    border-radius: 18px !important;
    box-shadow: 0 8px 26px rgba(15, 23, 42, .045) !important;
}

.nx-kpi-card small {
    display: block;
    color: #475569;
    font-size: 12px;
    font-weight: 400 !important;
    margin-bottom: 6px;
}

.nx-kpi-card strong {
    display: block;
    color: var(--nx-text);
    font-size: 22px;
    line-height: 1.15;
    font-weight: 500 !important;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.nx-kpi-card em {
    display: block;
    color: var(--nx-muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
}

.nx-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    font-size: 18px;
}

.nx-icon-teal { color: #008D7B; background: rgba(0,191,165,.12); }
.nx-icon-blue { color: #2563EB; background: rgba(37,99,235,.11); }
.nx-icon-green { color: #16A34A; background: rgba(34,197,94,.13); }
.nx-icon-orange { color: #F97316; background: rgba(249,115,22,.12); }
.nx-icon-red { color: #EF4444; background: rgba(239,68,68,.12); }
.nx-text-danger { color: var(--nx-danger) !important; }

.nx-filter-panel {
    background: #fff;
    border: 1px solid var(--nx-border);
    border-radius: 18px;
    box-shadow: 0 8px 26px rgba(15, 23, 42, .045);
    padding: 18px;
    margin-bottom: 20px;
}

.nx-filter-row {
    display: grid;
    gap: 14px;
    align-items: end;
}

.nx-filter-row-service-orders {
    grid-template-columns: minmax(260px, 1.6fr) minmax(150px, .7fr) minmax(150px, .7fr) minmax(150px, .65fr) minmax(230px, .9fr);
}

.nx-filter-panel .form-group {
    margin: 0 !important;
}

.nx-filter-panel label {
    color: #334155 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}

.nx-filter-panel input,
.nx-filter-panel select {
    min-height: 44px !important;
    border-radius: 12px !important;
}

.nx-filter-actions {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 14px;
}

.nx-filter-panel .so-maintenance-check {
    display: flex !important;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--nx-border-strong);
    border-radius: 12px;
    background: #FBFCFE;
    color: #334155 !important;
    font-weight: 400 !important;
    white-space: nowrap;
}

.nx-filter-panel .so-maintenance-check input {
    width: 16px !important;
    height: 16px !important;
    min-height: auto !important;
}

.nx-service-orders-table-panel,
.nx-table-panel {
    background: #fff;
    border: 1px solid var(--nx-border);
    border-radius: 18px;
    box-shadow: 0 8px 26px rgba(15, 23, 42, .045);
    overflow: hidden;
}

.nx-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    color: #475569;
    font-size: 13px;
    font-weight: 400;
    border-bottom: 1px solid var(--nx-border);
}

.nx-table-header strong {
    font-weight: 600;
    color: var(--nx-text);
}

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

.nx-table.service-orders-table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    margin: 0 !important;
    background: #fff;
}

.nx-table.service-orders-table th {
    background: #FBFCFE !important;
    color: #475569 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: .04em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--nx-border) !important;
    padding: 14px 18px !important;
}

.nx-table.service-orders-table td {
    padding: 15px 18px !important;
    border-bottom: 1px solid #EEF2F7 !important;
    color: #0F172A !important;
    font-size: 13px;
    vertical-align: middle;
    background: #fff !important;
}

.nx-table.service-orders-table tbody tr:hover td {
    background: #F8FCFB !important;
}

.nx-table.service-orders-table td span:not(.status-badge):not(.priority-badge):not(.nx-avatar):not(.maintenance-date):not(.nx-os-number) {
    font-weight: 400 !important;
}

.nx-table.service-orders-table small {
    display: block;
    color: #64748B;
    margin-top: 3px;
    font-size: 12px;
    font-weight: 400 !important;
}

.nx-os-number {
    display: block;
    font-weight: 500 !important;
    color: var(--nx-text);
}

.nx-table-person {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nx-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(0,191,165,.11);
    color: #008D7B;
    font-weight: 600;
    flex: 0 0 34px;
}

.nx-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 18px;
    border-top: 1px solid var(--nx-border);
    background: #fff;
}

.nx-page-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border: 1px solid var(--nx-border-strong) !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #334155 !important;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
}

.nx-page-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.nx-page-info {
    color: #475569;
    font-size: 13px;
    min-width: 110px;
    text-align: center;
}

.service-order-page.nortex-form-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 4px 0 34px;
}

.service-order-page .nortex-standard-form {
    display: grid;
    gap: 18px;
}

.service-order-page .form-section.nx-form-section-card {
    background: #fff !important;
    border: 1px solid var(--nx-border) !important;
    border-radius: 20px !important;
    padding: 20px !important;
    margin: 0 !important;
    box-shadow: 0 14px 38px rgba(15, 23, 42, .045) !important;
}

.service-order-page .nx-form-section-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 0 !important;
    border-bottom: none !important;
}

.service-order-page .nx-form-section-head h3 {
    margin: 0 0 4px !important;
    padding: 0 !important;
    border: none !important;
    color: var(--nx-text) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em;
}

.service-order-page .nx-form-section-head p {
    margin: 0;
    color: var(--nx-muted);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 400;
}

.service-order-page .form-grid {
    background: #FBFCFE !important;
    border: 1px solid #EEF2F7 !important;
    border-radius: 16px !important;
    padding: 18px !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.service-order-page .os-checklist-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    background: #FBFCFE;
    border: 1px solid #EEF2F7;
    border-radius: 16px;
    padding: 18px;
}

.service-order-page .checkbox-card label,
.service-order-page .os-checklist-grid label,
.service-order-page .checkbox-inline {
    display: flex !important;
    align-items: center;
    gap: 8px;
    border: 1px solid #E2E8F0 !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #334155 !important;
    font-weight: 400 !important;
    padding: 10px 12px !important;
    min-height: 44px !important;
}

.service-order-page input[type="checkbox"] {
    accent-color: var(--nx-accent);
}

.service-order-page .smart-maintenance-box {
    border-color: rgba(0,191,165,.22) !important;
    background: linear-gradient(180deg, #fff, #F7FFFD) !important;
}

.service-order-page .form-page-actions,
.service-order-page .nortex-form-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 0 4px;
    background: linear-gradient(180deg, rgba(244,246,249,.20), var(--nx-bg) 70%);
}

.status-badge,
.priority-badge {
    font-weight: 500 !important;
    border-radius: 999px !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
}

@media (max-width: 1280px) {
    .nx-service-orders-page .nx-kpi-grid,
    .service-orders-summary-grid.nx-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .nx-filter-row-service-orders { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .service-order-page .os-checklist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .nx-page-shell .nx-page-hero,
    .service-order-page .nx-page-hero { flex-direction: column; }
    .nx-service-orders-page .nx-kpi-grid,
    .service-orders-summary-grid.nx-kpi-grid,
    .nx-filter-row-service-orders,
    .service-order-page .os-checklist-grid { grid-template-columns: 1fr; }
    .nx-page-actions { justify-content: flex-start; width: 100%; }
}


/* =====================================================
   Nortex v113 - Ajustes OS: ícones KPI maiores + edição sem modal sobreposto
   ===================================================== */
.nx-service-orders-page .service-orders-summary-grid .nx-kpi-card {
    align-items: center !important;
    gap: 16px !important;
    min-height: 118px !important;
    padding: 22px 18px !important;
}

.nx-service-orders-page .service-orders-summary-grid .nx-kpi-icon {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    border-radius: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 60px !important;
    margin: 0 !important;
}

.nx-service-orders-page .service-orders-summary-grid .nx-kpi-icon i {
    font-size: 23px !important;
    line-height: 1 !important;
    opacity: .95 !important;
}

.nx-service-orders-page .service-orders-summary-grid .nx-kpi-card small {
    font-size: 12px !important;
    line-height: 1.25 !important;
    color: #475569 !important;
    font-weight: 500 !important;
}

.nx-service-orders-page .service-orders-summary-grid .nx-kpi-card strong {
    display: block !important;
    margin: 5px 0 5px !important;
    font-size: 22px !important;
    line-height: 1.1 !important;
    font-weight: 500 !important;
    color: #0f172a !important;
}

.nx-service-orders-page .service-orders-summary-grid .nx-kpi-card em {
    display: block !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    color: #64748b !important;
    font-style: normal !important;
    font-weight: 400 !important;
}

.service-order-modal .modal-content {
    border-radius: 22px !important;
    padding: 28px 30px !important;
}

.service-order-modal .so-view-header {
    align-items: center !important;
    border-bottom: 1px solid #e7eef7 !important;
    padding-bottom: 18px !important;
    margin-bottom: 18px !important;
}

.service-order-modal .so-view-header h2 {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

.service-order-modal .so-view-header p {
    color: #475569 !important;
}

.service-order-modal .so-view-grid,
.service-order-modal .so-text-grid {
    border: 1px solid #e5edf6 !important;
    border-radius: 20px !important;
    padding: 18px !important;
    background: #ffffff !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .035) !important;
    margin-bottom: 16px !important;
}

.service-order-modal .so-view-grid label,
.service-order-modal .so-text-grid label {
    color: #334155 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: .04em !important;
}

.service-order-modal .so-view-grid p,
.service-order-modal .so-text-grid p {
    margin-top: 8px !important;
    min-height: 48px !important;
    border: 1px solid #e5edf6 !important;
    border-radius: 14px !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    font-weight: 400 !important;
}

.service-order-modal h3 {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 18px 0 12px !important;
}

.service-order-modal .so-timeline {
    position: relative !important;
    padding: 4px 0 4px 18px !important;
    margin-bottom: 14px !important;
}

.service-order-modal .so-timeline li {
    position: relative !important;
    border-left: 2px solid #ccfbf1 !important;
    padding: 0 0 18px 20px !important;
    margin-left: 0 !important;
}

.service-order-modal .so-timeline li::before {
    content: '' !important;
    position: absolute !important;
    left: -7px !important;
    top: 2px !important;
    width: 12px !important;
    height: 12px !important;
    border-radius: 999px !important;
    background: #00BFA5 !important;
    box-shadow: 0 0 0 4px rgba(0,191,165,.12) !important;
}

.service-order-modal .so-timeline li strong {
    display: block !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
}

.service-order-modal .so-timeline li span,
.service-order-modal .so-timeline li p {
    font-size: 12px !important;
    color: #64748b !important;
    font-weight: 400 !important;
}

/* =====================================================
   NORTEX UI SYSTEM - Estoque Enterprise Teal v114
   Referência visual oficial: dark sidebar #1A1D23, accent #00BFA5,
   conteúdo #F4F6F9, cards brancos, bordas suaves e ícones teal.
   ===================================================== */
.nx-page-shell { padding-bottom: 24px; }
.nx-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.nx-page-header h1 { margin: 4px 0 4px; font-size: 24px; font-weight: 700; color: #0F172A; }
.nx-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #00BFA5;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.nx-pill-nav.inventory-subnav {
    background: #fff;
    border: 1px solid #E6EAF0;
    border-radius: 18px;
    padding: 8px;
    box-shadow: 0 1px 2px rgba(15,23,42,.03), 0 12px 28px rgba(15,23,42,.035);
}
.nx-pill-nav .inventory-subnav-link {
    color: #334155;
    font-weight: 500;
    border-radius: 12px;
    padding: 10px 14px;
}
.nx-pill-nav .inventory-subnav-link i { color: #00BFA5; }
.nx-pill-nav .inventory-subnav-link:hover { background: rgba(0,191,165,.08); border-color: rgba(0,191,165,.15); color: #0F766E; }
.nx-pill-nav .inventory-subnav-link.active {
    background: rgba(0,191,165,.10);
    border-color: rgba(0,191,165,.22);
    color: #0F766E;
    box-shadow: none;
}
.inventory-kpi-grid.nx-kpi-grid { grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 16px; margin: 16px 0 18px; }
.nx-kpi-card {
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 94px;
    background: #fff;
    border: 1px solid #E6EAF0;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 1px 2px rgba(15,23,42,.035), 0 14px 34px rgba(15,23,42,.035);
}
.nx-kpi-icon {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,191,165,.12);
    color: #00BFA5;
    font-size: 21px;
}
.nx-kpi-icon.is-danger { background: rgba(239,68,68,.12); color: #EF4444; }
.nx-kpi-card span { display: block; color: #475569; font-size: 12px; font-weight: 500; margin-bottom: 5px; }
.nx-kpi-card strong { display: block; color: #0F172A; font-size: 21px; font-weight: 500; letter-spacing: -.02em; }
.nx-kpi-card small { display: block; color: #64748B; font-size: 12px; margin-top: 5px; }
.nx-text-danger { color: #EF4444 !important; }
.nx-filter-card {
    padding: 18px;
    background: #fff;
    border: 1px solid #E6EAF0;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(15,23,42,.03), 0 12px 30px rgba(15,23,42,.03);
}
.nx-filter-grid.inventory-toolbar {
    grid-template-columns: minmax(280px, 1fr) 220px 190px;
    margin-bottom: 0;
    gap: 14px;
}
.nx-filter-grid label { font-size: 12px; font-weight: 600; color: #334155; }
.nx-filter-grid .form-control,
.inventory-movements-toolbar .form-control {
    min-height: 42px;
    border-radius: 12px;
    border-color: #D9E2EF;
    background: #fff;
}
.nx-filter-grid .form-control:focus,
.inventory-movements-toolbar .form-control:focus {
    border-color: #00BFA5;
    box-shadow: 0 0 0 4px rgba(0,191,165,.10);
}
.nx-table-card {
    padding: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #E6EAF0;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(15,23,42,.03), 0 16px 36px rgba(15,23,42,.035);
}
.inventory-table,
.inventory-movements-table { margin-bottom: 0; border-collapse: separate; border-spacing: 0; }
.inventory-table thead th,
.inventory-movements-table thead th {
    background: #F8FAFC;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    border-bottom: 1px solid #E6EAF0;
    padding: 14px 16px;
}
.inventory-table tbody td,
.inventory-movements-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #EEF2F7;
    color: #0F172A;
    font-size: 12px;
    font-weight: 400;
}
.inventory-table tbody tr:hover,
.inventory-movements-table tbody tr:hover { background: rgba(0,191,165,.035); }
.inventory-table td strong,
.inventory-movements-table td strong { font-weight: 500; color: #0F172A; }
.inventory-table small,
.inventory-movements-table small { color: #64748B; font-weight: 400; }
.inventory-actions .action-icon-btn {
    border-radius: 10px;
    border-color: #D9E2EF;
    background: #fff;
    color: #475569;
}
.inventory-actions .action-icon-btn:hover { border-color: rgba(0,191,165,.35); color: #00BFA5; background: rgba(0,191,165,.08); }
.inventory-pagination-bar {
    padding: 14px 16px;
    border-top: 1px solid #EEF2F7;
    background: #fff;
}
.inventory-pagination-bar .btn {
    min-width: 38px;
    min-height: 38px;
    border-radius: 12px;
    padding: 0 12px;
}
@media (max-width: 980px) {
    .nx-page-header { flex-direction: column; }
    .inventory-kpi-grid.nx-kpi-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
    .nx-filter-grid.inventory-toolbar { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .inventory-kpi-grid.nx-kpi-grid { grid-template-columns: 1fr; }
}

/* =====================================================
   Nortex v115 - Ajuste tabelas de Estoque
   Remove as linhas verticais teal no hover das tabelas de
   Posição do estoque, Movimentações e Situação/Histórico.
   O padrão oficial passa a usar apenas hover suave contínuo.
   ===================================================== */
.inventory-table tbody tr,
.inventory-movements-table tbody tr,
.inventory-history-table tbody tr {
    transition: background-color .18s ease !important;
}

.inventory-table tbody tr:hover,
.inventory-movements-table tbody tr:hover,
.inventory-history-table tbody tr:hover {
    background: #F8FAFC !important;
}

.inventory-table tbody tr:hover td,
.inventory-movements-table tbody tr:hover td,
.inventory-history-table tbody tr:hover td,
.inventory-table tbody td:hover,
.inventory-movements-table tbody td:hover,
.inventory-history-table tbody td:hover {
    background: transparent !important;
    box-shadow: none !important;
    border-left: 0 !important;
    border-right: 0 !important;
    outline: 0 !important;
}

.inventory-table tbody tr:hover td:first-child,
.inventory-movements-table tbody tr:hover td:first-child,
.inventory-history-table tbody tr:hover td:first-child,
.inventory-table tbody tr:hover td:last-child,
.inventory-movements-table tbody tr:hover td:last-child,
.inventory-history-table tbody tr:hover td:last-child {
    box-shadow: none !important;
    border-left: 0 !important;
    border-right: 0 !important;
}

/* =====================================================
   Nortex v116 - Hover limpo para Categorias e Marcas
   Remove qualquer linha vertical teal no hover de tabelas
   simples e tabelas NX. O hover oficial é apenas fundo suave.
   ===================================================== */
.table tbody tr:hover,
.nx-table tbody tr:hover {
    background: #F8FAFC !important;
}

.table tbody tr:hover td,
.table tbody tr:hover td:first-child,
.table tbody tr:hover td:last-child,
.nx-table tbody tr:hover td,
.nx-table tbody tr:hover td:first-child,
.nx-table tbody tr:hover td:last-child {
    background: transparent !important;
    box-shadow: none !important;
    border-left: 0 !important;
    border-right: 0 !important;
    outline: 0 !important;
}

.ecommerce-categories-table tbody tr:hover td,
.ecommerce-brands-table tbody tr:hover td,
.categories-table tbody tr:hover td,
.brands-table tbody tr:hover td {
    background: transparent !important;
    box-shadow: none !important;
    border-left: 0 !important;
    border-right: 0 !important;
}


/* =====================================================
   Nortex v158 - Ajuste financeiro e dashboard
   - KPIs de contas a pagar/receber seguem o padrão premium dos clientes.
   - Título dos cards fica leve; somente valor mantém destaque.
   ===================================================== */
.financial-kpi-grid {
    margin: 18px 0 18px;
}

.financial-kpi-button {
    width: 100%;
    border: 1px solid var(--nx-border-soft, #DCE6F1);
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.financial-kpi-button span {
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: #526480 !important;
}

.financial-kpi-button strong {
    font-weight: 600 !important;
    color: #0F172A;
}

.financial-kpi-button .nx-text-danger {
    color: #DC2626 !important;
}

.financial-kpi-button .nx-text-primary {
    color: #2563EB !important;
}

.financial-kpi-button:hover {
    border-color: rgba(0, 191, 165, .28);
    transform: translateY(-1px);
}

@media (max-width: 1100px) {
    .financial-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

/* Nortex v159 - cards com navegação/filtro contextual */
.modern-kpi-card.is-clickable,
.financial-kpi-button {
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.modern-kpi-card.is-clickable:hover,
.financial-kpi-button:hover,
.financial-kpi-button.active {
    transform: translateY(-2px);
    box-shadow: 0 16px 35px rgba(15, 23, 42, .10);
}

.financial-kpi-button.active {
    border-color: rgba(37, 99, 235, .45);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.modern-kpi-card.is-clickable:focus,
.financial-kpi-button:focus {
    outline: 3px solid rgba(37, 99, 235, .18);
    outline-offset: 3px;
}

/* V161 - Rascunho fiscal NF-e da venda */
.fiscal-sale-draft-page .module-actions { gap: 8px; flex-wrap: wrap; }
.fiscal-draft-kpis .nx-kpi-card { cursor: default; }
.fiscal-draft-section { margin-top: 16px; padding: 18px; }
.fiscal-draft-section .nx-panel-header,
.fiscal-draft-ready-section .nx-panel-header { margin-bottom: 14px; }
.fiscal-draft-section .nx-panel-header h3 { margin: 0; font-size: 15px; color: #0f2f57; }
.fiscal-draft-section .nx-panel-header span { color: #64748b; font-size: 12px; }
.fiscal-draft-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.fiscal-sale-draft-form input,
.fiscal-sale-draft-form select,
.fiscal-sale-draft-form textarea { width: 100%; border: 1px solid #d7e2ef; border-radius: 8px; padding: 9px 10px; font-size: 13px; color: #0f2742; background: #fff; }
.fiscal-sale-draft-form textarea { resize: vertical; min-height: 90px; }
.fiscal-readonly-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.fiscal-readonly-grid div { background: #f8fbff; border: 1px solid #e1eaf5; border-radius: 10px; padding: 10px; }
.fiscal-readonly-grid span { display: block; font-size: 11px; color: #64748b; margin-bottom: 4px; }
.fiscal-readonly-grid strong { font-size: 13px; color: #0f2742; font-weight: 600; }
.fiscal-items-wrap { overflow-x: auto; }
.fiscal-draft-items-table th { white-space: nowrap; }
.fiscal-draft-items-table td { vertical-align: middle; }
.fiscal-draft-items-table td:first-child { min-width: 220px; }
.fiscal-draft-items-table td:first-child strong { display: block; font-size: 12px; color: #0f2742; }
.fiscal-draft-items-table td:first-child small { display: block; color: #64748b; margin-top: 3px; }
.fiscal-draft-items-table input,
.fiscal-draft-items-table select { min-width: 88px; padding: 7px 8px; font-size: 12px; }
.fiscal-values-section .form-group { margin-bottom: 12px; }
.fiscal-summary-section .client-profile-money-grid div { background: #f8fbff; border: 1px solid #e1eaf5; }
.fiscal-draft-alert { margin: 14px 0; border: 1px solid #fde68a; background: #fffbeb; color: #92400e; border-radius: 12px; padding: 12px 14px; }
.fiscal-draft-alert ul { margin: 8px 0 0 18px; padding: 0; }
.fiscal-draft-ready-section { margin-top: 16px; padding: 18px; border: 1px solid #dbeafe; background: #f8fbff; }
.fiscal-ready-content { display: flex; gap: 16px; align-items: center; }
.fiscal-ready-content > i { width: 54px; height: 54px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; background: #e0f2fe; color: #0369a1; font-size: 24px; }
.fiscal-ready-content h3 { margin: 0 0 4px; font-size: 16px; color: #0f2f57; }
.fiscal-ready-content p { margin: 0; color: #64748b; font-size: 13px; }
.fiscal-ready-content .btn { margin-left: auto; }
.action-fiscal { color: #0f766e; }
@media (max-width: 900px) { .fiscal-ready-content { align-items: flex-start; flex-direction: column; } .fiscal-ready-content .btn { margin-left: 0; } }

/* v163 - Autocomplete fiscal NCM/CFOP no rascunho da NF-e */
.fiscal-autocomplete-cell {
    position: relative;
    min-width: 132px;
}

.fiscal-autocomplete-cell input {
    width: 100%;
}

.fiscal-autocomplete-suggestions {
    position: absolute;
    z-index: 60;
    top: calc(100% + 6px);
    left: 0;
    width: min(420px, 80vw);
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d7e2ef;
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .16);
    padding: 6px;
}

.fiscal-autocomplete-suggestions.hidden {
    display: none;
}

.fiscal-autocomplete-option {
    width: 100%;
    border: 0;
    background: transparent;
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px;
    align-items: start;
    text-align: left;
    padding: 9px 10px;
    border-radius: 10px;
    cursor: pointer;
    color: #12365f;
}

.fiscal-autocomplete-option:hover {
    background: #eef7ff;
}

.fiscal-autocomplete-option strong {
    font-size: 12px;
    color: #052e5f;
}

.fiscal-autocomplete-option span,
.fiscal-autocomplete-empty {
    font-size: 12px;
    line-height: 1.35;
    color: #49627f;
}

.fiscal-autocomplete-empty {
    padding: 12px;
}

/* v164 - Autocomplete fiscal em portal global para evitar corte/scroll dentro da tabela */
.fiscal-sale-draft-page .sale-view-table-wrap.fiscal-items-wrap {
    overflow-x: auto;
    overflow-y: visible;
}

.fiscal-sale-draft-page .nx-panel,
.fiscal-sale-draft-page .fiscal-draft-section,
.fiscal-sale-draft-page .table-responsive {
    overflow: visible;
}

.fiscal-autocomplete-portal {
    position: fixed;
    z-index: 9999;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #cfe0f4;
    border-radius: 12px;
    box-shadow: 0 22px 55px rgba(15, 23, 42, .20);
    padding: 6px;
}

.fiscal-autocomplete-portal.hidden {
    display: none;
}

.fiscal-autocomplete-portal .fiscal-autocomplete-option {
    width: 100%;
    border: 0;
    background: transparent;
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 10px;
    align-items: start;
    text-align: left;
    padding: 9px 10px;
    border-radius: 10px;
    cursor: pointer;
    color: #12365f;
}

.fiscal-autocomplete-portal .fiscal-autocomplete-option:hover {
    background: #eef7ff;
}

.fiscal-autocomplete-portal .fiscal-autocomplete-option strong {
    font-size: 12px;
    color: #052e5f;
}

.fiscal-autocomplete-portal .fiscal-autocomplete-option span,
.fiscal-autocomplete-portal .fiscal-autocomplete-empty {
    font-size: 12px;
    line-height: 1.35;
    color: #49627f;
}

.fiscal-autocomplete-portal .fiscal-autocomplete-empty {
    padding: 12px;
}

/* O rascunho fiscal deve parecer formulário contínuo, sem cartões isolados com rolagens internas. */
.fiscal-sale-draft-form .fiscal-draft-section {
    border-radius: 0;
    margin-top: 0;
    border-bottom: 0;
}

.fiscal-sale-draft-form .fiscal-draft-section:first-of-type {
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.fiscal-sale-draft-form .fiscal-summary-section {
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}


/* =====================================================
   V165 - Correcoes venda/orcamento: data da venda e botao adicionar
   ===================================================== */
.commercial-sale-form-page .commercial-add-btn,
.commercial-sale-form-page button#commercialAddItemBtn {
    opacity: 1 !important;
    visibility: visible !important;
    background: var(--nx-teal, #00bfa5) !important;
    border-color: var(--nx-teal, #00bfa5) !important;
    color: #ffffff !important;
    pointer-events: auto !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}
.commercial-sale-form-page .commercial-add-btn i,
.commercial-sale-form-page button#commercialAddItemBtn i {
    color: #ffffff !important;
}
.commercial-sale-form-page .commercial-add-btn:hover,
.commercial-sale-form-page button#commercialAddItemBtn:hover {
    background: var(--nx-teal-dark, #008d7b) !important;
    border-color: var(--nx-teal-dark, #008d7b) !important;
    color: #ffffff !important;
}

/* V166 - Origem fiscal somente leitura no rascunho NF-e
   A origem da mercadoria deve ser parametrizada na aba fiscal do produto.
   Na emissão da NF-e ela é herdada e exibida sem edição manual. */
.fiscal-origin-readonly {
    min-width: 170px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 11px;
    border: 1px solid #d7e2ef;
    border-radius: 10px;
    background: #f8fafc;
    color: #0f2f5f;
    font-size: 12px;
    line-height: 1.25;
}
.fiscal-origin-readonly i {
    color: #64748b;
    font-size: 11px;
}

/* ============================================================
   V168 - Cadastro de clientes no padrão premium da Ordem de Serviço
   Mantém cadastros grandes em página, centralizados e com blocos consistentes.
   ============================================================ */
.client-form-page.nortex-form-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 4px 0 34px;
    background: transparent !important;
}
.client-form-page.nortex-form-page .nortex-page-header {
    margin-bottom: 18px;
}
.client-form-page.nortex-form-page .nortex-page-header h1 i {
    color: #0f172a;
}
.client-form-page.nortex-form-page .client-page-status-card {
    max-width: 128px;
    margin: -14px 0 14px auto;
    padding: 12px 14px;
    border: 1px solid var(--nx-border, #DDE7F3);
    border-radius: 16px;
    background: #FBFCFE;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .035);
}
.client-form-page.nortex-form-page .client-page-status-card span {
    color: #64748B;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
}
.client-form-page.nortex-form-page .client-page-status-card strong {
    color: #0F2746;
    font-size: 16px;
    font-weight: 700;
}
.client-form-page.nortex-form-page .client-form-premium {
    padding: 0 !important;
    display: grid;
    gap: 18px;
    overflow: visible !important;
}
.client-form-page.nortex-form-page .client-form-section {
    background: #fff !important;
    border: 1px solid var(--nx-border, #DDE7F3) !important;
    border-radius: 20px !important;
    padding: 20px !important;
    margin: 0 !important;
    box-shadow: 0 14px 38px rgba(15, 23, 42, .045) !important;
}
.client-form-page.nortex-form-page .client-form-section-title {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 0 !important;
    border-bottom: none !important;
}
.client-form-page.nortex-form-page .client-form-section-title i {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(0, 191, 165, .10) !important;
    color: #008D7B !important;
    flex: 0 0 auto;
}
.client-form-page.nortex-form-page .client-form-section-title h3 {
    margin: 0 0 4px !important;
    padding: 0 !important;
    border: none !important;
    color: var(--nx-text, #0F172A) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em;
}
.client-form-page.nortex-form-page .client-form-section-title p {
    margin: 0;
    color: var(--nx-muted, #64748B);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 400;
}
.client-form-page.nortex-form-page .client-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
    background: #FBFCFE !important;
    border: 1px solid #EEF2F7 !important;
    border-radius: 16px !important;
    padding: 18px !important;
    margin: 0 !important;
    box-shadow: none !important;
}
.client-form-page.nortex-form-page .client-form-grid .form-group {
    margin-bottom: 0;
}
.client-form-page.nortex-form-page .client-form-grid label {
    color: #0F2746;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 7px;
}
.client-form-page.nortex-form-page .client-form-grid input,
.client-form-page.nortex-form-page .client-form-grid select,
.client-form-page.nortex-form-page .client-form-grid textarea {
    min-height: 42px;
    border: 1px solid #CFE0F2 !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #0F2746;
    box-shadow: none !important;
}
.client-form-page.nortex-form-page .client-form-grid input:focus,
.client-form-page.nortex-form-page .client-form-grid select:focus,
.client-form-page.nortex-form-page .client-form-grid textarea:focus {
    border-color: #00BFA5 !important;
    box-shadow: 0 0 0 3px rgba(0, 191, 165, .12) !important;
}
.client-form-page.nortex-form-page .client-checkbox-box {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #E2E8F0 !important;
    border-radius: 12px !important;
    background: #fff !important;
    padding: 10px 12px !important;
}
.client-form-page.nortex-form-page .client-checkbox-box label {
    margin: 0;
    color: #0F2746;
    font-weight: 500;
}
.client-form-page.nortex-form-page .input-group .btn {
    min-height: 42px;
    border-radius: 10px;
}
.client-form-page.nortex-form-page .nortex-form-actions {
    max-width: 1180px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .client-form-page.nortex-form-page .client-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .client-form-page.nortex-form-page .client-span-2 {
        grid-column: span 2;
    }
}
@media (max-width: 640px) {
    .client-form-page.nortex-form-page {
        padding: 0 0 24px;
    }
    .client-form-page.nortex-form-page .client-page-status-card {
        max-width: none;
        margin: 0 0 14px;
    }
    .client-form-page.nortex-form-page .client-form-section {
        padding: 16px !important;
        border-radius: 16px !important;
    }
    .client-form-page.nortex-form-page .client-form-grid {
        grid-template-columns: 1fr;
        padding: 14px !important;
    }
    .client-form-page.nortex-form-page .client-span-2 {
        grid-column: span 1;
    }
}

/* ================= LOGIN PREMIUM NORTEX ================= */
.premium-login-page {
    background: #050b18;
    overflow: hidden;
}

.premium-login-layout {
    display: grid;
    grid-template-columns: 58% 42%;
    width: 100%;
    min-height: 100vh;
}

.login-showcase {
    position: relative;
    background: radial-gradient(circle at top, #0f3b8f 0%, #071223 45%, #020817 100%);
    padding: 50px;
    overflow: hidden;
}

.login-overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

.showcase-content { position: relative; z-index: 2; }
.showcase-top-brand { display:flex; align-items:center; gap:16px; color:#fff; margin-bottom:40px; }
.showcase-top-brand img { height:48px; }
.showcase-top-brand span { color:#cbd5e1; font-size:20px; }
.showcase-badge { color:#2dd4bf; font-weight:700; font-size:13px; letter-spacing:1px; }
.showcase-text h1 { font-size:62px; line-height:1.1; color:#fff; max-width:700px; margin:18px 0; }
.showcase-text p { color:#cbd5e1; max-width:620px; font-size:21px; line-height:1.7; }
.showcase-features { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; margin-top:40px; }
.showcase-feature { background:rgba(15,23,42,.6); border:1px solid rgba(45,212,191,.2); border-radius:18px; padding:20px; color:#fff; }
.showcase-feature i { color:#2dd4bf; font-size:28px; margin-bottom:15px; }
.showcase-feature span { display:block; color:#cbd5e1; font-size:14px; margin-top:5px; line-height:1.5; }
.dashboard-preview-card { margin-top:35px; background:rgba(255,255,255,.04); border-radius:24px; padding:20px; border:1px solid rgba(255,255,255,.08); box-shadow:0 30px 60px rgba(0,0,0,.4); }
.dashboard-preview-card img { width:100%; border-radius:16px; }
.showcase-security { display:flex; gap:30px; margin-top:28px; color:#dbeafe; font-size:14px; flex-wrap:wrap; }
.showcase-security i { color:#2dd4bf; margin-right:8px; }
.login-panel { display:flex; align-items:center; justify-content:center; background:#f8fafc; padding:30px; }
.login-panel-card { width:100%; max-width:560px; background:#fff; border-radius:32px; padding:50px; box-shadow:0 20px 80px rgba(15,23,42,.12); }
.premium-login-header { margin-bottom:30px; }
.premium-login-header .large { height:72px; }
.login-welcome { text-align:center; margin-bottom:35px; }
.login-welcome h2 { font-size:38px; color:#0f172a; margin-bottom:8px; }
.login-welcome span { color:#64748b; font-size:18px; }
.premium-input-group { margin-bottom:22px; }
.input-icon-wrapper { position:relative; }
.input-icon-wrapper i { position:absolute; left:18px; top:50%; transform:translateY(-50%); color:#94a3b8; }
.premium-login-form input { padding:16px 18px 16px 52px !important; border-radius:16px !important; height:60px; font-size:16px !important; }
.login-actions-row { display:flex; justify-content:space-between; align-items:center; margin-bottom:24px; }
.login-actions-row a { color:#14b8a6; text-decoration:none; font-weight:600; }
.premium-login-btn { height:60px; border-radius:16px !important; background:linear-gradient(135deg,#14b8a6,#0ea5a4) !important; border:none !important; font-size:18px !important; font-weight:700 !important; }
.premium-login-btn i { margin-right:10px; }
.login-security-cards { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-top:35px; }
.login-security-cards div { background:#f8fafc; border:1px solid #e2e8f0; border-radius:18px; padding:18px; text-align:center; }
.login-security-cards i { color:#14b8a6; font-size:28px; margin-bottom:10px; }
.login-security-cards strong { display:block; color:#0f172a; margin-bottom:5px; }
.login-security-cards span { color:#64748b; font-size:13px; }

@media (max-width: 1200px) {
    .premium-login-layout { grid-template-columns:1fr; }
    .login-showcase { display:none; }
}

/* ================= LOGIN CLEAN PREMIUM NORTEX v171 ================= */
.clean-login-page {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: #eef5ff;
    display: block !important;
}

.clean-login-bg {
    position: relative;
    width: 100%;
    min-width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px 18px;
    overflow: hidden;
    box-sizing: border-box;
    background:
        radial-gradient(circle at 50% 36%, rgba(255,255,255,.92) 0%, rgba(248,252,255,.78) 30%, rgba(231,241,252,.72) 68%, rgba(216,231,248,.86) 100%),
        linear-gradient(135deg, #f8fbff 0%, #edf5ff 45%, #dbeafa 100%);
}

.clean-login-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(59,130,246,.035) 1px, transparent 1px),
        linear-gradient(rgba(59,130,246,.03) 1px, transparent 1px);
    background-size: 46px 46px;
    opacity: .45;
    pointer-events: none;
}

.clean-login-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 47%, rgba(255,255,255,.12) 0%, rgba(255,255,255,.64) 25%, rgba(236,245,255,.72) 58%, rgba(226,236,248,.84) 100%);
    pointer-events: none;
}

.clean-login-watermark {
    position: absolute;
    left: max(-120px, -7vw);
    top: 50%;
    transform: translateY(-50%);
    width: clamp(520px, 44vw, 820px);
    opacity: .075;
    filter: saturate(.72) blur(.1px);
    z-index: 1;
    pointer-events: none;
}
.clean-login-watermark img { width: 100%; height: auto; display: block; }

.clean-login-dashboard-bg {
    position: absolute;
    right: max(-210px, -12vw);
    top: 4vh;
    width: clamp(720px, 58vw, 1100px);
    opacity: .105;
    transform: rotate(-1.2deg);
    filter: blur(2px) saturate(.82);
    z-index: 1;
    pointer-events: none;
}
.clean-login-dashboard-bg img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 30px;
    box-shadow: 0 40px 100px rgba(30,64,120,.10);
}

.clean-login-shell {
    position: relative;
    z-index: 3;
    width: 100%;
    min-height: calc(100vh - 68px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.clean-login-card {
    width: min(100%, 520px);
    max-height: none;
    background: rgba(255,255,255,.90);
    border: 1px solid rgba(226,232,240,.92);
    border-radius: 28px;
    padding: clamp(28px, 4vh, 44px) clamp(26px, 3vw, 44px);
    box-shadow: 0 30px 88px rgba(15,23,42,.13);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.clean-login-brand { text-align: center; margin-bottom: 26px; }
.clean-login-logo { height: clamp(58px, 7vh, 72px); width: auto; max-width: 250px; object-fit: contain; }
.clean-login-brand p { margin: 8px 0 0; color: #64748b; font-size: 14px; }

.clean-login-title { text-align: center; margin-bottom: 24px; }
.clean-login-title h1 { margin: 0 0 8px; color: #0f172a; font-size: clamp(25px, 2.6vw, 31px); line-height: 1.15; font-weight: 800; }
.clean-login-title span { color: #64748b; font-size: 16px; }

.clean-login-form { display: block; }
.clean-form-group { margin-bottom: 17px; }
.clean-form-group label { display: block; color: #0f172a; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.clean-input-wrapper { position: relative; }
.clean-input-wrapper i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 16px;
    z-index: 2;
}
.clean-input-wrapper input {
    width: 100%;
    height: 52px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: rgba(255,255,255,.94);
    padding: 0 16px 0 48px;
    color: #0f172a;
    font-size: 15px;
    outline: none;
    box-sizing: border-box;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.clean-input-wrapper input:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 4px rgba(20,184,166,.13);
    background: #fff;
}
.clean-input-wrapper input:-webkit-autofill,
.clean-input-wrapper input:-webkit-autofill:hover,
.clean-input-wrapper input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px rgba(255,255,255,.96) inset !important;
    -webkit-text-fill-color: #0f172a !important;
    transition: background-color 9999s ease-in-out 0s;
}

.clean-login-options { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 8px 0 22px; }
.clean-remember { display: inline-flex; align-items: center; gap: 9px; color: #334155; font-size: 14px; cursor: pointer; }
.clean-remember input { width: 16px; height: 16px; accent-color: #14b8a6; }
.clean-login-options a { color: #0f9f92; text-decoration: none; font-weight: 700; font-size: 14px; }
.clean-login-options a:hover { text-decoration: underline; }

.clean-login-button {
    width: 100%;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(135deg,#14b8a6 0%,#0d9488 100%);
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 18px 36px rgba(20,184,166,.24);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.clean-login-button:hover { transform: translateY(-1px); filter: brightness(1.02); box-shadow: 0 20px 42px rgba(20,184,166,.30); }

.clean-login-divider { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; margin: 26px 0 20px; color: #94a3b8; }
.clean-login-divider span { height: 1px; background: #e2e8f0; }
.clean-login-divider small { font-size: 13px; }

.clean-trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.clean-trust-grid div {
    min-height: 92px;
    border-radius: 16px;
    background: rgba(248,250,252,.78);
    border: 1px solid rgba(226,232,240,.9);
    text-align: center;
    padding: 14px 8px;
    box-sizing: border-box;
}
.clean-trust-grid i { color: #14b8a6; font-size: 24px; margin-bottom: 8px; }
.clean-trust-grid strong { display: block; color: #0f172a; font-size: 13px; line-height: 1.2; margin-bottom: 3px; }
.clean-trust-grid span { display: block; color: #64748b; font-size: 12px; line-height: 1.25; }

.clean-login-footer { text-align: center; color: #94a3b8; font-size: 13px; margin-top: 26px; }

@media (max-height: 760px) {
    .clean-login-bg { align-items: flex-start; padding-top: 18px; padding-bottom: 18px; }
    .clean-login-shell { min-height: auto; }
    .clean-login-card { padding-top: 24px; padding-bottom: 24px; }
    .clean-login-brand { margin-bottom: 16px; }
    .clean-login-logo { height: 52px; }
    .clean-login-title { margin-bottom: 17px; }
    .clean-form-group { margin-bottom: 12px; }
    .clean-input-wrapper input { height: 47px; }
    .clean-login-button { height: 49px; }
    .clean-login-divider { margin: 17px 0 13px; }
    .clean-trust-grid div { min-height: 76px; padding: 9px 6px; }
    .clean-trust-grid i { font-size: 20px; margin-bottom: 5px; }
    .clean-login-footer { margin-top: 16px; }
}

@media (max-width: 900px) {
    .clean-login-bg { padding: 22px 14px; }
    .clean-login-dashboard-bg { right: -54vw; width: 150vw; opacity: .10; top: 8vh; }
    .clean-login-watermark { left: -32vw; width: 105vw; opacity: .065; }
}

@media (max-width: 560px) {
    .clean-login-bg { padding: 18px 12px; }
    .clean-login-dashboard-bg { right: -90vw; width: 210vw; opacity: .08; }
    .clean-login-watermark { left: -58vw; width: 160vw; opacity: .055; }
    .clean-login-card { border-radius: 24px; padding: 25px 18px; }
    .clean-login-options { align-items: flex-start; flex-direction: column; }
    .clean-trust-grid { grid-template-columns: 1fr; }
    .clean-trust-grid div { min-height: auto; }
}

/* =========================================================
   Fluxo de Caixa Inteligente - v177
   ========================================================= */
.cash-flow-header {
    align-items: center;
}

.cash-flow-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 240px)) auto;
    gap: 14px;
    align-items: end;
    padding: 18px;
    margin-bottom: 18px;
}

.cash-flow-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.cash-flow-kpi {
    background: #ffffff;
    border: 1px solid #e5edf7;
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .04);
}

.cash-flow-kpi span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 8px;
}

.cash-flow-kpi strong {
    color: #0f172a;
    font-size: 22px;
    font-weight: 800;
}

.cash-flow-kpi.income strong { color: #15803d; }
.cash-flow-kpi.expense strong { color: #b91c1c; }
.cash-flow-kpi.balance strong { color: #1d4ed8; }

.cash-flow-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, .8fr);
    gap: 18px;
    margin-bottom: 18px;
}

.cash-flow-main-card,
.cash-flow-side-card {
    padding: 18px;
}

.cash-flow-projection-list,
.cash-flow-alerts {
    display: grid;
    gap: 12px;
}

.cash-flow-projection-list > div {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    background: #f8fafc;
}

.cash-flow-projection-list span,
.cash-flow-projection-list small {
    display: block;
    color: #64748b;
    font-size: 12px;
}

.cash-flow-projection-list strong {
    display: block;
    color: #0f172a;
    font-size: 19px;
    margin: 4px 0;
}

.cash-flow-alert {
    border-radius: 14px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.cash-flow-alert strong,
.cash-flow-alert span {
    display: block;
}

.cash-flow-alert strong {
    font-size: 14px;
    color: #0f172a;
    margin-bottom: 4px;
}

.cash-flow-alert span {
    color: #475569;
    font-size: 13px;
}

.cash-flow-alert.danger {
    border-color: #fecaca;
    background: #fef2f2;
}

.cash-flow-alert.warning {
    border-color: #fde68a;
    background: #fffbeb;
}

.cash-flow-alert.success {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.cash-flow-table-wrap {
    max-height: 420px;
    overflow: auto;
}

@media (max-width: 1100px) {
    .cash-flow-kpi-grid,
    .cash-flow-layout,
    .cash-flow-filter {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Fluxo de Caixa Inteligente - v178
   ========================================================= */
.cash-flow-kpi-grid-extended {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.cash-flow-kpi small {
    display: block;
    color: #64748b;
    font-size: 11px;
    margin-top: 6px;
    line-height: 1.35;
}

.cash-flow-kpi.warning strong { color: #b45309; }

.cash-flow-presets {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cash-flow-presets button {
    border: 1px solid #dbe7f3;
    background: #f8fafc;
    color: #334155;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: .18s ease;
}

.cash-flow-presets button:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.cash-flow-insight-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.cash-flow-insight-grid > div {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 14px;
    padding: 12px 14px;
}

.cash-flow-insight-grid span,
.cash-flow-insight-grid strong {
    display: block;
}

.cash-flow-insight-grid span {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.cash-flow-insight-grid strong {
    color: #0f172a;
    font-size: 17px;
    margin-top: 3px;
}

.cash-flow-breakdown {
    display: grid;
    gap: 12px;
}

.cash-flow-breakdown-row {
    display: grid;
    grid-template-columns: minmax(120px, .7fr) minmax(160px, 1.2fr) minmax(150px, .8fr);
    gap: 14px;
    align-items: center;
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 10px;
}

.cash-flow-breakdown-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.cash-flow-breakdown-row strong,
.cash-flow-breakdown-row small {
    display: block;
}

.cash-flow-breakdown-row strong {
    color: #0f172a;
    font-size: 13px;
}

.cash-flow-breakdown-row small {
    color: #64748b;
    font-size: 11px;
    margin-top: 3px;
}

.cash-flow-breakdown-bar {
    height: 9px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.cash-flow-breakdown-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3b82f6, #93c5fd);
}

.cash-flow-table-wrap.compact {
    max-height: 330px;
}

@media (max-width: 1200px) {
    .cash-flow-kpi-grid-extended {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 760px) {
    .cash-flow-kpi-grid-extended,
    .cash-flow-breakdown-row {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Fluxo de Caixa Premium UI - v180
   Padrão visual executivo para o módulo Financeiro > Fluxo de Caixa
   ========================================================= */
.cashflow-premium-page {
    display: grid;
    gap: 18px;
    padding-bottom: 26px;
}

.cashflow-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 20px;
    align-items: stretch;
    padding: 22px;
    border: 1px solid rgba(219, 231, 243, .95);
    background:
        radial-gradient(circle at top right, rgba(20, 184, 166, .14), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #f8fbff 54%, #eef8ff 100%);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .055);
    overflow: hidden;
    position: relative;
}

.cashflow-hero::after {
    content: "";
    position: absolute;
    inset: auto -80px -120px auto;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: rgba(37, 99, 235, .08);
    pointer-events: none;
}

.cashflow-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0f766e;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 10px;
}

.cashflow-hero h1 {
    margin: 0;
    color: #0f172a;
    font-size: 28px;
    line-height: 1.15;
    font-weight: 850;
}

.cashflow-hero p {
    max-width: 720px;
    color: #475569;
    margin: 8px 0 0;
    line-height: 1.55;
}

.cashflow-hero-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.cashflow-hero-meta span,
.cashflow-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #dbeafe;
    background: rgba(255, 255, 255, .76);
    color: #334155;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 750;
}

.cashflow-status-pill.success { color: #047857; border-color: #bbf7d0; background: #f0fdf4; }
.cashflow-status-pill.danger { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
.cashflow-status-pill.neutral { color: #475569; border-color: #e2e8f0; background: #f8fafc; }

.cashflow-hero-panel {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 6px;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, .86);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 14px 28px rgba(15, 23, 42, .04);
}

.cashflow-hero-panel span,
.cashflow-mini-card span,
.cashflow-health-card span,
.cashflow-premium-kpi span {
    color: #64748b;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .065em;
    text-transform: uppercase;
}

.cashflow-hero-panel strong {
    color: #0f172a;
    font-size: 30px;
    font-weight: 900;
}

.cashflow-hero-panel small {
    color: #64748b;
    font-size: 12px;
    margin-bottom: 8px;
}

.cashflow-filter-panel {
    padding: 16px;
    display: grid;
    gap: 14px;
    border: 1px solid #e5edf7;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .04);
}

.cashflow-filter-fields {
    display: grid;
    grid-template-columns: minmax(170px, 220px) minmax(170px, 220px) minmax(180px, 1fr);
    gap: 14px;
    align-items: end;
}

.cashflow-filter-fields .btn {
    min-height: 42px;
    justify-content: center;
}

.cashflow-presets-premium {
    border-top: 1px solid #eef2f7;
    padding-top: 12px;
}

.cashflow-presets-premium button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #ffffff;
    color: #334155;
    border-color: #dbe7f3;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .035);
}

.cashflow-presets-premium button:hover {
    transform: translateY(-1px);
}

.cashflow-executive-strip,
.cashflow-kpi-premium-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(190px, 1fr));
    gap: 14px;
}

.cashflow-health-card,
.cashflow-mini-card,
.cashflow-premium-kpi,
.cashflow-panel {
    border: 1px solid #e5edf7;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .045);
}

.cashflow-health-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 17px;
    background: #ffffff;
}

.cashflow-health-card strong,
.cashflow-mini-card strong,
.cashflow-premium-kpi strong {
    display: block;
    margin-top: 6px;
    color: #0f172a;
    font-weight: 900;
}

.cashflow-health-card strong { font-size: 21px; }
.cashflow-mini-card strong { font-size: 22px; }
.cashflow-premium-kpi strong { font-size: 24px; }

.cashflow-health-card small,
.cashflow-mini-card small,
.cashflow-premium-kpi small {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.cashflow-health-ring {
    --score: 0;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: conic-gradient(#14b8a6 calc(var(--score) * 1%), #e2e8f0 0);
    position: relative;
}

.cashflow-health-ring::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: inherit;
    background: #ffffff;
}

.cashflow-health-ring b {
    position: relative;
    z-index: 1;
    color: #0f172a;
    font-size: 15px;
    font-weight: 900;
}

.cashflow-mini-card {
    padding: 17px;
    background: #ffffff;
}

.cashflow-premium-kpi {
    position: relative;
    overflow: hidden;
    padding: 18px;
    border-radius: 18px;
    background: #ffffff;
}

.cashflow-premium-kpi::after {
    content: "";
    position: absolute;
    inset: auto -38px -54px auto;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    opacity: .10;
    background: #64748b;
}

.cashflow-premium-kpi.tone-success::after { background: #16a34a; }
.cashflow-premium-kpi.tone-danger::after { background: #dc2626; }
.cashflow-premium-kpi.tone-blue::after { background: #2563eb; }

.cashflow-kpi-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cashflow-kpi-icon {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: #f1f5f9;
    color: #334155;
}

.cashflow-premium-kpi.tone-success .cashflow-kpi-icon { color: #047857; background: #ecfdf5; }
.cashflow-premium-kpi.tone-danger .cashflow-kpi-icon { color: #b91c1c; background: #fef2f2; }
.cashflow-premium-kpi.tone-blue .cashflow-kpi-icon { color: #1d4ed8; background: #eff6ff; }

.cashflow-premium-grid {
    display: grid;
    gap: 18px;
}

.cashflow-premium-grid.main {
    grid-template-columns: minmax(0, 1.65fr) minmax(310px, .8fr);
}

.cashflow-premium-grid.secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cashflow-panel {
    padding: 18px;
    background: #ffffff;
}

.cashflow-panel.full {
    min-width: 0;
}

.cashflow-chart-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cashflow-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 6px 10px;
    background: #f8fafc;
}

.cashflow-chart-legend span::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #64748b;
}
.cashflow-chart-legend .income::before { background: #16a34a; }
.cashflow-chart-legend .expense::before { background: #dc2626; }
.cashflow-chart-legend .balance::before { background: #2563eb; }

.cashflow-combo-chart {
    min-height: 300px;
    border: 1px dashed #dbe7f3;
    border-radius: 18px;
    padding: 12px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.cashflow-combo-chart svg {
    width: 100%;
    height: 292px;
}

.cashflow-bar-income { fill: #16a34a; opacity: .82; }
.cashflow-bar-expense { fill: #dc2626; opacity: .78; }
.cashflow-bar-balance { fill: #2563eb; opacity: .82; }
.cashflow-bar { transition: opacity .18s ease; }
.cashflow-day-group:hover .cashflow-bar { opacity: 1; }

.chart-grid-line { stroke: #e2e8f0; stroke-width: 1; }
.chart-axis-line { stroke: #cbd5e1; stroke-width: 1; }
.chart-axis-value,
.chart-axis-label { fill: #64748b; font-size: 10px; font-weight: 700; }

.cashflow-projection-premium {
    display: grid;
    gap: 12px;
}

.cashflow-projection-item {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px;
    background: linear-gradient(135deg, #f8fafc, #ffffff);
}

.cashflow-projection-item div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.cashflow-projection-item span {
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
}

.cashflow-projection-item strong {
    color: #0f172a;
    font-size: 19px;
    font-weight: 900;
}

.cashflow-projection-item small {
    display: block;
    color: #64748b;
    font-size: 11px;
    margin-top: 6px;
}

.cashflow-insight-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.cashflow-insight-cards div {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 16px;
    padding: 14px;
}

.cashflow-insight-cards span,
.cashflow-insight-cards strong,
.cashflow-insight-cards small {
    display: block;
}

.cashflow-insight-cards span {
    color: #64748b;
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.cashflow-insight-cards strong {
    color: #0f172a;
    margin-top: 6px;
    font-size: 18px;
    font-weight: 900;
}

.cashflow-insight-cards small {
    color: #64748b;
    margin-top: 3px;
    font-size: 11px;
}

.premium-alerts .cash-flow-alert {
    border-radius: 16px;
    box-shadow: none;
}

.premium-table-wrap {
    border: 1px solid #e5edf7;
    border-radius: 16px;
    overflow: auto;
}

.cashflow-table-premium thead th {
    background: #f8fafc;
    color: #334155;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.success-text { color: #047857 !important; }
.danger-text { color: #b91c1c !important; }

@media (max-width: 1280px) {
    .cashflow-executive-strip,
    .cashflow-kpi-premium-grid {
        grid-template-columns: repeat(2, minmax(190px, 1fr));
    }
    .cashflow-premium-grid.main,
    .cashflow-premium-grid.secondary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .cashflow-hero,
    .cashflow-filter-fields,
    .cashflow-executive-strip,
    .cashflow-kpi-premium-grid,
    .cashflow-insight-cards {
        grid-template-columns: 1fr;
    }
    .cashflow-hero h1 { font-size: 23px; }
    .cashflow-hero-panel strong { font-size: 24px; }
    .cashflow-combo-chart svg { min-width: 680px; }
    .chart-panel { overflow-x: auto; }
}

/* =====================================================
   Nortex v183 - Dashboard Inteligente do Fluxo de Caixa
   ===================================================== */
.cashflow-executive-page .executive-hero {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
    background:
        radial-gradient(circle at 12% 10%, rgba(59, 130, 246, .14), transparent 34%),
        radial-gradient(circle at 92% 18%, rgba(20, 184, 166, .14), transparent 30%),
        linear-gradient(135deg, #f8fbff 0%, #ffffff 58%, #f0f7ff 100%);
}

.executive-score-panel {
    align-items: center;
    justify-items: center;
    text-align: center;
}

.cashflow-health-ring.large {
    width: 86px;
    height: 86px;
    flex-basis: 86px;
    margin: 4px 0;
}

.cashflow-health-ring.large::after { inset: 8px; }
.cashflow-health-ring.large b { font-size: 22px; }

.cashflow-strip-icon {
    color: #0f766e;
    background: #ecfdf5;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
}

.cashflow-projection-item.danger {
    border-color: #fecaca;
    background: linear-gradient(135deg, #fff7f7, #ffffff);
}

.cashflow-dre-box {
    display: grid;
    gap: 10px;
}

.cashflow-dre-row,
.cashflow-dre-margin {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 13px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.cashflow-dre-row span,
.cashflow-dre-margin span {
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
}

.cashflow-dre-row strong,
.cashflow-dre-margin strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 900;
}

.cashflow-dre-row.success strong { color: #047857; }
.cashflow-dre-row.danger strong { color: #b91c1c; }
.cashflow-dre-row.warning strong { color: #b45309; }

.cashflow-dre-margin {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.cashflow-dre-margin strong { color: #1d4ed8; }
.cashflow-dre-box > small {
    color: #64748b;
    font-size: 11px;
    line-height: 1.4;
}

.cashflow-executive-indicators {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.cashflow-executive-indicators > div {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 16px;
    padding: 14px;
}

.cashflow-executive-indicators span,
.cashflow-executive-indicators strong {
    display: block;
}

.cashflow-executive-indicators span {
    color: #64748b;
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.cashflow-executive-indicators strong {
    color: #0f172a;
    margin-top: 6px;
    font-size: 16px;
    font-weight: 900;
}

.cashflow-heatmap {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 8px;
}

.cashflow-heatmap-day {
    min-height: 58px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #f8fafc;
    padding: 8px;
    display: grid;
    align-content: space-between;
}

.cashflow-heatmap-day span {
    color: #64748b;
    font-size: 10px;
    font-weight: 850;
}

.cashflow-heatmap-day strong {
    color: #0f172a;
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cashflow-heatmap-day.ok { background: #f0fdf4; border-color: #bbf7d0; }
.cashflow-heatmap-day.warning { background: #fffbeb; border-color: #fde68a; }
.cashflow-heatmap-day.danger { background: #fef2f2; border-color: #fecaca; }

.cashflow-heatmap-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.cashflow-heatmap-legend span {
    font-size: 11px;
    font-weight: 850;
    border-radius: 999px;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
}
.cashflow-heatmap-legend .ok { color: #047857; background: #f0fdf4; border-color: #bbf7d0; }
.cashflow-heatmap-legend .warning { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.cashflow-heatmap-legend .danger { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }

.cashflow-timeline {
    position: relative;
    display: grid;
    gap: 12px;
    max-height: 370px;
    overflow: auto;
    padding-right: 4px;
}

.cashflow-timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
}

.cashflow-timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 5px;
    background: #2563eb;
    box-shadow: 0 0 0 4px #eff6ff;
}

.cashflow-timeline-item.expense .cashflow-timeline-dot {
    background: #dc2626;
    box-shadow: 0 0 0 4px #fef2f2;
}
.cashflow-timeline-item.income .cashflow-timeline-dot {
    background: #16a34a;
    box-shadow: 0 0 0 4px #f0fdf4;
}

.cashflow-timeline-item span,
.cashflow-timeline-item strong,
.cashflow-timeline-item small {
    display: block;
}

.cashflow-timeline-item span {
    color: #64748b;
    font-size: 11px;
    font-weight: 850;
}

.cashflow-timeline-item strong {
    color: #0f172a;
    font-size: 13px;
    margin-top: 2px;
}

.cashflow-timeline-item small {
    color: #64748b;
    font-size: 11px;
    margin-top: 2px;
}

.cashflow-category-list {
    display: grid;
    gap: 12px;
}

.cashflow-category-row {
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
    padding: 13px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.cashflow-category-row b {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 4px;
    background: #2563eb;
}
.cashflow-category-row.income b { background: #16a34a; }
.cashflow-category-row.expense b { background: #dc2626; }

.cashflow-category-row strong,
.cashflow-category-row small,
.cashflow-category-row span {
    position: relative;
    z-index: 1;
}

.cashflow-category-row strong {
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
}

.cashflow-category-row small {
    display: block;
    color: #64748b;
    font-size: 11px;
    margin-top: 3px;
}

.cashflow-category-row > span {
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

@media (max-width: 980px) {
    .cashflow-executive-page .executive-hero,
    .cashflow-executive-indicators {
        grid-template-columns: 1fr;
    }
    .cashflow-heatmap { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* =====================================================
   Nortex v184.2 - Refinamento real da UX financeira
   ===================================================== */
.cashflow-filter-panel-compact {
    padding: 14px 16px;
    gap: 10px;
    border-radius: 18px;
}

.cashflow-filter-panel-compact .cashflow-filter-fields {
    grid-template-columns: minmax(150px, 190px) minmax(150px, 190px) auto;
    justify-content: start;
    align-items: end;
    gap: 12px;
}

.cashflow-filter-panel-compact .form-group label {
    font-size: 11px;
    margin-bottom: 6px;
}

.cashflow-filter-panel-compact .form-control {
    min-height: 38px;
    height: 38px;
    font-size: 13px;
}

.cashflow-filter-submit {
    width: auto !important;
    min-width: 112px !important;
    min-height: 38px !important;
    height: 38px;
    padding: 0 18px !important;
    border-radius: 12px;
    white-space: nowrap;
}

.cashflow-filter-panel-compact .cashflow-presets-premium {
    padding-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cashflow-filter-panel-compact .cashflow-presets-premium button {
    min-height: 32px;
    padding: 7px 11px;
    font-size: 12px;
}

.cashflow-mixed-chart {
    min-height: 322px;
    overflow: hidden;
    padding: 14px 16px 10px;
}

.cashflow-mixed-chart svg {
    width: 100%;
    height: 300px;
    display: block;
}

.cashflow-balance-line {
    fill: none;
    stroke: #2563eb;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 4px 6px rgba(37, 99, 235, .18));
}

.cashflow-line-dot {
    fill: #ffffff;
    stroke: #2563eb;
    stroke-width: 3;
}

.chart-zero-line {
    stroke: #94a3b8;
    stroke-width: 1;
    stroke-dasharray: 4 5;
    opacity: .75;
}

.cashflow-chart-caption {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-align: right;
    margin-top: -4px;
}

.cashflow-risk-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
    gap: 10px;
}

.cashflow-risk-item {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 10px;
    background: #ffffff;
    min-width: 0;
}

.cashflow-risk-date {
    color: #334155;
    font-size: 12px;
    font-weight: 900;
}

.cashflow-risk-value {
    margin-top: 6px;
    color: #0f172a;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cashflow-risk-status {
    margin-top: 4px;
    color: #64748b;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.cashflow-risk-bar {
    height: 5px;
    border-radius: 999px;
    background: #22c55e;
    margin-top: 8px;
}

.cashflow-risk-item.ok {
    background: #f8fffb;
    border-color: #bbf7d0;
}
.cashflow-risk-item.warning {
    background: #fffdf5;
    border-color: #fde68a;
}
.cashflow-risk-item.warning .cashflow-risk-bar { background: #f59e0b; }
.cashflow-risk-item.danger {
    background: #fff8f8;
    border-color: #fecaca;
}
.cashflow-risk-item.danger .cashflow-risk-bar { background: #ef4444; }

.cashflow-timeline {
    gap: 10px;
    max-height: 330px;
}

.cashflow-timeline-item {
    grid-template-columns: 16px minmax(0, 1fr);
    padding: 10px 0;
    border-bottom: 1px solid #eef2f7;
}

.cashflow-timeline-item:last-child { border-bottom: 0; }
.cashflow-timeline-item strong {
    line-height: 1.35;
    word-break: break-word;
}

@media (max-width: 980px) {
    .cashflow-filter-panel-compact .cashflow-filter-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .cashflow-filter-submit {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 760px) {
    .cashflow-filter-panel-compact .cashflow-filter-fields {
        grid-template-columns: 1fr;
    }
    .cashflow-mixed-chart {
        overflow-x: auto;
    }
    .cashflow-mixed-chart svg {
        min-width: 680px;
    }
}

/* =====================================================
   Nortex v185 - Motor de Insights Financeiros
   ===================================================== */
.insight-engine-list {
    gap: 12px;
}

.insight-card {
    position: relative;
    overflow: hidden;
}

.insight-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: rgba(15, 23, 42, .18);
}

.insight-card.danger::before { background: #dc2626; }
.insight-card.warning::before { background: #f59e0b; }
.insight-card.success::before { background: #10b981; }
.insight-card.info::before { background: #2563eb; }

.insight-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 5px;
}

.insight-card-head em {
    font-style: normal;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #475569;
    background: rgba(148, 163, 184, .14);
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 999px;
    padding: 4px 8px;
    white-space: nowrap;
}

.insight-card small {
    display: block;
    margin-top: 9px;
    color: #334155;
    font-size: 12px;
    line-height: 1.45;
}

.insight-card small i {
    color: #d97706;
    margin-right: 5px;
}

/* =====================================================
   Nortex v186 - Refinamento visual dos Insights
   ===================================================== */
.insight-panel-v186 {
    position: relative;
}

.insight-title-row {
    align-items: flex-start;
    gap: 14px;
}

.insight-title-row .btn-sm {
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    white-space: nowrap;
}

.insight-executive-v186 {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.insight-summary-v186 {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(248,250,252,.98), rgba(241,245,249,.86));
    border: 1px solid rgba(148, 163, 184, .24);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}

.insight-summary-v186.danger { background: linear-gradient(135deg, rgba(254,242,242,.98), rgba(255,247,247,.86)); border-color: rgba(248, 113, 113, .26); }
.insight-summary-v186.warning { background: linear-gradient(135deg, rgba(255,251,235,.98), rgba(255,247,237,.86)); border-color: rgba(245, 158, 11, .28); }
.insight-summary-v186.success { background: linear-gradient(135deg, rgba(240,253,244,.98), rgba(236,253,245,.86)); border-color: rgba(16, 185, 129, .25); }
.insight-summary-v186.info { background: linear-gradient(135deg, rgba(239,246,255,.98), rgba(240,249,255,.86)); border-color: rgba(37, 99, 235, .22); }

.insight-summary-main-v186 {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    min-width: 0;
}

.insight-summary-icon-v186 {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, .08);
    color: #0f172a;
    flex: 0 0 auto;
}

.insight-summary-v186.danger .insight-summary-icon-v186 { background: rgba(220, 38, 38, .1); color: #b91c1c; }
.insight-summary-v186.warning .insight-summary-icon-v186 { background: rgba(245, 158, 11, .14); color: #b45309; }
.insight-summary-v186.success .insight-summary-icon-v186 { background: rgba(16, 185, 129, .12); color: #047857; }
.insight-summary-v186.info .insight-summary-icon-v186 { background: rgba(37, 99, 235, .10); color: #1d4ed8; }

.insight-summary-main-v186 span,
.insight-summary-score-v186 span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #64748b;
    font-weight: 800;
    margin-bottom: 4px;
}

.insight-summary-main-v186 strong {
    display: block;
    color: #0f172a;
    font-size: 16px;
    line-height: 1.25;
    margin-bottom: 5px;
}

.insight-summary-main-v186 p {
    margin: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.45;
}

.insight-summary-score-v186 {
    min-width: 120px;
    text-align: right;
    align-self: center;
}

.insight-summary-score-v186 strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.75);
    border: 1px solid rgba(148, 163, 184, .22);
    color: #0f172a;
    font-size: 13px;
}

.insight-stats-v186 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.insight-stats-v186 div {
    padding: 12px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, .9);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

.insight-stats-v186 span {
    display: block;
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 800;
}

.insight-stats-v186 strong {
    display: block;
    color: #0f172a;
    font-size: 20px;
    line-height: 1.1;
    margin-top: 4px;
}

.insight-filters-v186 {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 6px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, .9);
}

.insight-filters-v186 button {
    border: 0;
    background: transparent;
    color: #475569;
    font-weight: 800;
    font-size: 12px;
    padding: 8px 11px;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .18s ease;
}

.insight-filters-v186 button b {
    font-size: 10px;
    min-width: 18px;
    min-height: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(148, 163, 184, .16);
    color: #334155;
}

.insight-filters-v186 button:hover,
.insight-filters-v186 button.active {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .07);
}

.insight-list-v186 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

.insight-card-v186 {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 16px;
    min-height: 168px;
    height: auto;
    padding: 20px 20px 18px 22px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, .95);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .055);
    overflow: visible;
}

.insight-card-v186::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    bottom: 16px;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: #2563eb;
}
.insight-card-v186.danger::before { background: #dc2626; }
.insight-card-v186.warning::before { background: #f59e0b; }
.insight-card-v186.success::before { background: #10b981; }
.insight-card-v186.info::before { background: #2563eb; }

.insight-card-v186-icon {
    width: 40px;
    height: 40px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, .08);
    color: #1d4ed8;
    flex: 0 0 auto;
    margin-top: 2px;
}
.insight-card-v186.danger .insight-card-v186-icon { background: rgba(220, 38, 38, .09); color: #b91c1c; }
.insight-card-v186.warning .insight-card-v186-icon { background: rgba(245, 158, 11, .14); color: #b45309; }
.insight-card-v186.success .insight-card-v186-icon { background: rgba(16, 185, 129, .11); color: #047857; }

.insight-card-v186-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.insight-card-v186-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 0;
}

.insight-card-v186-head > div {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
}

.insight-card-v186-head em {
    font-style: normal;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .045em;
    padding: 4px 8px;
    border-radius: 999px;
    color: #0f172a;
    background: #e0f2fe;
    white-space: nowrap;
    flex: 0 0 auto;
}

.insight-type-badge,
.insight-priority-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .035em;
    border: 1px solid transparent;
    white-space: nowrap;
}

.insight-type-badge.danger { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.insight-type-badge.warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.insight-type-badge.success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.insight-type-badge.info { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }

.insight-priority-badge { background: #f8fafc; color: #475569; border-color: #e2e8f0; }
.insight-priority-badge.priority-critica,
.insight-priority-badge.priority-alta { background: #fff1f2; color: #9f1239; border-color: #fecdd3; }
.insight-priority-badge.priority-media { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }

.insight-card-v186 strong {
    display: block;
    color: #0f172a;
    font-size: 14.5px;
    line-height: 1.35;
    margin: 0;
    word-break: normal;
    overflow-wrap: anywhere;
}

.insight-card-v186 p {
    margin: 0;
    color: #475569;
    font-size: 12.8px;
    line-height: 1.55;
    word-break: normal;
    overflow-wrap: anywhere;
    white-space: normal;
}

.insight-recommendation-v186 {
    margin-top: 4px;
    padding: 11px 12px;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    color: #334155;
    border: 1px solid rgba(226, 232, 240, .95);
    display: flex;
    gap: 9px;
    align-items: flex-start;
    font-size: 12.4px;
    line-height: 1.5;
    min-height: 42px;
    white-space: normal;
    overflow: visible;
}

.insight-recommendation-v186 i {
    color: #d97706;
    margin-top: 2px;
    flex: 0 0 auto;
}

.insight-recommendation-v186 span {
    display: block;
    min-width: 0;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
}

.insight-card-v186-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.insight-card-v186-foot small {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #64748b;
    font-size: 11px;
    background: #f8fafc;
    border-radius: 999px;
    padding: 5px 8px;
    white-space: normal;
}

.insight-empty-v186 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 220px;
    padding: 24px;
    border-radius: 20px;
    border: 1px dashed rgba(148, 163, 184, .45);
    background: #f8fafc;
    color: #64748b;
}

.insight-empty-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #2563eb;
    margin-bottom: 10px;
    box-shadow: 0 12px 22px rgba(15, 23, 42, .06);
}

.insight-empty-v186 strong {
    color: #0f172a;
    margin-bottom: 6px;
}

@media (max-width: 900px) {
    .insight-summary-v186 {
        grid-template-columns: 1fr;
    }
    .insight-summary-score-v186 {
        text-align: left;
    }
    .insight-stats-v186 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .insight-title-row {
        flex-direction: column;
    }
    .insight-title-row .btn-sm {
        width: 100%;
        justify-content: center;
    }
    .insight-card-v186 {
        grid-template-columns: 1fr;
    }
    .insight-card-v186-icon {
        width: 36px;
        height: 36px;
    }
    .insight-stats-v186 {
        grid-template-columns: 1fr;
    }
}

/* v187 - Comunicados SaaS no dashboard da empresa */
.system-announcements-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}
.system-announcement-card {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #3b82f6;
    border-radius: 18px;
    padding: 16px 16px 16px 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}
.system-announcement-card.tone-danger,
.system-announcement-card.tone-billing.priority-critical { border-left-color: #ef4444; }
.system-announcement-card.tone-warning,
.system-announcement-card.tone-billing { border-left-color: #f59e0b; }
.system-announcement-card.tone-success { border-left-color: #10b981; }
.system-announcement-card.tone-info { border-left-color: #3b82f6; }
.system-announcement-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #eff6ff;
    color: #2563eb;
}
.tone-danger .system-announcement-icon,
.tone-billing.priority-critical .system-announcement-icon { background: #fee2e2; color: #dc2626; }
.tone-warning .system-announcement-icon,
.tone-billing .system-announcement-icon { background: #fef3c7; color: #d97706; }
.tone-success .system-announcement-icon { background: #d1fae5; color: #059669; }
.system-announcement-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 7px;
}
.system-announcement-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
}
.system-announcement-content h3 {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: 15px;
    font-weight: 800;
}
.system-announcement-content p {
    margin: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.5;
    white-space: normal;
    word-break: break-word;
}
.system-announcement-close {
    border: 0;
    width: 32px;
    height: 32px;
    border-radius: 11px;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
}
.system-announcement-close:hover { background: #e2e8f0; color: #0f172a; }
.system-announcement-required {
    align-self: flex-start;
    border-radius: 999px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 11px;
    font-weight: 800;
    padding: 6px 10px;
}
.top-icon-btn.has-active-announcements { color: #0f766e; }
.system-announcement-modal { text-align: center; padding: 16px; }
.system-announcement-modal-icon {
    margin: 0 auto 12px;
    width: 58px;
    height: 58px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: #eff6ff;
    color: #2563eb;
    font-size: 24px;
}
.system-announcement-modal.tone-danger .system-announcement-modal-icon { background: #fee2e2; color: #dc2626; }
.system-announcement-modal.tone-warning .system-announcement-modal-icon,
.system-announcement-modal.tone-billing .system-announcement-modal-icon { background: #fef3c7; color: #d97706; }
.system-announcement-modal.tone-success .system-announcement-modal-icon { background: #d1fae5; color: #059669; }
.system-announcement-meta.centered { justify-content: center; }
.system-announcement-modal h2 { margin: 8px 0; color: #0f172a; }
.system-announcement-modal p { color: #475569; line-height: 1.6; white-space: pre-wrap; }
@media (max-width: 760px) {
    .system-announcement-card { grid-template-columns: 38px minmax(0, 1fr); }
    .system-announcement-close, .system-announcement-required { grid-column: 2; justify-self: flex-start; }
}

/* =========================================================
   Nortex v199 - Correção visual premium: Integrações de Pagamento
   Escopo fechado para não afetar outras telas do ERP.
   ========================================================= */
.nx-payment-integrations-page {
    --pi-bg: #f6f8fb;
    --pi-card: #ffffff;
    --pi-border: #e5eaf2;
    --pi-text: #0f172a;
    --pi-muted: #64748b;
    --pi-primary: #00a991;
    --pi-primary-dark: #087f73;
    --pi-soft: #eefcf9;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 4px 2px 32px;
    color: var(--pi-text);
}

.nx-payment-integrations-page .nx-page-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 18px;
}

.nx-payment-integrations-page .nx-page-hero h1 {
    margin: 6px 0 4px;
    color: var(--pi-text);
    font-size: 24px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -.02em;
}

.nx-payment-integrations-page .nx-page-hero p {
    margin: 0;
    color: var(--pi-muted);
    font-size: 13px;
    line-height: 1.5;
}

.nx-payment-integrations-page .nx-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.nx-payment-integrations-page .nx-kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 14px !important;
    margin: 16px 0 18px !important;
}

.nx-payment-integrations-page .nx-kpi-card {
    display: block !important;
    min-height: 112px !important;
    padding: 18px !important;
    border: 1px solid var(--pi-border) !important;
    border-radius: 20px !important;
    background: var(--pi-card) !important;
    box-shadow: 0 1px 2px rgba(15,23,42,.035), 0 16px 34px rgba(15,23,42,.04) !important;
    overflow: hidden;
}

.nx-payment-integrations-page .nx-kpi-card span,
.nx-payment-integrations-page .nx-kpi-card strong,
.nx-payment-integrations-page .nx-kpi-card small {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    line-height: 1.25 !important;
}

.nx-payment-integrations-page .nx-kpi-card span {
    margin: 0 0 10px !important;
    color: var(--pi-muted) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}

.nx-payment-integrations-page .nx-kpi-card strong {
    margin: 0 0 8px !important;
    color: var(--pi-text) !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    letter-spacing: -.02em !important;
}

.nx-payment-integrations-page .nx-kpi-card small {
    margin: 0 !important;
    color: var(--pi-muted) !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
}

.nx-payment-integrations-page .nx-info-panel,
.nx-payment-integrations-page .nx-panel {
    border: 1px solid var(--pi-border) !important;
    border-radius: 20px !important;
    background: var(--pi-card) !important;
    box-shadow: 0 1px 2px rgba(15,23,42,.035), 0 14px 34px rgba(15,23,42,.035) !important;
}

.nx-payment-integrations-page .nx-info-panel {
    padding: 16px 18px !important;
    margin-bottom: 18px !important;
}

.nx-payment-integrations-page .nx-info-panel p {
    margin: 0 !important;
    color: #334155 !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
}

.nx-payment-integrations-page .nx-gateway-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
}

.nx-payment-integrations-page .nx-gateway-card {
    display: block !important;
    width: 100% !important;
    padding: 22px !important;
    margin: 0 !important;
}

.nx-payment-integrations-page .nx-panel-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 16px !important;
    padding-bottom: 16px !important;
    margin: 0 0 18px !important;
    border-bottom: 1px solid var(--pi-border) !important;
}

.nx-payment-integrations-page .nx-panel-header h2 {
    margin: 0 0 4px !important;
    color: var(--pi-text) !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
}

.nx-payment-integrations-page .nx-panel-header p {
    margin: 0 !important;
    color: var(--pi-muted) !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
}

.nx-payment-integrations-page .nx-status-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 28px !important;
    padding: 6px 11px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    line-height: 1 !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    border: 1px solid transparent !important;
}

.nx-payment-integrations-page .nx-status-pill.success { background: #dcfce7 !important; color: #166534 !important; border-color: #bbf7d0 !important; }
.nx-payment-integrations-page .nx-status-pill.info { background: #eff6ff !important; color: #1d4ed8 !important; border-color: #dbeafe !important; }
.nx-payment-integrations-page .nx-status-pill.muted { background: #f1f5f9 !important; color: #64748b !important; border-color: #e2e8f0 !important; }

.nx-payment-integrations-page .nx-form-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 14px 16px !important;
    width: 100% !important;
    margin: 0 0 16px !important;
}

.nx-payment-integrations-page .nx-form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.nx-payment-integrations-page .nx-form-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.nx-payment-integrations-page label {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 7px !important;
    margin: 0 !important;
    color: #334155 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
}

.nx-payment-integrations-page .nx-check-label {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: 40px !important;
    gap: 9px !important;
    padding: 10px 12px !important;
    border: 1px solid var(--pi-border) !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
    color: #334155 !important;
}

.nx-payment-integrations-page .nx-check-label input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    min-height: 16px !important;
    margin: 0 !important;
    accent-color: var(--pi-primary) !important;
}

.nx-payment-integrations-page input,
.nx-payment-integrations-page select,
.nx-payment-integrations-page textarea {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 40px !important;
    padding: 9px 11px !important;
    border: 1px solid #d8dee8 !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: var(--pi-text) !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
    font-weight: 500 !important;
    box-shadow: none !important;
    outline: none !important;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease !important;
}

.nx-payment-integrations-page input:focus,
.nx-payment-integrations-page select:focus,
.nx-payment-integrations-page textarea:focus {
    border-color: var(--pi-primary) !important;
    box-shadow: 0 0 0 3px rgba(0,191,165,.12) !important;
}

.nx-payment-integrations-page input::placeholder {
    color: #94a3b8 !important;
    font-weight: 400 !important;
}

.nx-payment-integrations-page .nx-muted {
    margin: 0 0 16px !important;
    padding: 13px 15px !important;
    border: 1px dashed #cbd5e1 !important;
    border-radius: 14px !important;
    background: #f8fafc !important;
    color: var(--pi-muted) !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
}

.nx-payment-integrations-page .nx-actions-row {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 18px !important;
    padding-top: 16px !important;
    border-top: 1px solid var(--pi-border) !important;
}

.nx-payment-integrations-page .btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-height: 38px !important;
    padding: 9px 14px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    border: 1px solid transparent !important;
}

.nx-payment-integrations-page .btn-primary {
    background: var(--pi-primary) !important;
    border-color: var(--pi-primary) !important;
    color: #fff !important;
}

.nx-payment-integrations-page .btn-primary:hover {
    background: var(--pi-primary-dark) !important;
    border-color: var(--pi-primary-dark) !important;
}

.nx-payment-integrations-page .btn-secondary {
    background: #fff !important;
    border-color: var(--pi-border) !important;
    color: #334155 !important;
}

.nx-payment-integrations-page .btn-secondary:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

@media (max-width: 980px) {
    .nx-payment-integrations-page .nx-kpi-grid,
    .nx-payment-integrations-page .nx-form-grid,
    .nx-payment-integrations-page .nx-form-grid.two,
    .nx-payment-integrations-page .nx-form-grid.three {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 680px) {
    .nx-payment-integrations-page .nx-page-hero,
    .nx-payment-integrations-page .nx-panel-header {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .nx-payment-integrations-page .nx-kpi-grid,
    .nx-payment-integrations-page .nx-form-grid,
    .nx-payment-integrations-page .nx-form-grid.two,
    .nx-payment-integrations-page .nx-form-grid.three {
        grid-template-columns: 1fr !important;
    }

    .nx-payment-integrations-page .nx-gateway-card {
        padding: 18px !important;
    }

    .nx-payment-integrations-page .nx-actions-row,
    .nx-payment-integrations-page .nx-hero-actions {
        justify-content: stretch !important;
    }

    .nx-payment-integrations-page .btn {
        width: 100% !important;
    }
}


/* ===== Nortex Premium - Inventory Movements ===== */

.inventory-module-page{
    display:flex;
    flex-direction:column;
    gap:20px;
}

.premium-module-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    padding:8px 0;
}

.module-badge{
    display:inline-flex;
    align-items:center;
    gap:8px;
    font-size:12px;
    font-weight:700;
    color:#0bb39c;
    margin-bottom:10px;
    letter-spacing:.5px;
}

.premium-module-header h1{
    font-size:36px;
    font-weight:700;
    color:#0f172a;
    margin-bottom:6px;
}

.premium-module-header .module-subtitle{
    color:#64748b;
    font-size:14px;
}

.premium-subnav{
    background:#fff;
    border-radius:18px;
    padding:14px;
    display:flex;
    gap:12px;
    border:1px solid #e5e7eb;
}

.inventory-subnav-link{
    border:none;
    background:#f8fafc;
    color:#0f172a;
    border-radius:12px;
    padding:12px 18px;
    font-weight:600;
    transition:.2s ease;
}

.inventory-subnav-link.active{
    background:#e6fffb;
    color:#0bb39c;
}

.inventory-subnav-link:hover{
    transform:translateY(-1px);
}

.premium-card-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding-bottom:18px;
}

.premium-card-header h3{
    margin:0;
    font-size:18px;
    font-weight:700;
    color:#0f172a;
}

.premium-card-header p{
    margin:4px 0 0;
    color:#64748b;
    font-size:13px;
}

.premium-action-btn{
    border-radius:12px !important;
    padding:10px 18px !important;
    font-weight:600 !important;
}

.inventory-movements-page{
    border-radius:24px;
    padding:24px;
}



/* =========================================================
   Nortex V201 - Sidebar dupla premium (rail + menu contextual)
   Mantém o padrão de ícones Font Awesome já usado no Nortex.
   ========================================================= */

body.dashboard-page.nortex-sidebar-premium-page{
    background:#f6f8fb;
}

body.dashboard-page.nortex-sidebar-premium-page .nortex-app-layout{
    display:grid !important;
    grid-template-columns:86px 240px minmax(0, 1fr);
    min-height:100vh;
    background:#f6f8fb;
}

.nortex-icon-rail{
    position:sticky;
    top:0;
    height:100vh;
    width:86px;
    background:#ffffff;
    border-right:1px solid #e6edf5;
    display:flex;
    flex-direction:column;
    align-items:center;
    z-index:60;
    box-shadow:8px 0 26px rgba(15, 23, 42, .04);
}

.nortex-rail-brand{
    width:100%;
    height:70px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    border-bottom:1px solid #eef2f7;
}

.nortex-rail-logo{
    width:38px;
    height:38px;
    object-fit:contain;
    border-radius:12px;
    background:#0f172a;
    padding:6px;
}

.nortex-rail-nav{
    width:100%;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:8px;
    padding:16px 10px;
}

.nortex-rail-item{
    width:68px;
    min-height:56px;
    height:auto;
    border:0;
    border-radius:14px;
    background:transparent;
    color:#64748b;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    transition:all .18s ease;
    font-size:16px;
    position:relative;
}


.nortex-rail-item i{
    font-size:16px;
    line-height:1;
}

.nortex-rail-label{
    display:block;
    margin-top:5px;
    max-width:64px;
    font-size:8.5px;
    line-height:1;
    font-weight:800;
    letter-spacing:.035em;
    text-transform:uppercase;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.nortex-rail-item:hover{
    background:#f1f5f9;
    color:#0f172a;
    transform:translateY(-1px);
}

.nortex-rail-item.active{
    background:#e9fbf7;
    color:#00b894;
    box-shadow:inset 0 0 0 1px rgba(0,184,148,.20);
}

.nortex-rail-item.active::before{
    content:"";
    position:absolute;
    left:-10px;
    width:4px;
    height:24px;
    border-radius:0 8px 8px 0;
    background:#00b894;
}

.nortex-context-sidebar{
    position:sticky;
    top:0;
    height:100vh;
    background:#0b3f78;
    color:#fff;
    border-right:1px solid rgba(255,255,255,.08);
    display:flex;
    flex-direction:column;
    z-index:55;
    box-shadow:12px 0 30px rgba(15, 23, 42, .08);
}

.nortex-context-header{
    min-height:70px;
    padding:16px 18px 14px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    border-bottom:1px solid rgba(255,255,255,.10);
}

.nortex-context-kicker{
    font-size:10px;
    letter-spacing:.9px;
    color:#7dd3fc;
    font-weight:800;
    text-transform:uppercase;
    margin-bottom:4px;
}

.nortex-context-header strong{
    font-size:16px;
    color:#ffffff;
    line-height:1.2;
}

.nortex-context-nav{
    flex:1;
    overflow-y:auto;
    padding:14px 10px 20px;
}

.nortex-context-group{
    display:none;
}

.nortex-context-group.active{
    display:block;
    animation:nortexContextFade .16s ease;
}

@keyframes nortexContextFade{
    from{opacity:.65; transform:translateX(-4px);}
    to{opacity:1; transform:translateX(0);}
}

.nortex-context-group a{
    display:flex;
    align-items:center;
    gap:10px;
    min-height:40px;
    padding:10px 12px;
    border-radius:10px;
    color:rgba(255,255,255,.86);
    text-decoration:none;
    font-size:13px;
    font-weight:650;
    line-height:1.15;
    transition:all .16s ease;
}

.nortex-context-group a i{
    width:18px;
    text-align:center;
    font-size:14px;
    color:rgba(255,255,255,.72);
}

.nortex-context-group a:hover{
    background:rgba(255,255,255,.10);
    color:#ffffff;
}

.nortex-context-group a.active{
    background:#062f5f;
    color:#ffffff;
    box-shadow:inset 3px 0 0 #00b894;
}

.nortex-context-group a.active i{
    color:#00d4aa;
}

.nortex-context-label{
    display:block;
    padding:16px 12px 8px;
    color:#9fd3ff;
    font-size:10px;
    font-weight:800;
    letter-spacing:.75px;
    text-transform:uppercase;
}

body.dashboard-page.nortex-sidebar-premium-page .nortex-main-content{
    min-width:0;
    width:100%;
    display:flex;
    flex-direction:column;
    background:#f6f8fb;
}

body.dashboard-page.nortex-sidebar-premium-page .nortex-page-topbar{
    min-height:70px;
    background:#ffffff !important;
    border-bottom:1px solid #e6edf5 !important;
    box-shadow:0 8px 24px rgba(15, 23, 42, .035) !important;
}

body.dashboard-page.nortex-sidebar-premium-page .content-area{
    padding:28px 30px 36px !important;
    overflow:auto;
}

body.dashboard-page.nortex-sidebar-premium-page #contentContainer{
    max-width:100%;
}

@media (max-width: 1120px){
    body.dashboard-page.nortex-sidebar-premium-page .nortex-app-layout{
        grid-template-columns:64px minmax(0,1fr);
    }

    .nortex-context-sidebar{
        position:fixed;
        left:64px;
        top:0;
        width:240px;
        transform:translateX(-110%);
        transition:transform .2s ease;
    }

    .nortex-context-sidebar.is-mobile-open,
    body.dashboard-page.nortex-sidebar-premium-page .nortex-context-sidebar:hover{
        transform:translateX(0);
    }

    .nortex-icon-rail{
        width:72px;
    }

    .nortex-rail-item{
        width:58px;
        min-height:50px;
        height:auto;
    }
}

@media (max-width: 760px){
    body.dashboard-page.nortex-sidebar-premium-page .nortex-app-layout{
        grid-template-columns:64px minmax(0,1fr);
    }

    .nortex-icon-rail{
        width:64px;
    }

    .nortex-context-sidebar{
        left:64px;
        width:236px;
    }

    body.dashboard-page.nortex-sidebar-premium-page .content-area{
        padding:18px 14px 28px !important;
    }

    .nortex-global-search{
        display:none !important;
    }
}


/* =====================================================
   Formulário premium - Contas a Pagar
   Padrão Nortex: layout limpo, cards, ícones e hierarquia visual.
   ===================================================== */
.modal.payable-form-modal {
    padding: 18px;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(3px);
}

.modal.payable-form-modal .modal-content {
    width: min(94vw, 980px);
    max-width: min(94vw, 980px);
    max-height: calc(100vh - 36px);
    border-radius: 22px;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.96);
    background: #f8fafc;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.34);
}

.modal.payable-form-modal #modalBody {
    padding: 0;
    overflow-y: auto;
    max-height: calc(100vh - 36px);
}

.modal.payable-form-modal #modalBody > h2 {
    margin: 0;
    padding: 22px 32px 18px;
    background: #fff;
    color: #0f172a;
    font-size: 20px;
    font-weight: 800;
    border-bottom: 1px solid #e5edf7;
}

.modal.payable-form-modal .modal-close {
    top: 18px;
    right: 18px;
    z-index: 5;
    color: #64748b;
}

.modal.payable-form-modal #cashSimpleForm {
    margin: 0;
}

.payable-form-page {
    padding: 0;
    background: #f8fafc;
    color: #0f2747;
}

.payable-form-hero {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 18px;
    padding: 24px 32px;
    background: linear-gradient(135deg, #ffffff 0%, #f3f8fd 100%);
    border-bottom: 1px solid #e5edf7;
}

.payable-form-title-block {
    min-width: 0;
}

.payable-form-title-block h2 {
    margin: 6px 0 8px;
    color: #071d36;
    font-size: 24px;
    line-height: 1.18;
    font-weight: 850;
}

.payable-form-title-block p {
    margin: 0;
    color: #53677f;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.payable-form-summary-card {
    min-width: 225px;
    padding: 16px 18px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #dbe7f5;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
    text-align: right;
}

.payable-form-summary-card strong {
    display: block;
    margin-top: 12px;
    color: #08213f;
    font-size: 25px;
    line-height: 1;
}

.payable-form-summary-card small {
    display: block;
    margin-top: 7px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px;
}

.payable-form-section {
    margin: 18px 32px;
    padding: 20px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #dfe8f4;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.055);
}

.payable-form-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.payable-form-section-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ecfeff;
    color: #00a99d;
    font-size: 16px;
    flex: 0 0 auto;
}

.payable-form-section-icon-green {
    background: #ecfdf5;
    color: #16a34a;
}

.payable-form-section-icon-blue {
    background: #eff6ff;
    color: #2563eb;
}

.payable-form-section-head h3 {
    margin: 0;
    color: #0f2747;
    font-size: 15px;
    font-weight: 850;
}

.payable-form-section-head p {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 12px;
}

.payable-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.payable-form-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.payable-form-grid .form-group {
    margin: 0;
}

.payable-form-grid label {
    display: block;
    margin-bottom: 7px;
    color: #253b58;
    font-size: 12px;
    font-weight: 800;
}

.payable-form-grid .form-control {
    height: 44px;
    border-radius: 12px;
    border: 1px solid #d7e2ef;
    background: #fff;
    color: #0f2747;
    font-size: 13px;
    box-shadow: none;
}

.payable-form-grid textarea.form-control {
    min-height: 106px;
    height: auto;
    resize: vertical;
    line-height: 1.5;
    padding: 12px 14px;
}

.payable-form-grid .form-control:focus {
    border-color: #00bfa5;
    box-shadow: 0 0 0 4px rgba(0, 191, 165, 0.12);
    outline: none;
}

.payable-form-grid .input-with-icon {
    position: relative;
}

.payable-form-grid .input-with-icon i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 13px;
    pointer-events: none;
}

.payable-form-grid .input-with-icon .form-control {
    padding-left: 38px;
}

.payable-form-readonly-status {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 12px;
    border: 1px dashed #d7e2ef;
    border-radius: 12px;
    background: #f8fafc;
}

.payable-form-readonly-status small {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.modal.payable-form-modal .form-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin: 0;
    padding: 18px 32px;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(8px);
    border-top: 1px solid #e5edf7;
    justify-content: flex-end;
}

.modal.payable-form-modal .form-actions .btn {
    min-width: 128px;
    border-radius: 12px;
    font-weight: 800;
}

@media (max-width: 900px) {
    .payable-form-hero {
        flex-direction: column;
    }

    .payable-form-summary-card {
        text-align: left;
        min-width: 0;
    }

    .payable-form-summary-card small {
        max-width: none;
    }

    .payable-form-grid,
    .payable-form-grid-3 {
        grid-template-columns: 1fr;
    }

    .payable-form-section,
    .payable-form-hero,
    .modal.payable-form-modal #modalBody > h2,
    .modal.payable-form-modal .form-actions {
        padding-left: 20px;
        padding-right: 20px;
    }

    .payable-form-section {
        margin-left: 20px;
        margin-right: 20px;
    }
}


/* =====================================================
   V79 - Contas a Pagar: modal operacional amplo
   Ajusta largura, campos com ícone/prefixo e botão fechar fora da área útil.
   ===================================================== */
.modal.payable-form-modal {
    padding: 26px 18px 18px !important;
    align-items: stretch !important;
    justify-content: center !important;
    background: rgba(15, 23, 42, 0.62) !important;
}

.modal.payable-form-modal .modal-content {
    width: min(98vw, 1380px) !important;
    max-width: min(98vw, 1380px) !important;
    height: min(94vh, 920px) !important;
    max-height: calc(100vh - 36px) !important;
    border-radius: 6px !important;
    padding: 0 !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
    background: #f8fafc !important;
    border: 1px solid #dbe7f6 !important;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.34) !important;
}

.modal.payable-form-modal #modalBody {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    border-radius: 6px !important;
    background: #f8fafc !important;
}

.modal.payable-form-modal #modalBody > h2 {
    position: sticky !important;
    top: 0 !important;
    z-index: 4 !important;
    margin: 0 !important;
    padding: 18px 72px 16px 28px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    color: #0f172a !important;
    font-size: 20px !important;
    font-weight: 850 !important;
    border-bottom: 1px solid #dbe7f6 !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04) !important;
}

.modal.payable-form-modal .modal-close {
    position: absolute !important;
    top: -14px !important;
    right: -14px !important;
    z-index: 30 !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    border: 1px solid #dbe7f6 !important;
    color: #334155 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 22px !important;
    line-height: 1 !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.20) !important;
}

.modal.payable-form-modal .modal-close:hover {
    background: #f8fafc !important;
    color: #ef4444 !important;
    transform: translateY(-1px) !important;
}

.payable-form-hero {
    padding: 22px 30px !important;
    border-bottom: 1px solid #dbe7f6 !important;
}

.payable-form-title-block h2 {
    font-size: 23px !important;
}

.payable-form-summary-card {
    min-width: 260px !important;
    border-radius: 12px !important;
}

.payable-form-section {
    margin: 16px 30px !important;
    padding: 18px !important;
    border-radius: 10px !important;
}

.payable-form-grid {
    gap: 16px 18px !important;
}

.payable-form-grid-3 {
    grid-template-columns: minmax(210px, .8fr) minmax(210px, .8fr) minmax(240px, 1fr) !important;
}

.payable-form-grid .form-control,
.payable-form-grid input.form-control,
.payable-form-grid select.form-control {
    min-height: 48px !important;
    height: 48px !important;
    line-height: 1.35 !important;
    padding: 11px 13px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    color: #0f172a !important;
}

.payable-form-grid input[type="date"].form-control,
.payable-form-grid input[type="number"].form-control {
    line-height: normal !important;
}

.payable-form-grid .input-with-icon {
    position: relative !important;
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
    min-height: 48px !important;
    border: 1px solid #d7e2ef !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    overflow: hidden !important;
    transition: border-color .18s ease, box-shadow .18s ease !important;
}

.payable-form-grid .input-with-icon:focus-within {
    border-color: #00bfa5 !important;
    box-shadow: 0 0 0 4px rgba(0, 191, 165, 0.12) !important;
}

.payable-form-grid .input-with-icon i {
    position: static !important;
    transform: none !important;
    width: 46px !important;
    min-width: 46px !important;
    height: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-right: 1px solid #e2eaf4 !important;
    background: #f8fbff !important;
    color: #64748b !important;
    font-size: 14px !important;
    pointer-events: none !important;
}

.payable-form-grid .input-with-icon .form-control {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding-left: 13px !important;
    padding-right: 13px !important;
    background: #ffffff !important;
}

.payable-form-grid .input-with-icon .form-control:focus {
    box-shadow: none !important;
    border-color: transparent !important;
}

.payable-form-readonly-status {
    min-height: 48px !important;
    height: 48px !important;
    border-radius: 10px !important;
}

.modal.payable-form-modal .form-actions {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 5 !important;
    padding: 16px 30px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    border-top: 1px solid #dbe7f6 !important;
    box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.05) !important;
}

.modal.payable-form-modal .form-actions .btn {
    min-height: 42px !important;
    min-width: 132px !important;
    border-radius: 10px !important;
}

@media (max-width: 1100px) {
    .payable-form-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 760px) {
    .modal.payable-form-modal {
        padding: 8px !important;
    }

    .modal.payable-form-modal .modal-content {
        width: calc(100vw - 16px) !important;
        height: calc(100vh - 16px) !important;
        max-height: calc(100vh - 16px) !important;
        border-radius: 8px !important;
    }

    .modal.payable-form-modal .modal-close {
        top: 8px !important;
        right: 8px !important;
        width: 34px !important;
        height: 34px !important;
    }

    .modal.payable-form-modal #modalBody > h2 {
        padding: 16px 54px 14px 16px !important;
    }

    .payable-form-hero,
    .modal.payable-form-modal .form-actions {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .payable-form-section {
        margin-left: 16px !important;
        margin-right: 16px !important;
        padding: 16px !important;
    }

    .payable-form-grid,
    .payable-form-grid-3 {
        grid-template-columns: 1fr !important;
    }
}

/* =========================================================
   Nortex - Modal premium de recebimento de parcela
   Layout financeiro profissional com cantos quadrados
   ========================================================= */
.modal-content:has(.receive-premium-shell) {
    width: min(1180px, 96vw) !important;
    max-width: min(1180px, 96vw) !important;
    padding: 0 !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border: 1px solid #d9e2ec !important;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .30) !important;
}

.modal-content:has(.receive-premium-shell) .modal-close {
    top: 24px !important;
    right: 26px !important;
    z-index: 5 !important;
    width: 34px !important;
    height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    color: #475569 !important;
}

.modal-content:has(.receive-premium-shell) .modal-close:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

.receive-premium-shell {
    color: #0f172a;
    background: #ffffff;
}

.receive-premium-header {
    padding: 28px 32px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.receive-premium-title-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-right: 52px;
}

.receive-premium-icon {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f766e;
    background: #ccfbf1;
    border: 1px solid #99f6e4;
    font-size: 20px;
}

.receive-premium-header h2 {
    margin: 0 0 6px;
    font-size: 24px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #0f172a;
}

.receive-premium-header p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.receive-premium-form {
    display: block;
}

.receive-premium-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    padding: 28px 32px 24px;
    align-items: start;
}

.receive-premium-left,
.receive-premium-summary,
.receive-info-card {
    min-width: 0;
}

.receive-info-card,
.receive-premium-summary {
    border: 1px solid #dbe5ef;
    border-radius: 4px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}

.receive-card-title {
    min-height: 54px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #e2e8f0;
    color: #0f172a;
    font-weight: 800;
    font-size: 15px;
}

.receive-card-title i {
    color: #0f766e;
}

.receive-info-grid {
    padding: 18px 20px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.receive-info-grid div {
    min-width: 0;
}

.receive-info-grid span,
.receive-summary-lines span,
.receive-summary-total span,
.receive-inline-total span {
    display: block;
    color: #64748b;
    font-size: 12px;
    line-height: 1.25;
    margin-bottom: 7px;
}

.receive-info-grid strong {
    display: block;
    color: #0f172a;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 800;
    word-break: break-word;
}

.receive-highlight {
    color: #0f766e !important;
    font-size: 15px !important;
}

.receive-form-grid {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px 20px;
}

.receive-form-grid .form-group {
    margin: 0;
}

.receive-form-grid label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 800;
    color: #1e293b;
}

.receive-form-grid .form-control,
.receive-premium-summary .form-control {
    height: 42px;
    border-radius: 4px !important;
    border: 1px solid #cfd8e3 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: none !important;
}

.receive-form-grid textarea.form-control {
    height: 82px;
    min-height: 82px;
    resize: vertical;
}

.receive-form-grid .form-control:focus {
    border-color: #14b8a6 !important;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, .14) !important;
}

.money-field {
    position: relative;
}

.money-field::after {
    content: 'R$';
    position: absolute;
    right: 12px;
    bottom: 12px;
    font-size: 12px;
    color: #64748b;
    pointer-events: none;
}

.money-field input {
    padding-right: 38px !important;
}

.receive-inline-total {
    padding: 14px 18px;
    border: 1px solid #cfe2f3;
    border-radius: 4px;
    background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
}

.receive-inline-total strong {
    display: block;
    color: #0f766e;
    font-size: 22px;
    line-height: 1.2;
    margin: 2px 0 4px;
}

.receive-inline-total small,
.receive-char-counter {
    color: #64748b;
    font-size: 11px;
}

.receive-notes {
    grid-column: 1 / -1;
    position: relative;
}

.receive-char-counter {
    display: block;
    margin-top: 6px;
    text-align: right;
}

.receive-premium-summary {
    position: sticky;
    top: 0;
}

.receive-summary-lines {
    padding: 20px 22px 8px;
}

.receive-summary-lines div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
}

.receive-summary-lines strong {
    color: #0f172a;
    font-size: 13px;
    white-space: nowrap;
}

.receive-summary-total {
    margin: 8px 22px 22px;
    padding-top: 22px;
    border-top: 1px solid #dbe5ef;
}

.receive-summary-total strong {
    display: block;
    margin: 8px 0 14px;
    color: #0f766e;
    font-size: 32px;
    line-height: 1;
    letter-spacing: -.03em;
}

.receive-summary-total em {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid #99f6e4;
    border-radius: 4px;
    background: #ecfdf5;
    color: #0f766e;
    font-style: normal;
    font-size: 12px;
    font-weight: 800;
}

.receive-premium-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 18px 32px 22px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.receive-premium-actions .btn {
    min-height: 42px;
    border-radius: 4px !important;
    padding: 10px 18px;
    font-weight: 800;
}

.receive-premium-actions .btn-primary {
    background: #0f766e !important;
    border-color: #0f766e !important;
    color: #ffffff !important;
    box-shadow: 0 10px 20px rgba(15, 118, 110, .20) !important;
}

.receive-premium-actions .btn-primary:hover {
    background: #115e59 !important;
    border-color: #115e59 !important;
}

.receive-premium-actions .btn-secondary {
    background: #ffffff !important;
    border: 1px solid #cfd8e3 !important;
    color: #334155 !important;
}

@media (max-width: 1120px) {
    .receive-premium-main {
        grid-template-columns: 1fr;
    }
    .receive-premium-summary {
        position: static;
    }
}

@media (max-width: 760px) {
    .modal-content:has(.receive-premium-shell) {
        width: 96vw !important;
        max-height: 94vh !important;
    }
    .receive-premium-header,
    .receive-premium-main,
    .receive-premium-actions {
        padding-left: 18px;
        padding-right: 18px;
    }
    .receive-info-grid,
    .receive-form-grid {
        grid-template-columns: 1fr;
    }
    .receive-premium-actions {
        flex-direction: column-reverse;
    }
    .receive-premium-actions .btn {
        width: 100%;
    }
}

/* Venda bloqueada fiscalmente */
.sale-row-fiscal-locked {
    background: #fffdf4;
}
.commercial-fiscal-lock-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    padding: 14px 16px;
    border: 1px solid #f4d27a;
    background: #fff8df;
    color: #594100;
    border-radius: 8px;
}
.commercial-fiscal-lock-alert i {
    font-size: 18px;
}
.commercial-fiscal-lock-alert > div {
    flex: 1;
}
.commercial-sale-readonly input,
.commercial-sale-readonly select,
.commercial-sale-readonly textarea,
.commercial-sale-readonly button {
    cursor: not-allowed;
}
.commercial-sale-readonly input:disabled,
.commercial-sale-readonly select:disabled,
.commercial-sale-readonly textarea:disabled {
    background: #f3f5f7;
    color: #5f6b7a;
    opacity: 1;
}
.action-copy {
    color: #0f766e;
}

/* Nortex - melhorias Asaas: boletos, PIX e dashboard financeiro */
.nx-boleto-actions { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.nx-boleto-action { padding:5px 8px; font-size:12px; line-height:1.2; border-radius:6px; text-decoration:none !important; }
.nx-code-cell { max-width:220px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:12px; }
.nx-paid-chip { display:inline-flex; align-items:center; gap:5px; padding:5px 9px; border-radius:999px; background:#dcfce7; color:#166534; font-size:12px; font-weight:700; }
.nx-asaas-kpi-grid { margin-top:-8px; margin-bottom:18px; }
.receivable-kpi.primary strong { color:#0056b3; }
.btn-icon.receivable-asaas-pix { color:#0f766e; border-color:#ccfbf1; background:#f0fdfa; }
.btn-icon.receivable-asaas-pix:hover { background:#14b8a6; color:#fff; }

/* =====================================================
   NORTEX ERP v260 - Sidebar única estilo Asaas + dashboard inicial
   ===================================================== */
body.nortex-asaas-sidebar-page {
    margin: 0 !important;
    background: #f7f9fc !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
    color: #101828 !important;
}
body.nortex-asaas-sidebar-page .nortex-single-sidebar-layout {
    display: grid !important;
    grid-template-columns: 280px minmax(0, 1fr) !important;
    min-height: 100vh !important;
    background: #f7f9fc !important;
}
body.nortex-asaas-sidebar-page .nortex-aside-menu {
    position: sticky !important;
    top: 0 !important;
    height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    background: #fff !important;
    border-right: 1px solid #edf1f7 !important;
    box-shadow: 8px 0 24px rgba(15, 23, 42, .035) !important;
    z-index: 50 !important;
}
body.nortex-asaas-sidebar-page .nortex-aside-brand {
    height: 94px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 28px !important;
}
body.nortex-asaas-sidebar-page .nortex-aside-logo { height: 46px !important; width: auto !important; object-fit: contain !important; }
body.nortex-asaas-sidebar-page .nortex-aside-logo-text strong { display: block; font-size: 25px; color: #0056b3; line-height: 1; }
body.nortex-asaas-sidebar-page .nortex-aside-logo-text small { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #637083; }
body.nortex-asaas-sidebar-page .nortex-sidebar-nav {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    padding: 8px 16px 18px !important;
    max-height: none !important;
}
body.nortex-asaas-sidebar-page .nortex-sidebar-nav::-webkit-scrollbar { width: 0 !important; height: 0 !important; }
body.nortex-asaas-sidebar-page .nortex-sidebar-nav ul,
body.nortex-asaas-sidebar-page .nortex-sidebar-nav li { list-style: none !important; margin: 0 !important; padding: 0 !important; }
body.nortex-asaas-sidebar-page .nav-item-single > a,
body.nortex-asaas-sidebar-page .nav-group-toggle,
body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu a {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 13px !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    color: #53627a !important;
    text-decoration: none !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 1.15 !important;
    border-radius: 24px !important;
    min-height: 50px !important;
    padding: 0 18px !important;
    cursor: pointer !important;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease !important;
    box-shadow: none !important;
}
body.nortex-asaas-sidebar-page .nav-group-toggle { justify-content: space-between !important; font-family: inherit !important; }
body.nortex-asaas-sidebar-page .nav-group-toggle span { display: inline-flex !important; align-items: center !important; gap: 13px !important; }
body.nortex-asaas-sidebar-page .nav-item-single > a i,
body.nortex-asaas-sidebar-page .nav-group-toggle i:first-child,
body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu a i {
    width: 20px !important;
    min-width: 20px !important;
    color: #617089 !important;
    font-size: 18px !important;
    text-align: center !important;
}
body.nortex-asaas-sidebar-page .nav-item-single > a:hover,
body.nortex-asaas-sidebar-page .nav-group-toggle:hover,
body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu a:hover {
    background: #edf6ff !important;
    color: #0056ff !important;
    text-decoration: none !important;
}
body.nortex-asaas-sidebar-page .nav-item-single > a.active,
body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu a.active,
body.nortex-asaas-sidebar-page .nav-group.is-open > .nav-group-toggle {
    background: #dceeff !important;
    color: #0056ff !important;
    box-shadow: none !important;
}
body.nortex-asaas-sidebar-page .nav-item-single > a.active i,
body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu a.active i,
body.nortex-asaas-sidebar-page .nav-group.is-open > .nav-group-toggle i:first-child { color: #0056ff !important; }
body.nortex-asaas-sidebar-page .nav-chevron {
    margin-left: auto !important;
    color: #64748b !important;
    font-size: 13px !important;
    transition: transform .18s ease !important;
}
body.nortex-asaas-sidebar-page .nav-group.is-open > .nav-group-toggle .nav-chevron { transform: rotate(180deg) !important; }
body.nortex-asaas-sidebar-page .nav-group { margin: 3px 0 !important; }
body.nortex-asaas-sidebar-page .nav-submenu {
    display: none !important;
    margin: 6px 0 10px 28px !important;
    padding: 0 0 0 17px !important;
    border-left: 1px solid #dbe3ef !important;
    max-height: none !important;
    overflow: visible !important;
}
body.nortex-asaas-sidebar-page .nav-group.is-open > .nav-submenu { display: block !important; }
body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu a {
    min-height: 42px !important;
    border-radius: 18px !important;
    padding: 0 15px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #56657b !important;
}
body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu a i { font-size: 17px !important; }
body.nortex-asaas-sidebar-page .nortex-aside-footer {
    flex: 0 0 auto !important;
    padding: 14px 16px 18px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    background: linear-gradient(180deg, rgba(255,255,255,0), #fff 26%) !important;
}
body.nortex-asaas-sidebar-page .nortex-company-card,
body.nortex-asaas-sidebar-page .nortex-user-card {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-height: 58px !important;
    border: 1px solid #edf1f7 !important;
    border-radius: 13px !important;
    padding: 9px 12px !important;
    background: #fff !important;
    color: #1f2b3d !important;
}
body.nortex-asaas-sidebar-page .nortex-company-card strong,
body.nortex-asaas-sidebar-page .nortex-user-card strong { display: block; font-size: 13px; font-weight: 700; color: #1f2937; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.nortex-asaas-sidebar-page .nortex-company-card small,
body.nortex-asaas-sidebar-page .nortex-user-card small { display: block; font-size: 12px; color: #69758a; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.nortex-asaas-sidebar-page .nortex-company-icon,
body.nortex-asaas-sidebar-page .nortex-user-avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #e7f0ff !important;
    color: #0056ff !important;
    font-weight: 800 !important;
}
body.nortex-asaas-sidebar-page .logout-btn { margin-left: auto !important; border: 0 !important; background: transparent !important; color: #64748b !important; cursor: pointer !important; }
body.nortex-asaas-sidebar-page .main-content,
body.nortex-asaas-sidebar-page .nortex-main-content {
    margin-left: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    background: #f7f9fc !important;
    padding: 0 !important;
}
body.nortex-asaas-sidebar-page .nortex-page-topbar {
    height: 84px !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 40 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 34px 0 28px !important;
    background: rgba(255,255,255,.88) !important;
    backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid #edf1f7 !important;
    box-shadow: none !important;
}
body.nortex-asaas-sidebar-page .toggle-sidebar { display: none !important; }
body.nortex-asaas-sidebar-page .nortex-period-button {
    height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    border: 1px solid #e3e9f2 !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #152033 !important;
    padding: 0 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}
body.nortex-asaas-sidebar-page .top-icon-btn {
    width: 44px !important;
    height: 44px !important;
    border-radius: 10px !important;
    border: 1px solid #e3e9f2 !important;
    background: #fff !important;
    color: #0056ff !important;
}
body.nortex-asaas-sidebar-page .content-area {
    max-width: none !important;
    padding: 24px 28px 0 !important;
}

/* Dashboard principal */
.nx-home-dashboard { max-width: 1520px; margin: 0 auto; }
.nx-home-head { display: flex; align-items: flex-start; justify-content: space-between; margin: 0 0 24px; }
.nx-home-head h1 { margin: 0; font-size: 27px; line-height: 1.1; color: #101828; letter-spacing: -.03em; }
.nx-home-head p { margin: 7px 0 0; color: #667085; font-size: 14px; }
.nx-home-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0 0 22px; }
.nx-home-kpi {
    position: relative; min-height: 132px; border: 1px solid #edf1f7; background: #fff; border-radius: 13px; box-shadow: 0 10px 24px rgba(15,23,42,.045); padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; text-align: left; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.nx-home-kpi:hover { transform: translateY(-2px); border-color: #d5e3f8; box-shadow: 0 16px 34px rgba(15,23,42,.075); }
.nx-home-kpi span { display: block; color: #111827; font-size: 16px; font-weight: 700; margin-bottom: 13px; }
.nx-home-kpi strong { display: block; font-size: 27px; font-weight: 800; letter-spacing: -.03em; }
.nx-home-kpi small { display: block; margin-top: 17px; font-size: 13px; color: #16a34a; font-weight: 700; }
.nx-home-kpi small.down { color: #ef4444; }
.nx-home-kpi small em { color: #667085; font-style: normal; font-weight: 500; margin-left: 4px; }
.nx-home-kpi > i { width: 58px; height: 58px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 23px; }
.nx-home-kpi.tone-blue strong { color: #2563eb; } .nx-home-kpi.tone-blue > i { color: #2563eb; background: #e8f1ff; }
.nx-home-kpi.tone-green strong { color: #16a34a; } .nx-home-kpi.tone-green > i { color: #16a34a; background: #dcfce7; }
.nx-home-kpi.tone-orange strong { color: #f97316; } .nx-home-kpi.tone-orange > i { color: #f97316; background: #ffedd5; }
.nx-home-kpi.tone-purple strong { color: #7c3aed; } .nx-home-kpi.tone-purple > i { color: #7c3aed; background: #f3e8ff; }
.nx-home-grid { display: grid; gap: 16px; }
.nx-home-grid-main { grid-template-columns: 1.13fr 1fr; margin-bottom: 18px; }
.nx-home-grid-bottom { grid-template-columns: 1fr 1fr; }
.nx-home-panel { background: #fff; border: 1px solid #edf1f7; border-radius: 14px; box-shadow: 0 10px 24px rgba(15,23,42,.04); padding: 22px 24px; min-width: 0; }
.nx-panel-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.nx-panel-title h2 { margin: 0; color: #111827; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.nx-panel-title button { height: 38px; border: 1px solid #e3e9f2; border-radius: 8px; background: #fff; color: #111827; font-size: 13px; padding: 0 12px; }
.nx-chart-legend { display: flex; gap: 18px; align-items: center; margin: 0 0 10px 2px; color: #42526b; font-size: 13px; }
.nx-chart-legend i { display: inline-block; width: 11px; height: 5px; border-radius: 99px; margin-right: 7px; vertical-align: middle; }
.nx-chart-legend i.green { background: #16a34a; } .nx-chart-legend i.red { background: #ef4444; }
.nx-home-chart svg { width: 100%; height: 305px; display: block; }
.nx-home-chart .grid line { stroke: #e8edf5; stroke-width: 1; }
.nx-home-chart .grid text, .nx-home-chart .x-label { fill: #53627a; font-size: 12px; }
.nx-home-chart .area { opacity: .13; } .nx-home-chart .area.receipts { fill: #16a34a; } .nx-home-chart .area.payments { fill: #ef4444; }
.nx-home-chart .line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.nx-home-chart .line.receipts { stroke: #16a34a; } .nx-home-chart .line.payments { stroke: #ef4444; }
.nx-home-chart .dot.receipts { fill: #16a34a; stroke: #fff; stroke-width: 2; } .nx-home-chart .dot.payments { fill: #ef4444; stroke: #fff; stroke-width: 2; }
.nx-donut-wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: center; min-height: 305px; }
.nx-donut { width: 220px; height: 220px; }
.nx-donut .base { fill: none; stroke: #eef2f7; stroke-width: 33; }
.nx-donut .slice { fill: none; stroke-width: 33; transform: rotate(-90deg); transform-origin: 95px 95px; stroke-linecap: butt; }
.nx-donut .slice.blue { stroke: #2563eb; } .nx-donut .slice.orange { stroke: #f97316; } .nx-donut .slice.green { stroke: #22c55e; } .nx-donut .slice.purple { stroke: #7c3aed; }
.nx-donut text { fill: #111827; font-size: 14px; font-weight: 600; } .nx-donut text.amount { font-size: 18px; font-weight: 800; }
.nx-donut-legend { display: flex; flex-direction: column; gap: 13px; }
.nx-donut-legend-item { display: grid; grid-template-columns: 14px minmax(0, 1fr); column-gap: 10px; row-gap: 2px; align-items: center; font-size: 14px; color: #111827; }
.nx-donut-legend-item i { width: 11px; height: 11px; border-radius: 999px; } .nx-donut-legend-item i.blue { background:#2563eb; } .nx-donut-legend-item i.orange { background:#f97316; } .nx-donut-legend-item i.green { background:#22c55e; } .nx-donut-legend-item i.purple { background:#7c3aed; }
.nx-donut-legend-item strong { grid-column: 2; font-size: 14px; font-weight: 700; color: #475569; }
.nx-table-wrap { width: 100%; overflow: auto; }
.nx-home-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.nx-home-table th { text-align: left; color: #475569; font-size: 12px; font-weight: 700; padding: 10px 8px; border-bottom: 1px solid #e8edf5; }
.nx-home-table td { padding: 11px 8px; border-bottom: 1px solid #eef2f7; color: #111827; white-space: nowrap; }
.nx-home-table td:nth-child(2) { white-space: normal; }
.nx-status { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.nx-status.ok { color: #15803d; background: #dcfce7; } .nx-status.open { color: #1d4ed8; background: #dbeafe; } .nx-status.warn { color: #c2410c; background: #ffedd5; } .nx-status.danger { color: #b91c1c; background: #fee2e2; }
.nx-table-link { margin-top: 18px; border: 0; background: transparent; color: #0056ff; font-size: 14px; font-weight: 700; cursor: pointer; }
.nx-dashboard-footer { display: flex; justify-content: space-between; color: #667085; font-size: 13px; padding: 26px 4px 20px; }

@media (max-width: 1180px) {
    body.nortex-asaas-sidebar-page .nortex-single-sidebar-layout { grid-template-columns: 86px minmax(0, 1fr) !important; }
    body.nortex-asaas-sidebar-page .nortex-aside-brand { padding: 0 17px !important; }
    body.nortex-asaas-sidebar-page .nortex-aside-logo { max-width: 48px; object-fit: contain; }
    body.nortex-asaas-sidebar-page .nav-item-single > a span,
    body.nortex-asaas-sidebar-page .nav-group-toggle span:not(:has(i)),
    body.nortex-asaas-sidebar-page .nav-group-toggle span,
    body.nortex-asaas-sidebar-page .nortex-company-card,
    body.nortex-asaas-sidebar-page .nortex-user-card div:not(.nortex-user-avatar) { display: none !important; }
    body.nortex-asaas-sidebar-page .nav-item-single > a,
    body.nortex-asaas-sidebar-page .nav-group-toggle { justify-content: center !important; padding: 0 !important; }
    body.nortex-asaas-sidebar-page .nav-submenu { margin-left: 0 !important; padding-left: 0 !important; border-left: 0 !important; }
    .nx-home-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nx-home-grid-main, .nx-home-grid-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    body.nortex-asaas-sidebar-page .nortex-single-sidebar-layout { grid-template-columns: 1fr !important; }
    body.nortex-asaas-sidebar-page .nortex-aside-menu { position: relative !important; height: auto !important; }
    body.nortex-asaas-sidebar-page .nortex-sidebar-nav { display: none !important; }
    body.nortex-asaas-sidebar-page .content-area { padding: 16px !important; }
    .nx-home-kpis, .nx-home-grid-main, .nx-home-grid-bottom { grid-template-columns: 1fr; }
    .nx-donut-wrap { grid-template-columns: 1fr; }
    .nx-dashboard-footer { flex-direction: column; gap: 8px; }
}

/* =========================================================
   Nortex sidebar organization - section labels (Etapa 1)
   Safe visual-only rules: keeps data-module/data-menu-group intact.
   ========================================================= */
body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-section-label {
    display: block;
    padding: 12px 18px 4px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    pointer-events: none;
    user-select: none;
}

body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu-label {
    display: block;
    padding: 10px 18px 4px 46px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    pointer-events: none;
    user-select: none;
}

body.nortex-asaas-sidebar-page [data-menu-group="pix"] {
    display: none !important;
}


/* =========================================================
   Nortex sidebar dark theme - requested visual adjustment
   Menu azul escuro, submenus brancos e hover azul claro.
   Alteração somente visual; não muda data-module/data-menu-group.
   ========================================================= */
body.nortex-asaas-sidebar-page .nortex-aside-menu {
    background: #102b4a !important;
    border-right: 1px solid #0b213a !important;
    box-shadow: 8px 0 24px rgba(15, 23, 42, .18) !important;
}

body.nortex-asaas-sidebar-page .nortex-aside-brand {
    height: 74px !important;
    padding: 0 18px !important;
    background: linear-gradient(180deg, #123456 0%, #102b4a 100%) !important;
    border-bottom: 1px solid rgba(255,255,255,.07) !important;
}

body.nortex-asaas-sidebar-page .nortex-aside-logo {
    max-width: 150px !important;
    height: 42px !important;
    object-fit: contain !important;
}

body.nortex-asaas-sidebar-page .nortex-aside-logo-text strong {
    color: #ffffff !important;
    font-size: 18px !important;
    line-height: 1.05 !important;
}

body.nortex-asaas-sidebar-page .nortex-aside-logo-text small {
    color: #bfdbfe !important;
    font-size: 11px !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

body.nortex-asaas-sidebar-page .nortex-sidebar-nav {
    padding: 10px 0 18px !important;
    background: #102b4a !important;
}

body.nortex-asaas-sidebar-page .nav-section-label {
    padding: 14px 18px 6px !important;
    color: #6f86a3 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: .08em !important;
}

body.nortex-asaas-sidebar-page .nav-item-single > a,
body.nortex-asaas-sidebar-page .nav-group-toggle {
    min-height: 45px !important;
    border-radius: 0 !important;
    padding: 0 18px !important;
    color: #dbeafe !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    background: transparent !important;
}

body.nortex-asaas-sidebar-page .nav-item-single > a i,
body.nortex-asaas-sidebar-page .nav-group-toggle i:first-child {
    color: #b9d2f1 !important;
    font-size: 15px !important;
}

body.nortex-asaas-sidebar-page .nav-chevron {
    color: #6f86a3 !important;
    font-size: 12px !important;
}

body.nortex-asaas-sidebar-page .nav-item-single > a:hover,
body.nortex-asaas-sidebar-page .nav-group-toggle:hover {
    background: #173a63 !important;
    color: #ffffff !important;
}

body.nortex-asaas-sidebar-page .nav-item-single > a:hover i,
body.nortex-asaas-sidebar-page .nav-group-toggle:hover i:first-child {
    color: #ffffff !important;
}

body.nortex-asaas-sidebar-page .nav-item-single > a.active,
body.nortex-asaas-sidebar-page .nav-group.is-open > .nav-group-toggle {
    background: #1d4380 !important;
    color: #ffffff !important;
    border-left: 4px solid #2f7bff !important;
    padding-left: 14px !important;
    box-shadow: none !important;
}

body.nortex-asaas-sidebar-page .nav-item-single > a.active i,
body.nortex-asaas-sidebar-page .nav-group.is-open > .nav-group-toggle i:first-child {
    color: #ffffff !important;
}

body.nortex-asaas-sidebar-page .nav-group {
    margin: 0 !important;
}

body.nortex-asaas-sidebar-page .nav-submenu {
    display: none !important;
    margin: 6px 10px 8px !important;
    padding: 8px !important;
    background: #ffffff !important;
    border: 1px solid #dbe7f5 !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .12) !important;
    overflow: hidden !important;
}

body.nortex-asaas-sidebar-page .nav-group.is-open > .nav-submenu {
    display: block !important;
}

body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu a {
    min-height: 38px !important;
    border-radius: 8px !important;
    padding: 0 11px !important;
    color: #1e3a5f !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    background: #ffffff !important;
}

body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu a i {
    color: #45627f !important;
    font-size: 14px !important;
}

body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu a:hover {
    background: #eaf3ff !important;
    color: #0056b3 !important;
}

body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu a:hover i {
    color: #0056b3 !important;
}

body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu a.active {
    background: #dbeafe !important;
    color: #0f4fa8 !important;
    box-shadow: none !important;
}

body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu a.active i {
    color: #0f4fa8 !important;
}

body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu-label {
    padding: 8px 10px 5px !important;
    color: #64748b !important;
    font-size: 10px !important;
}

body.nortex-asaas-sidebar-page .nortex-aside-footer {
    background: linear-gradient(180deg, rgba(16,43,74,0), #0d243f 30%) !important;
    border-top: 1px solid rgba(255,255,255,.06) !important;
}

body.nortex-asaas-sidebar-page .nortex-company-card,
body.nortex-asaas-sidebar-page .nortex-user-card {
    background: #0c223b !important;
    border-color: rgba(255,255,255,.08) !important;
    color: #e5efff !important;
}

body.nortex-asaas-sidebar-page .nortex-company-card strong,
body.nortex-asaas-sidebar-page .nortex-user-card strong {
    color: #ffffff !important;
}

body.nortex-asaas-sidebar-page .nortex-company-card small,
body.nortex-asaas-sidebar-page .nortex-user-card small {
    color: #9fb7d3 !important;
}

body.nortex-asaas-sidebar-page .nortex-company-icon,
body.nortex-asaas-sidebar-page .nortex-user-avatar {
    background: #1d4ed8 !important;
    color: #ffffff !important;
}

/* =========================================================
   Nortex sidebar v9 - submenu quadrado e fundo azul contínuo
   Alteração somente visual. Não modifica data-module/data-menu-group.
   ========================================================= */
body.nortex-asaas-sidebar-page .nortex-single-sidebar-layout {
    align-items: stretch !important;
    min-height: 100vh !important;
    background: linear-gradient(90deg, #102b4a 0, #102b4a 265px, #f7f9fc 265px, #f7f9fc 100%) !important;
}

body.nortex-asaas-sidebar-page .nortex-aside-menu {
    min-height: 100vh !important;
    height: auto !important;
    align-self: stretch !important;
    background: #102b4a !important;
}

body.nortex-asaas-sidebar-page .nortex-sidebar-nav {
    background: #102b4a !important;
}

body.nortex-asaas-sidebar-page .nortex-aside-footer {
    background: #102b4a !important;
    margin-top: auto !important;
}

body.nortex-asaas-sidebar-page .nav-submenu {
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 7px 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    box-shadow: none !important;
}

body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu a {
    border-radius: 0 !important;
    margin: 0 !important;
    padding-left: 18px !important;
    padding-right: 14px !important;
}

body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu a:hover {
    background: #eaf3ff !important;
    color: #0056b3 !important;
}

body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu a.active {
    border-radius: 0 !important;
    background: #dbeafe !important;
}

@media (max-width: 1180px) {
    body.nortex-asaas-sidebar-page .nortex-single-sidebar-layout {
        background: linear-gradient(90deg, #102b4a 0, #102b4a 86px, #f7f9fc 86px, #f7f9fc 100%) !important;
    }
}

@media (max-width: 760px) {
    body.nortex-asaas-sidebar-page .nortex-single-sidebar-layout {
        background: #f7f9fc !important;
    }
}

/* =========================================================
   Nortex sidebar v10 - cartões empresa/usuário abaixo do último menu
   Objetivo: impedir que o rodapé do menu seja empurrado para o fim da tela.
   Mantém o restante da coluna com fundo azul contínuo.
   Alteração somente visual.
   ========================================================= */
body.nortex-asaas-sidebar-page .nortex-aside-menu {
    background: #102b4a !important;
    min-height: 100vh !important;
    height: auto !important;
    align-self: stretch !important;
}

body.nortex-asaas-sidebar-page .nortex-sidebar-nav {
    flex: 0 0 auto !important;
    overflow-y: visible !important;
    padding-bottom: 8px !important;
    background: #102b4a !important;
}

body.nortex-asaas-sidebar-page .nortex-aside-footer {
    flex: 0 0 auto !important;
    margin-top: 8px !important;
    padding-top: 10px !important;
    padding-bottom: 18px !important;
    background: #102b4a !important;
    border-top: 1px solid rgba(255,255,255,.06) !important;
}

body.nortex-asaas-sidebar-page .nortex-aside-menu::after {
    content: "" !important;
    display: block !important;
    flex: 1 1 auto !important;
    min-height: 120px !important;
    background: #102b4a !important;
}

@media (max-width: 1180px) {
    body.nortex-asaas-sidebar-page .nortex-sidebar-nav {
        overflow-y: visible !important;
    }

    body.nortex-asaas-sidebar-page .nortex-aside-footer {
        margin-top: 8px !important;
    }
}

/* =====================================================
   Nortex ERP MVP - Dashboard executivo responsivo
   ===================================================== */
body.nortex-asaas-sidebar-page .content-area {
    background: #f3f6fb !important;
}

.nx-mvp-dashboard {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 22px 24px 18px;
    color: #0f172a;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

.nx-mvp-head,
.nx-mvp-head-actions,
.nx-mvp-shortcuts,
.nx-mvp-footer,
.nx-mvp-panel-head,
.nx-mvp-panel-titleline,
.nx-mvp-cash-row,
.nx-mvp-product-row,
.nx-mvp-activity {
    display: flex;
    align-items: center;
}

.nx-mvp-head {
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.nx-mvp-head h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
    font-weight: 800;
    color: #0f172a;
}

.nx-mvp-head p {
    margin: 5px 0 0;
    color: #475569;
    font-size: 14px;
}

.nx-mvp-head-actions { gap: 12px; }

.nx-mvp-date-filter,
.nx-mvp-refresh,
.nx-mvp-panel-head button,
.nx-mvp-shortcut,
.nx-mvp-kpi,
.nx-mvp-link {
    border: 1px solid #d8e0ec;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
}

.nx-mvp-date-filter,
.nx-mvp-refresh {
    height: 42px;
    padding: 0 16px;
    font-weight: 700;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.nx-mvp-refresh {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.nx-mvp-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.nx-mvp-kpi {
    min-height: 112px;
    padding: 18px 18px;
    text-align: left;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 14px;
    transition: transform .16s ease, box-shadow .16s ease;
}

.nx-mvp-kpi:hover,
.nx-mvp-shortcut:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .11);
}

.nx-mvp-kpi-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #fff;
    font-size: 18px;
}

.nx-mvp-kpi-copy small {
    display: block;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .02em;
    color: #334155;
    font-weight: 800;
    margin-bottom: 8px;
}

.nx-mvp-kpi-copy strong {
    display: block;
    font-size: 24px;
    line-height: 1;
    font-weight: 900;
    color: #020617;
    margin-bottom: 9px;
}

.nx-mvp-kpi-copy em {
    display: block;
    font-size: 12px;
    font-style: normal;
    color: #16a34a;
    font-weight: 700;
}

.nx-mvp-kpi-copy em.down { color: #dc2626; }
.nx-mvp-kpi.tone-blue .nx-mvp-kpi-icon,
.nx-mvp-shortcut.tone-blue { background: #2563eb; }
.nx-mvp-kpi.tone-green .nx-mvp-kpi-icon,
.nx-mvp-shortcut.tone-green { background: #16a34a; }
.nx-mvp-kpi.tone-orange .nx-mvp-kpi-icon,
.nx-mvp-shortcut.tone-orange { background: #f97316; }
.nx-mvp-kpi.tone-red .nx-mvp-kpi-icon,
.nx-mvp-shortcut.tone-red { background: #ef4444; }
.nx-mvp-kpi.tone-purple .nx-mvp-kpi-icon,
.nx-mvp-shortcut.tone-purple { background: #7c3aed; }

.nx-mvp-shortcuts {
    background: #fff;
    border: 1px solid #d8e0ec;
    border-radius: 4px;
    padding: 12px;
    gap: 10px;
    margin-bottom: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
}

.nx-mvp-shortcut {
    min-height: 54px;
    flex: 1 1 0;
    justify-content: center;
    gap: 10px;
    color: #fff !important;
    border: none;
    font-weight: 800;
    text-decoration: none !important;
    font-size: 15px;
}

.nx-mvp-shortcut.tone-dark { background: #0b2f53; }

.nx-mvp-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
}

.nx-mvp-grid-main { grid-template-columns: minmax(0, 2fr) minmax(340px, .8fr); }
.nx-mvp-grid-financial { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nx-mvp-grid-bottom { grid-template-columns: 1.05fr 1.1fr 1.25fr; }

.nx-mvp-panel {
    background: #fff;
    border: 1px solid #d8e0ec;
    border-radius: 4px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
    min-width: 0;
}

.nx-mvp-panel-head {
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.nx-mvp-panel-head h2,
.nx-mvp-panel-titleline h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 900;
    color: #0f172a;
}

.nx-mvp-panel-head button {
    height: 36px;
    padding: 0 12px;
    color: #0f172a;
    font-weight: 700;
}

.nx-mvp-chart svg {
    width: 100%;
    height: 270px;
    display: block;
}

.nx-mvp-chart .grid line {
    stroke: #e5eaf2;
    stroke-width: 1;
}

.nx-mvp-chart .grid text,
.nx-mvp-chart .x-label {
    fill: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.nx-mvp-chart .area {
    fill: #dbeafe;
    opacity: .85;
}

.nx-mvp-chart .line {
    fill: none;
    stroke: #2563eb;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nx-mvp-cash-box { display: grid; gap: 10px; }

.nx-mvp-cash-row {
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid #dfe7f2;
    border-radius: 4px;
    background: #f8fafc;
}

.nx-mvp-cash-row span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: #0f172a;
}

.nx-mvp-cash-row strong { font-weight: 900; }
.nx-mvp-cash-row.green { background: #f0fdf4; }
.nx-mvp-cash-row.green strong, .nx-mvp-cash-row.green i { color: #16a34a; }
.nx-mvp-cash-row.red strong, .nx-mvp-cash-row.red i { color: #dc2626; }
.nx-mvp-cash-row.blue strong, .nx-mvp-cash-row.blue i { color: #2563eb; }
.nx-mvp-cash-row.strong { background: #eff6ff; }

.nx-mvp-panel-titleline {
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5eaf2;
    margin-bottom: 14px;
}

.nx-mvp-title-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.nx-mvp-title-icon.green { background: #dcfce7; color: #16a34a; }
.nx-mvp-title-icon.red { background: #fee2e2; color: #ef4444; }

.nx-mvp-fin-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nx-mvp-fin-summary > div {
    padding: 6px 18px;
    border-right: 1px solid #e5eaf2;
}

.nx-mvp-fin-summary > div:first-child { padding-left: 0; }
.nx-mvp-fin-summary > div:last-child { border-right: 0; padding-right: 0; }
.nx-mvp-fin-summary small {
    display: block;
    text-transform: uppercase;
    font-size: 12px;
    color: #475569;
    font-weight: 800;
    margin-bottom: 8px;
}
.nx-mvp-fin-summary strong {
    display: block;
    font-size: 22px;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 6px;
}
.nx-mvp-fin-summary em {
    display: block;
    font-size: 12px;
    font-style: normal;
    color: #475569;
    font-weight: 700;
}
.nx-mvp-fin-summary .danger strong { color: #dc2626; }
.nx-mvp-fin-summary .success strong { color: #16a34a; }

.nx-mvp-product-list,
.nx-mvp-activity-list { display: grid; gap: 12px; }

.nx-mvp-product-row {
    display: grid;
    grid-template-columns: 26px 36px minmax(0, 1fr) auto;
    gap: 10px;
}

.nx-mvp-product-row .rank {
    color: #475569;
    font-weight: 900;
    align-self: center;
}

.nx-mvp-product-row .box {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: #eff6ff;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nx-mvp-product-row strong {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 13px;
    font-weight: 800;
}

.nx-mvp-product-row .bar {
    height: 5px;
    background: #e7edf6;
    border-radius: 0;
    margin-top: 8px;
    overflow: hidden;
}

.nx-mvp-product-row .bar i {
    display: block;
    height: 100%;
    background: #2563eb;
}

.nx-mvp-product-row em {
    font-style: normal;
    font-weight: 800;
    color: #0f172a;
    align-self: center;
    white-space: nowrap;
}

.nx-mvp-seller-chart {
    height: 245px;
    display: flex;
    align-items: end;
    gap: 24px;
    padding: 16px 14px 0;
    border-left: 1px solid #e5eaf2;
    border-bottom: 1px solid #e5eaf2;
}

.nx-mvp-seller-chart .seller {
    flex: 1 1 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    min-width: 42px;
}

.nx-mvp-seller-chart strong {
    font-size: 11px;
    font-weight: 900;
    color: #0f172a;
}

.nx-mvp-seller-chart span {
    width: 38px;
    min-height: 10px;
    background: #2563eb;
    border-radius: 4px 4px 0 0;
}

.nx-mvp-seller-chart em {
    min-height: 30px;
    text-align: center;
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    color: #334155;
}

.nx-mvp-activity {
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5eaf2;
}

.nx-mvp-activity > span {
    width: 34px;
    height: 34px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nx-mvp-activity > span.green { background: #dcfce7; color: #16a34a; }
.nx-mvp-activity > span.blue { background: #dbeafe; color: #2563eb; }
.nx-mvp-activity > span.purple { background: #f3e8ff; color: #7c3aed; }
.nx-mvp-activity div { min-width: 0; flex: 1; }
.nx-mvp-activity strong {
    display: block;
    font-size: 13px;
    font-weight: 900;
    color: #0f172a;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.nx-mvp-activity em {
    display: block;
    margin-top: 2px;
    font-style: normal;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}
.nx-mvp-activity time {
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.nx-mvp-link {
    margin-top: 12px;
    padding: 0;
    border: none;
    color: #2563eb;
    background: transparent;
    font-weight: 900;
}

.nx-mvp-empty {
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-weight: 700;
    text-align: center;
}

.nx-mvp-footer {
    gap: 28px;
    flex-wrap: wrap;
    padding: 12px 6px 0;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
}

.nx-mvp-footer span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nx-mvp-footer strong {
    margin-left: auto;
    color: #0f4aa8;
    font-weight: 900;
}

.nx-mvp-footer .status-ok { color: #16a34a; font-size: 9px; }

@media (max-width: 1400px) {
    .nx-mvp-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .nx-mvp-grid-bottom { grid-template-columns: 1fr 1fr; }
    .nx-mvp-grid-bottom .nx-mvp-panel:last-child { grid-column: 1 / -1; }
}

@media (max-width: 1100px) {
    .nx-mvp-dashboard { padding: 18px 14px; }
    .nx-mvp-grid-main,
    .nx-mvp-grid-financial,
    .nx-mvp-grid-bottom { grid-template-columns: 1fr; }
    .nx-mvp-grid-bottom .nx-mvp-panel:last-child { grid-column: auto; }
    .nx-mvp-shortcuts { flex-wrap: wrap; }
    .nx-mvp-shortcut { flex: 1 1 calc(33.333% - 10px); }
}

@media (max-width: 760px) {
    .nx-mvp-head { align-items: flex-start; flex-direction: column; }
    .nx-mvp-head-actions { width: 100%; flex-direction: column; align-items: stretch; }
    .nx-mvp-date-filter,
    .nx-mvp-refresh { width: 100%; justify-content: center; }
    .nx-mvp-kpis { grid-template-columns: 1fr; }
    .nx-mvp-shortcut { flex: 1 1 100%; }
    .nx-mvp-fin-summary { grid-template-columns: 1fr; }
    .nx-mvp-fin-summary > div,
    .nx-mvp-fin-summary > div:first-child,
    .nx-mvp-fin-summary > div:last-child {
        border-right: 0;
        border-bottom: 1px solid #e5eaf2;
        padding: 12px 0;
    }
    .nx-mvp-fin-summary > div:last-child { border-bottom: 0; }
    .nx-mvp-product-row { grid-template-columns: 22px 32px minmax(0, 1fr); }
    .nx-mvp-product-row em { grid-column: 3; justify-self: start; }
    .nx-mvp-seller-chart { gap: 10px; overflow-x: auto; }
    .nx-mvp-seller-chart .seller { min-width: 70px; }
    .nx-mvp-footer { gap: 10px; flex-direction: column; align-items: flex-start; }
    .nx-mvp-footer strong { margin-left: 0; }
}

/* =====================================================
   NORTEX MVP DASHBOARD - Ajuste visual v14
   Objetivo: atalhos com fundo branco, menor uso de negrito
   ===================================================== */
body.nortex-asaas-sidebar-page .nx-mvp-dashboard,
body.nortex-asaas-sidebar-page .nx-mvp-dashboard * {
    font-weight: 400;
}

body.nortex-asaas-sidebar-page .nx-mvp-head h1,
body.nortex-asaas-sidebar-page .nx-mvp-panel-head h2,
body.nortex-asaas-sidebar-page .nx-mvp-panel-titleline h2,
body.nortex-asaas-sidebar-page .nx-mvp-kpi-copy small,
body.nortex-asaas-sidebar-page .nx-mvp-fin-summary small {
    font-weight: 700 !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-kpi-copy strong,
body.nortex-asaas-sidebar-page .nx-mvp-fin-summary strong,
body.nortex-asaas-sidebar-page .nx-mvp-cash-row strong,
body.nortex-asaas-sidebar-page .nx-mvp-product-row em,
body.nortex-asaas-sidebar-page .nx-mvp-seller-chart strong {
    font-weight: 600 !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-kpi-copy em,
body.nortex-asaas-sidebar-page .nx-mvp-fin-summary em,
body.nortex-asaas-sidebar-page .nx-mvp-activity em,
body.nortex-asaas-sidebar-page .nx-mvp-activity time,
body.nortex-asaas-sidebar-page .nx-mvp-footer,
body.nortex-asaas-sidebar-page .nx-mvp-footer strong,
body.nortex-asaas-sidebar-page .nx-mvp-panel-head button,
body.nortex-asaas-sidebar-page .nx-mvp-date-filter,
body.nortex-asaas-sidebar-page .nx-mvp-refresh {
    font-weight: 500 !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-shortcuts {
    background: #ffffff !important;
    border: 1px solid #d8e0ec !important;
    border-radius: 4px !important;
    padding: 12px !important;
    gap: 10px !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .05) !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-shortcut,
body.nortex-asaas-sidebar-page a.nx-mvp-shortcut {
    min-height: 54px !important;
    background: #ffffff !important;
    border: 1px solid #d8e0ec !important;
    color: #0f172a !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    box-shadow: none !important;
    justify-content: center !important;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-shortcut i {
    width: 30px !important;
    height: 30px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    color: #ffffff !important;
    font-size: 13px !important;
    flex: 0 0 30px !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-shortcut.tone-blue i { background: #2563eb !important; }
body.nortex-asaas-sidebar-page .nx-mvp-shortcut.tone-green i { background: #16a34a !important; }
body.nortex-asaas-sidebar-page .nx-mvp-shortcut.tone-orange i { background: #f97316 !important; }
body.nortex-asaas-sidebar-page .nx-mvp-shortcut.tone-purple i { background: #7c3aed !important; }
body.nortex-asaas-sidebar-page .nx-mvp-shortcut.tone-red i { background: #ef4444 !important; }
body.nortex-asaas-sidebar-page .nx-mvp-shortcut.tone-dark i { background: #0b2f53 !important; }

body.nortex-asaas-sidebar-page .nx-mvp-shortcut:hover,
body.nortex-asaas-sidebar-page a.nx-mvp-shortcut:hover {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    color: #0f2f5f !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .08) !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-shortcut:active,
body.nortex-asaas-sidebar-page a.nx-mvp-shortcut:active {
    transform: translateY(0) !important;
    box-shadow: none !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-product-row strong,
body.nortex-asaas-sidebar-page .nx-mvp-activity strong,
body.nortex-asaas-sidebar-page .nx-mvp-cash-row span,
body.nortex-asaas-sidebar-page .nx-mvp-product-row .rank,
body.nortex-asaas-sidebar-page .nx-mvp-link,
body.nortex-asaas-sidebar-page .nx-mvp-empty {
    font-weight: 500 !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-kpi-copy strong {
    font-size: 23px !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-fin-summary strong {
    font-size: 21px !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-head p,
body.nortex-asaas-sidebar-page .nx-mvp-kpi-copy em,
body.nortex-asaas-sidebar-page .nx-mvp-fin-summary em,
body.nortex-asaas-sidebar-page .nx-mvp-activity em,
body.nortex-asaas-sidebar-page .nx-mvp-footer span {
    color: #475569 !important;
}

@media (max-width: 1100px) {
    body.nortex-asaas-sidebar-page .nx-mvp-shortcut,
    body.nortex-asaas-sidebar-page a.nx-mvp-shortcut {
        justify-content: flex-start !important;
        padding: 0 14px !important;
    }
}


/* =====================================================
   NORTEX MVP DASHBOARD - Ajuste visual v15
   Objetivo: voltar atalhos coloridos, centralizar texto/ícone
   e corrigir ícones Font Awesome após redução de negrito.
   ===================================================== */
body.nortex-asaas-sidebar-page .nx-mvp-dashboard i,
body.nortex-asaas-sidebar-page .nx-mvp-dashboard .fa,
body.nortex-asaas-sidebar-page .nx-mvp-dashboard .fas,
body.nortex-asaas-sidebar-page .nx-mvp-dashboard .fa-solid,
body.nortex-asaas-sidebar-page .nx-mvp-dashboard .far,
body.nortex-asaas-sidebar-page .nx-mvp-dashboard .fa-regular {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    line-height: 1 !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-shortcuts {
    background: #ffffff !important;
    border: 1px solid #d8e0ec !important;
    border-radius: 4px !important;
    padding: 12px !important;
    gap: 10px !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-shortcut,
body.nortex-asaas-sidebar-page a.nx-mvp-shortcut {
    min-height: 54px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    border: 1px solid transparent !important;
    border-radius: 4px !important;
    color: #ffffff !important;
    text-align: center !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
    white-space: nowrap !important;
    padding: 0 16px !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-shortcut i {
    width: auto !important;
    height: auto !important;
    min-width: 18px !important;
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    color: #ffffff !important;
    font-size: 15px !important;
    margin: 0 !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-shortcut.tone-blue,
body.nortex-asaas-sidebar-page a.nx-mvp-shortcut.tone-blue {
    background: #2563eb !important;
    border-color: #2563eb !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-shortcut.tone-green,
body.nortex-asaas-sidebar-page a.nx-mvp-shortcut.tone-green {
    background: #16a34a !important;
    border-color: #16a34a !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-shortcut.tone-orange,
body.nortex-asaas-sidebar-page a.nx-mvp-shortcut.tone-orange {
    background: #f97316 !important;
    border-color: #f97316 !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-shortcut.tone-purple,
body.nortex-asaas-sidebar-page a.nx-mvp-shortcut.tone-purple {
    background: #7c3aed !important;
    border-color: #7c3aed !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-shortcut.tone-red,
body.nortex-asaas-sidebar-page a.nx-mvp-shortcut.tone-red {
    background: #2563eb !important;
    border-color: #2563eb !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-shortcut.tone-dark,
body.nortex-asaas-sidebar-page a.nx-mvp-shortcut.tone-dark {
    background: #0b2f53 !important;
    border-color: #0b2f53 !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-shortcut:hover,
body.nortex-asaas-sidebar-page a.nx-mvp-shortcut:hover {
    filter: brightness(.96) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .12) !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-kpi-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-kpi-icon i {
    color: #ffffff !important;
    font-size: 17px !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-kpi-copy small,
body.nortex-asaas-sidebar-page .nx-mvp-panel-head h2,
body.nortex-asaas-sidebar-page .nx-mvp-panel-titleline h2 {
    font-weight: 700 !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-kpi-copy strong,
body.nortex-asaas-sidebar-page .nx-mvp-fin-summary strong,
body.nortex-asaas-sidebar-page .nx-mvp-cash-row strong {
    font-weight: 600 !important;
}

@media (max-width: 1100px) {
    body.nortex-asaas-sidebar-page .nx-mvp-shortcut,
    body.nortex-asaas-sidebar-page a.nx-mvp-shortcut {
        justify-content: center !important;
        padding: 0 12px !important;
    }
}

@media (max-width: 760px) {
    body.nortex-asaas-sidebar-page .nx-mvp-shortcut,
    body.nortex-asaas-sidebar-page a.nx-mvp-shortcut {
        width: 100% !important;
    }
}


/* =====================================================
   NORTEX PADRAO VISUAL OFICIAL - Vendas/Orcamentos v17
   Padrão salvo: cantos discretos/quadrados, botões principais
   verdes sólidos, menos negrito e melhor adaptação à tela.
   ===================================================== */
body.nortex-asaas-sidebar-page .nx-commercial-sales-page,
body.nortex-asaas-sidebar-page .commercial-sale-form-page {
    --nx-radius-square: 4px;
    --nx-green-main: #28b446;
    --nx-green-main-hover: #1fa13c;
    --nx-border-soft: #d8e0ec;
    --nx-text-main: #0f172a;
    --nx-text-muted: #64748b;
    width: 100% !important;
    max-width: 100% !important;
}
body.nortex-asaas-sidebar-page .content-area,
body.nortex-asaas-sidebar-page #contentContainer { min-width: 0 !important; }
body.nortex-asaas-sidebar-page .nx-commercial-sales-page { display: flex !important; flex-direction: column !important; gap: 16px !important; }
body.nortex-asaas-sidebar-page .nx-commercial-sales-page .nx-page-hero { border-radius: var(--nx-radius-square) !important; padding: 18px 0 6px !important; margin: 0 !important; background: transparent !important; box-shadow: none !important; border: 0 !important; }
body.nortex-asaas-sidebar-page .nx-commercial-sales-page .nx-page-hero h1,
body.nortex-asaas-sidebar-page .commercial-sale-form-page .nortex-page-header h1,
body.nortex-asaas-sidebar-page .commercial-sale-form-page .page-header h1,
body.nortex-asaas-sidebar-page .commercial-sale-form-page h1 { font-weight: 700 !important; letter-spacing: -0.02em !important; }
body.nortex-asaas-sidebar-page .nx-commercial-sales-page .nx-page-hero p,
body.nortex-asaas-sidebar-page .commercial-sale-form-page .nortex-page-header p,
body.nortex-asaas-sidebar-page .commercial-sale-form-page .page-header p { font-weight: 400 !important; color: var(--nx-text-muted) !important; }
body.nortex-asaas-sidebar-page .nx-commercial-sales-page .nx-btn-primary,
body.nortex-asaas-sidebar-page .commercial-sale-form-page .nx-btn-primary,
body.nortex-asaas-sidebar-page .commercial-sale-form-page .btn-primary,
body.nortex-asaas-sidebar-page .commercial-sale-form-page button[type="submit"] { background: var(--nx-green-main) !important; border-color: var(--nx-green-main) !important; color: #ffffff !important; border-radius: var(--nx-radius-square) !important; font-weight: 600 !important; box-shadow: none !important; background-image: none !important; }
body.nortex-asaas-sidebar-page .nx-commercial-sales-page .nx-btn-primary:hover,
body.nortex-asaas-sidebar-page .commercial-sale-form-page .nx-btn-primary:hover,
body.nortex-asaas-sidebar-page .commercial-sale-form-page .btn-primary:hover,
body.nortex-asaas-sidebar-page .commercial-sale-form-page button[type="submit"]:hover { background: var(--nx-green-main-hover) !important; border-color: var(--nx-green-main-hover) !important; color: #ffffff !important; transform: none !important; box-shadow: none !important; }
body.nortex-asaas-sidebar-page .nx-commercial-sales-page #newCommercialSaleBtn,
body.nortex-asaas-sidebar-page .nx-commercial-sales-page #btnApplyCommercialSalesFilters,
body.nortex-asaas-sidebar-page .commercial-sale-form-page #commercialAddItemBtn { min-height: 44px !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 8px !important; padding: 0 18px !important; }
body.nortex-asaas-sidebar-page .nx-commercial-sales-page .nx-btn-outline,
body.nortex-asaas-sidebar-page .commercial-sale-form-page .nx-btn-outline,
body.nortex-asaas-sidebar-page .commercial-sale-form-page .btn-secondary,
body.nortex-asaas-sidebar-page .commercial-sale-form-page .btn { border-radius: var(--nx-radius-square) !important; box-shadow: none !important; }
body.nortex-asaas-sidebar-page .nx-commercial-sales-kpis { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important; gap: 12px !important; width: 100% !important; }
body.nortex-asaas-sidebar-page .nx-commercial-sales-kpis .nx-kpi-card { border-radius: var(--nx-radius-square) !important; border: 1px solid var(--nx-border-soft) !important; box-shadow: none !important; min-height: 108px !important; padding: 16px !important; align-items: center !important; background: #ffffff !important; }
body.nortex-asaas-sidebar-page .nx-commercial-sales-kpis .nx-kpi-icon { border-radius: var(--nx-radius-square) !important; width: 42px !important; height: 42px !important; flex: 0 0 42px !important; }
body.nortex-asaas-sidebar-page .nx-commercial-sales-kpis .nx-kpi-card span,
body.nortex-asaas-sidebar-page .nx-commercial-sales-kpis .nx-kpi-card small { font-weight: 400 !important; color: var(--nx-text-muted) !important; }
body.nortex-asaas-sidebar-page .nx-commercial-sales-kpis .nx-kpi-card strong { font-size: 21px !important; font-weight: 600 !important; color: var(--nx-text-main) !important; }
body.nortex-asaas-sidebar-page .nx-commercial-sales-page .nx-panel,
body.nortex-asaas-sidebar-page .nx-commercial-sales-page .nx-filter-panel,
body.nortex-asaas-sidebar-page .nx-commercial-sales-page .nx-table-panel,
body.nortex-asaas-sidebar-page .commercial-sale-form-page .nx-form-section-card,
body.nortex-asaas-sidebar-page .commercial-sale-form-page .form-section,
body.nortex-asaas-sidebar-page .commercial-sale-form-page .commercial-add-row,
body.nortex-asaas-sidebar-page .commercial-sale-form-page .commercial-total-box,
body.nortex-asaas-sidebar-page .commercial-sale-form-page .commercial-totals,
body.nortex-asaas-sidebar-page .commercial-sale-form-page .commercial-payments-container,
body.nortex-asaas-sidebar-page .commercial-sale-form-page .commercial-payment-card,
body.nortex-asaas-sidebar-page .commercial-sale-form-page .commercial-payment-header { border-radius: var(--nx-radius-square) !important; border-color: var(--nx-border-soft) !important; box-shadow: none !important; }
body.nortex-asaas-sidebar-page .nx-commercial-filter-panel { padding: 16px !important; }
body.nortex-asaas-sidebar-page .nx-commercial-filter-row { display: grid !important; grid-template-columns: minmax(280px, 1fr) 160px 120px !important; gap: 12px !important; align-items: end !important; }
body.nortex-asaas-sidebar-page .nx-commercial-period-row { display: grid !important; grid-template-columns: minmax(240px, auto) 160px 160px auto !important; gap: 12px !important; align-items: end !important; margin-top: 14px !important; }
body.nortex-asaas-sidebar-page .nx-commercial-sales-page input,
body.nortex-asaas-sidebar-page .nx-commercial-sales-page select,
body.nortex-asaas-sidebar-page .nx-commercial-sales-page textarea,
body.nortex-asaas-sidebar-page .commercial-sale-form-page input,
body.nortex-asaas-sidebar-page .commercial-sale-form-page select,
body.nortex-asaas-sidebar-page .commercial-sale-form-page textarea,
body.nortex-asaas-sidebar-page .commercial-sale-form-page .form-control { border-radius: var(--nx-radius-square) !important; border: 1px solid var(--nx-border-soft) !important; box-shadow: none !important; background: #ffffff !important; min-height: 42px !important; font-weight: 400 !important; }
body.nortex-asaas-sidebar-page .nx-commercial-sales-page input:focus,
body.nortex-asaas-sidebar-page .nx-commercial-sales-page select:focus,
body.nortex-asaas-sidebar-page .nx-commercial-sales-page textarea:focus,
body.nortex-asaas-sidebar-page .commercial-sale-form-page input:focus,
body.nortex-asaas-sidebar-page .commercial-sale-form-page select:focus,
body.nortex-asaas-sidebar-page .commercial-sale-form-page textarea:focus { border-color: #2563eb !important; box-shadow: 0 0 0 3px rgba(37, 99, 235, .10) !important; }
body.nortex-asaas-sidebar-page .commercial-sale-form-page label,
body.nortex-asaas-sidebar-page .nx-commercial-sales-page label { font-weight: 500 !important; color: #475569 !important; }
body.nortex-asaas-sidebar-page .commercial-sale-form-page h3,
body.nortex-asaas-sidebar-page .nx-commercial-sales-page .nx-table-toolbar,
body.nortex-asaas-sidebar-page .nx-commercial-sales-page .nx-table th { font-weight: 600 !important; }
body.nortex-asaas-sidebar-page .commercial-sale-form-page .form-grid,
body.nortex-asaas-sidebar-page .commercial-form .form-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important; gap: 14px !important; }
body.nortex-asaas-sidebar-page .commercial-sale-form-page .commercial-add-row { grid-template-columns: minmax(260px, 1.5fr) 100px 150px 130px !important; gap: 12px !important; }
body.nortex-asaas-sidebar-page .commercial-sale-form-page .commercial-payment-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important; gap: 12px !important; }
body.nortex-asaas-sidebar-page .commercial-input-prefix span { border-radius: var(--nx-radius-square) 0 0 var(--nx-radius-square) !important; background: #0f2f5f !important; border-color: #0f2f5f !important; }
body.nortex-asaas-sidebar-page .commercial-input-prefix input { border-radius: 0 var(--nx-radius-square) var(--nx-radius-square) 0 !important; }
body.nortex-asaas-sidebar-page .commercial-sales-table-panel { overflow: hidden !important; }
body.nortex-asaas-sidebar-page .commercial-sales-table th,
body.nortex-asaas-sidebar-page .commercial-sales-table td { font-weight: 400 !important; vertical-align: middle !important; }
body.nortex-asaas-sidebar-page .commercial-sales-table th { font-weight: 600 !important; }
body.nortex-asaas-sidebar-page .commercial-sales-table .nx-sale-number,
body.nortex-asaas-sidebar-page .commercial-sales-table .nx-type-pill,
body.nortex-asaas-sidebar-page .commercial-sales-table .status-badge,
body.nortex-asaas-sidebar-page .commercial-sales-table .action-icon-btn,
body.nortex-asaas-sidebar-page .commercial-sales-pagination-bar .nx-page-btn,
body.nortex-asaas-sidebar-page .period-btn,
body.nortex-asaas-sidebar-page .nx-period-btn,
body.nortex-asaas-sidebar-page .nx-avatar { border-radius: var(--nx-radius-square) !important; }
body.nortex-asaas-sidebar-page .commercial-sales-table .nx-entity-cell strong { font-weight: 500 !important; }
body.nortex-asaas-sidebar-page .table-actions .action-icon-btn { box-shadow: none !important; }
@media (max-width: 1180px) {
    body.nortex-asaas-sidebar-page .nx-commercial-filter-row,
    body.nortex-asaas-sidebar-page .nx-commercial-period-row { grid-template-columns: 1fr 1fr !important; }
    body.nortex-asaas-sidebar-page .nx-commercial-filter-row .nx-search-field { grid-column: 1 / -1 !important; }
    body.nortex-asaas-sidebar-page .commercial-sale-form-page .commercial-add-row { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 760px) {
    body.nortex-asaas-sidebar-page .content-area { padding: 12px !important; }
    body.nortex-asaas-sidebar-page .nx-commercial-sales-page .nx-page-hero,
    body.nortex-asaas-sidebar-page .nx-commercial-sales-page .nx-page-actions { flex-direction: column !important; align-items: stretch !important; gap: 10px !important; }
    body.nortex-asaas-sidebar-page .nx-commercial-sales-page .nx-page-actions .nx-btn,
    body.nortex-asaas-sidebar-page .nx-commercial-sales-page #newCommercialSaleBtn,
    body.nortex-asaas-sidebar-page .nx-commercial-filter-actions,
    body.nortex-asaas-sidebar-page .nx-commercial-filter-actions .nx-btn,
    body.nortex-asaas-sidebar-page .commercial-sale-form-page .btn,
    body.nortex-asaas-sidebar-page .commercial-sale-form-page button { width: 100% !important; }
    body.nortex-asaas-sidebar-page .nx-commercial-filter-row,
    body.nortex-asaas-sidebar-page .nx-commercial-period-row,
    body.nortex-asaas-sidebar-page .commercial-sale-form-page .form-grid,
    body.nortex-asaas-sidebar-page .commercial-form .form-grid,
    body.nortex-asaas-sidebar-page .commercial-sale-form-page .commercial-add-row,
    body.nortex-asaas-sidebar-page .commercial-sale-form-page .commercial-totals,
    body.nortex-asaas-sidebar-page .commercial-sale-form-page .commercial-discount-grid,
    body.nortex-asaas-sidebar-page .commercial-sale-form-page .commercial-payment-grid,
    body.nortex-asaas-sidebar-page .commercial-installments-preview { grid-template-columns: 1fr !important; }
    body.nortex-asaas-sidebar-page .nx-commercial-sales-kpis { grid-template-columns: 1fr !important; }
    body.nortex-asaas-sidebar-page .nx-commercial-sales-page .table-responsive { overflow: visible !important; }
    body.nortex-asaas-sidebar-page .commercial-sales-table,
    body.nortex-asaas-sidebar-page .commercial-sales-table thead,
    body.nortex-asaas-sidebar-page .commercial-sales-table tbody,
    body.nortex-asaas-sidebar-page .commercial-sales-table tr,
    body.nortex-asaas-sidebar-page .commercial-sales-table th,
    body.nortex-asaas-sidebar-page .commercial-sales-table td { display: block !important; width: 100% !important; }
    body.nortex-asaas-sidebar-page .commercial-sales-table thead { display: none !important; }
    body.nortex-asaas-sidebar-page .commercial-sales-table tr { border: 1px solid var(--nx-border-soft) !important; border-radius: var(--nx-radius-square) !important; margin-bottom: 10px !important; background: #ffffff !important; overflow: hidden !important; }
    body.nortex-asaas-sidebar-page .commercial-sales-table td { min-height: 42px !important; padding: 10px 12px !important; border: 0 !important; border-bottom: 1px solid #eef2f7 !important; display: grid !important; grid-template-columns: 96px minmax(0, 1fr) !important; gap: 12px !important; align-items: center !important; }
    body.nortex-asaas-sidebar-page .commercial-sales-table td:last-child { border-bottom: 0 !important; }
    body.nortex-asaas-sidebar-page .commercial-sales-table td::before { content: attr(data-label) !important; color: #64748b !important; font-size: 12px !important; font-weight: 600 !important; text-transform: uppercase !important; }
    body.nortex-asaas-sidebar-page .commercial-sales-table .nx-row-actions { justify-content: flex-start !important; flex-wrap: wrap !important; }
    body.nortex-asaas-sidebar-page .commercial-sales-pagination-bar { justify-content: center !important; flex-wrap: wrap !important; }
}


/* =====================================================
   Nortex V20 - Cadastro rápido de cliente em Venda/Orçamento
   ===================================================== */
.commercial-form .form-section:first-of-type .form-grid {
    grid-template-columns: minmax(140px, 0.65fr) minmax(320px, 1.8fr) repeat(3, minmax(150px, 1fr)) !important;
    gap: 14px !important;
}

.commercial-form .commercial-client-field {
    min-width: 0 !important;
}

.commercial-client-inline {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 44px !important;
    gap: 8px !important;
    align-items: stretch !important;
}

.commercial-client-inline input {
    min-width: 0 !important;
}

.commercial-quick-client-btn {
    width: 44px !important;
    min-width: 44px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #16a34a !important;
    color: #ffffff !important;
    border: 1px solid #16a34a !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}

.commercial-quick-client-btn:hover {
    background: #15803d !important;
    border-color: #15803d !important;
}

.commercial-quick-client-modal {
    width: min(520px, calc(100vw - 32px));
}

.quick-client-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding-bottom: 14px;
    border-bottom: 1px solid #dbe6f5;
    margin-bottom: 14px;
}

.quick-client-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 4px;
}

.quick-client-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 20px;
    font-weight: 700;
}

.quick-client-header p {
    margin: 3px 0 0;
    color: #475569;
    font-size: 13px;
    font-weight: 400;
}

.quick-client-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.quick-client-form .full-width {
    grid-column: 1 / -1;
}

.quick-client-form .form-group {
    margin: 0;
    gap: 6px;
}

.quick-client-form .form-group label {
    font-weight: 500 !important;
    color: #0f172a !important;
}

.quick-client-form input {
    width: 100% !important;
    height: 42px !important;
    border: 1px solid #cbd8ea !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    padding: 10px 12px !important;
    color: #0f172a !important;
}

.quick-client-form input:focus {
    outline: none !important;
    border-color: #16a34a !important;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12) !important;
}

.quick-client-form small {
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
}

.quick-client-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #dbe6f5;
}

.quick-client-actions .btn {
    min-height: 42px;
    border-radius: 4px !important;
    font-weight: 500 !important;
}

.quick-client-save-btn {
    background: #16a34a !important;
    border: 1px solid #16a34a !important;
    color: #ffffff !important;
}

.quick-client-save-btn:hover:not(:disabled) {
    background: #15803d !important;
    border-color: #15803d !important;
}

@media (max-width: 1280px) {
    .commercial-form .form-section:first-of-type .form-grid {
        grid-template-columns: minmax(140px, 0.7fr) minmax(280px, 1.5fr) repeat(3, minmax(150px, 1fr)) !important;
    }
}

@media (max-width: 980px) {
    .commercial-form .form-section:first-of-type .form-grid {
        grid-template-columns: 1fr !important;
    }

    .commercial-client-inline {
        grid-template-columns: minmax(0, 1fr) 44px !important;
    }
}

@media (max-width: 560px) {
    .quick-client-form {
        grid-template-columns: 1fr;
    }

    .quick-client-actions {
        flex-direction: column-reverse;
    }

    .quick-client-actions .btn {
        width: 100%;
        justify-content: center;
    }
}


/* =====================================================
   NORTEX UI STANDARD V21 - PADRAO VISUAL DEFINITIVO
   Layout quadrado, verde solido, azul solido e menos negrito.
   Este bloco deve permanecer no final do arquivo para sobrescrever
   estilos antigos sem alterar regras de negocio.
   ===================================================== */
:root {
    --border-radius: 4px;
    --radius-lg: 4px;
    --radius-md: 4px;
    --nortex-radius: 4px;
    --nortex-green: #16a34a;
    --nortex-green-hover: #15803d;
    --nortex-blue: #2563eb;
    --nortex-blue-dark: #0f2f5f;
    --nortex-border: #cbd5e1;
    --nortex-soft-border: #e2e8f0;
    --nortex-surface: #ffffff;
    --nortex-bg: #f1f5f9;
    --nortex-text: #0f172a;
    --nortex-muted: #64748b;
}

/* Base global do novo padrao */
.card,
.card-header,
.form-grid,
.table-panel,
.table-toolbar,
.table-responsive,
.modal-content,
.alert,
.summary-card,
.dashboard-panel,
.dashboard-kpi-card,
.nx-home-kpi,
.nx-card,
.nx-panel,
.nx-modal,
.commercial-form .form-grid,
.commercial-add-row,
.commercial-totals,
.commercial-total-box,
.commercial-payment-line,
.commercial-payment-header,
.commercial-payments-container,
.commercial-payment-card,
.commercial-installments-preview,
.commercial-sales-filter-panel,
.pdv-sales-filter-panel,
.clients-filter-panel,
.client-detail-card,
.client-detail-grid > div,
.cash-open-box,
.cash-summary-list > div,
.cash-report-summary > div,
.import-client-card,
.import-result-card,
.loading-card,
.quick-client-modal,
.commercial-quick-client-modal,
.quick-client-icon,
#quickClientModal .modal-content,
#commercialQuickClientForm input,
#commercialQuickClientForm select,
#commercialQuickClientForm textarea {
    border-radius: var(--nortex-radius) !important;
}

/* Campos de formulario quadrados e consistentes */
input,
select,
textarea,
.form-control,
.table-search,
.filter-field input,
.filter-field select,
.clients-filter-panel input,
.clients-filter-panel select,
.commercial-form input,
.commercial-form select,
.commercial-form textarea,
.commercial-add-row input,
.commercial-add-row select,
.commercial-payment-line input,
.commercial-payment-line select,
.commercial-payment-grid input,
.commercial-payment-grid select,
.commercial-total-box input,
#quickClientModal input,
#quickClientModal select,
#quickClientModal textarea,
#commercialQuickClientForm input,
#commercialQuickClientForm select,
#commercialQuickClientForm textarea {
    border-radius: var(--nortex-radius) !important;
    border: 1px solid var(--nortex-border) !important;
    min-height: 42px;
    background: #ffffff !important;
    box-shadow: none;
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.commercial-form input:focus,
.commercial-form select:focus,
.commercial-form textarea:focus,
#quickClientModal input:focus,
#quickClientModal select:focus,
#quickClientModal textarea:focus,
#commercialQuickClientForm input:focus,
#commercialQuickClientForm select:focus,
#commercialQuickClientForm textarea:focus {
    border-color: var(--nortex-blue) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12) !important;
    outline: none !important;
}

/* Botoes: principal verde solido, sem gradiente */
.btn,
.nx-btn,
.period-btn,
.action-icon-btn,
.commercial-add-btn,
.commercial-quick-client-btn,
.quick-client-actions .btn,
#quickClientModal .btn,
#commercialQuickClientForm .btn {
    border-radius: var(--nortex-radius) !important;
    font-weight: 500 !important;
    box-shadow: none !important;
}

.btn-success,
.nx-btn-success,
.btn-primary.action-success,
.action-success,
.commercial-quick-client-btn,
.quick-client-save-btn,
#quickClientModal .btn-success,
#commercialQuickClientForm .btn-success,
button[type="submit"].btn-success {
    background: var(--nortex-green) !important;
    border: 1px solid var(--nortex-green) !important;
    color: #ffffff !important;
}

.btn-success:hover:not(:disabled),
.nx-btn-success:hover:not(:disabled),
.action-success:hover:not(:disabled),
.commercial-quick-client-btn:hover,
.quick-client-save-btn:hover:not(:disabled),
#quickClientModal .btn-success:hover:not(:disabled),
#commercialQuickClientForm .btn-success:hover:not(:disabled) {
    background: var(--nortex-green-hover) !important;
    border-color: var(--nortex-green-hover) !important;
}

.btn-primary,
.nx-btn-primary {
    background: var(--nortex-blue) !important;
    border: 1px solid var(--nortex-blue) !important;
    color: #ffffff !important;
}

.btn-secondary,
.quick-client-actions .btn-secondary,
#quickClientModal .btn-secondary {
    background: #ffffff !important;
    color: var(--nortex-text) !important;
    border: 1px solid var(--nortex-border) !important;
}

/* Tipografia: menos negrito em textos operacionais */
.form-group label,
.filter-field span,
.commercial-form .form-group label,
.commercial-add-row .form-group label,
.commercial-payment-line .form-group label,
.commercial-payment-grid label,
.clients-filter-panel .filter-group label,
.quick-client-form .form-group label,
#quickClientModal label,
#commercialQuickClientForm label {
    font-weight: 500 !important;
    color: var(--nortex-text) !important;
}

.page-header h1,
.module-header-row h1,
.dashboard-header h1,
.nx-page-title,
.card-header h2,
.panel-title-row h2,
.quick-client-header h2,
#quickClientModal h2 {
    font-weight: 700 !important;
    color: var(--nortex-text) !important;
}

.table th,
.table thead th,
.commercial-table th,
.clients-table th {
    font-weight: 600 !important;
}

/* Remocao visual do padrao antigo com sombras/gradientes exagerados */
.table-toolbar,
.dashboard-hero,
.commercial-payment-header,
.commercial-payments-container,
.clients-filter-panel,
.pdv-sales-filter-panel,
.commercial-sales-filter-panel {
    background: #ffffff !important;
    box-shadow: none !important;
}

.card,
.summary-card,
.dashboard-panel,
.dashboard-kpi-card,
.table-panel,
.commercial-form .form-grid,
.commercial-add-row,
.commercial-totals,
.commercial-payment-card,
.client-detail-card,
#quickClientModal .modal-content,
.quick-client-modal {
    box-shadow: 0 8px 20px rgba(15, 23, 42, .04) !important;
    border: 1px solid var(--nortex-soft-border) !important;
}

/* Vendas/Orcamentos: alinhamento e proporcao do formulario principal */
.commercial-form .form-grid {
    grid-template-columns: minmax(130px, 160px) minmax(360px, 1.7fr) repeat(3, minmax(160px, 1fr)) !important;
    gap: 14px !important;
    align-items: end !important;
    padding: 18px !important;
}

.commercial-client-inline {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 46px !important;
    gap: 8px !important;
    align-items: end !important;
}

.commercial-quick-client-btn {
    width: 46px !important;
    min-width: 46px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Modal de cadastro rapido de cliente */
.quick-client-modal,
#quickClientModal .modal-content {
    max-width: 620px !important;
    padding: 22px !important;
}

.quick-client-header {
    gap: 12px !important;
    padding-bottom: 14px !important;
    margin-bottom: 14px !important;
    border-bottom: 1px solid var(--nortex-soft-border) !important;
}

.quick-client-icon {
    width: 34px !important;
    height: 34px !important;
    background: #dcfce7 !important;
    color: var(--nortex-green) !important;
}

.quick-client-form {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

.quick-client-form .full-width {
    grid-column: 1 / -1 !important;
}

.quick-client-form .form-group {
    gap: 6px !important;
    margin: 0 !important;
}

.quick-client-form small {
    color: var(--nortex-muted) !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
}

.quick-client-actions {
    grid-column: 1 / -1 !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    padding-top: 14px !important;
    border-top: 1px solid var(--nortex-soft-border) !important;
}

.modal-close,
#quickClientModal .modal-close {
    top: 14px !important;
    right: 14px !important;
    font-size: 20px !important;
    color: var(--nortex-muted) !important;
}

/* Tabelas e badges com visual mais reto */
.status-badge,
.period-btn,
.client-detail-grid > div,
.cash-status-badge,
.status-badge.credit-success,
.status-badge.credit-warning,
.status-badge.credit-danger {
    border-radius: var(--nortex-radius) !important;
}

.table thead,
.table th {
    background: #f8fafc !important;
    color: var(--nortex-text) !important;
    border-bottom: 1px solid var(--nortex-soft-border) !important;
}

.table tbody tr:nth-child(odd),
.table tbody tr:nth-child(even) {
    background: #ffffff !important;
}

.table tbody tr:hover {
    background: #f8fafc !important;
    box-shadow: inset 3px 0 0 var(--nortex-blue) !important;
}

/* Responsivo */
@media (max-width: 1180px) {
    .commercial-form .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 720px) {
    .commercial-form .form-grid,
    .quick-client-form {
        grid-template-columns: 1fr !important;
    }

    .commercial-client-inline {
        grid-template-columns: 1fr 46px !important;
    }

    .quick-client-modal,
    #quickClientModal .modal-content {
        max-width: calc(100vw - 24px) !important;
        padding: 16px !important;
    }

    .quick-client-actions {
        flex-direction: column-reverse !important;
    }

    .quick-client-actions .btn {
        width: 100% !important;
        justify-content: center !important;
    }
}


/* =====================================================
   NORTEX UI STANDARD V22 - HIERARQUIA OFICIAL DE ACOES
   SaaS multiempresa: bloco exclusivamente visual.
   Nao altera queries, rotas, sessoes, auth, CSRF ou isolamento por company_id.
   ===================================================== */
:root {
    --nortex-green: #28a745;
    --nortex-green-hover: #218838;
    --nortex-green-soft: #e8f7ed;
    --nortex-blue: #2563eb;
    --nortex-blue-dark: #0f2f5f;
    --nortex-border: #cbd5e1;
    --nortex-soft-border: #e2e8f0;
    --nortex-radius: 4px;
}

/* Acoes principais: sempre verde solido */
.btn-primary,
.btn-success,
.nx-btn-primary,
.nx-btn-success,
.xml-btn-primary,
button[type="submit"].btn,
button[type="submit"].btn-primary,
button[type="submit"].btn-success,
button[type="button"].btn-primary,
button[type="button"].btn-success,
#btnApplyPdvSalesFilters,
#btnApplyCommercialSalesFilters,
#btnOpenPdvNewTab,
#newCommercialSaleBtn,
#productsApplyFilters,
#clientsApplyFilters,
#soApply,
#purchaseXmlFilterBtn,
.cashflow-filter-submit,
.commercial-quick-client-btn,
.quick-client-save-btn,
.action-success {
    background: var(--nortex-green) !important;
    border: 1px solid var(--nortex-green) !important;
    color: #ffffff !important;
    border-radius: var(--nortex-radius) !important;
    box-shadow: none !important;
    font-weight: 500 !important;
    text-decoration: none !important;
}

.btn-primary:hover:not(:disabled),
.btn-success:hover:not(:disabled),
.nx-btn-primary:hover:not(:disabled),
.nx-btn-success:hover:not(:disabled),
.xml-btn-primary:hover:not(:disabled),
button[type="submit"].btn:hover:not(:disabled),
button[type="submit"].btn-primary:hover:not(:disabled),
button[type="submit"].btn-success:hover:not(:disabled),
button[type="button"].btn-primary:hover:not(:disabled),
button[type="button"].btn-success:hover:not(:disabled),
#btnApplyPdvSalesFilters:hover:not(:disabled),
#btnApplyCommercialSalesFilters:hover:not(:disabled),
#btnOpenPdvNewTab:hover:not(:disabled),
#newCommercialSaleBtn:hover:not(:disabled),
#productsApplyFilters:hover:not(:disabled),
#clientsApplyFilters:hover:not(:disabled),
#soApply:hover:not(:disabled),
#purchaseXmlFilterBtn:hover:not(:disabled),
.cashflow-filter-submit:hover:not(:disabled),
.commercial-quick-client-btn:hover:not(:disabled),
.quick-client-save-btn:hover:not(:disabled),
.action-success:hover:not(:disabled) {
    background: var(--nortex-green-hover) !important;
    border-color: var(--nortex-green-hover) !important;
    color: #ffffff !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Acoes secundarias: branco com borda discreta */
.btn-secondary,
.nx-btn-outline,
.btn-outline,
button.btn-secondary,
#btnClearPdvSalesFilters,
#btnClearCommercialSalesFilters,
#productsClearFilters,
#clientsClearFilters,
#soClear,
#btnPdvSalesPrint,
#btnPdvSalesPdf,
#btnPdvSalesExcel,
#btnCommercialSalesPrint,
#btnCommercialSalesPdf,
#btnCommercialSalesExcel,
.quick-client-actions .btn-secondary,
#quickClientModal .btn-secondary,
#commercialQuickClientForm .btn-secondary,
.set-default-boleto-btn {
    background: #ffffff !important;
    border: 1px solid var(--nortex-border) !important;
    color: #334155 !important;
    border-radius: var(--nortex-radius) !important;
    box-shadow: none !important;
    font-weight: 500 !important;
}

.btn-secondary:hover:not(:disabled),
.nx-btn-outline:hover:not(:disabled),
.btn-outline:hover:not(:disabled),
button.btn-secondary:hover:not(:disabled),
#btnClearPdvSalesFilters:hover:not(:disabled),
#btnClearCommercialSalesFilters:hover:not(:disabled),
#productsClearFilters:hover:not(:disabled),
#clientsClearFilters:hover:not(:disabled),
#soClear:hover:not(:disabled),
#btnPdvSalesPrint:hover:not(:disabled),
#btnPdvSalesPdf:hover:not(:disabled),
#btnPdvSalesExcel:hover:not(:disabled),
#btnCommercialSalesPrint:hover:not(:disabled),
#btnCommercialSalesPdf:hover:not(:disabled),
#btnCommercialSalesExcel:hover:not(:disabled),
.quick-client-actions .btn-secondary:hover:not(:disabled),
#quickClientModal .btn-secondary:hover:not(:disabled),
#commercialQuickClientForm .btn-secondary:hover:not(:disabled) {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Azul reservado para navegacao, links e estados ativos */
a,
.link,
.nx-link,
.table a {
    color: var(--nortex-blue) !important;
}

.nortex-aside-menu .nav-group-toggle,
.nortex-aside-menu .nav-item-single,
.nortex-aside-menu .nav-submenu a,
.sidebar a,
.sidebar-nav a {
    color: inherit;
}

/* Periodos: ativo verde, inativo branco */
.period-btn,
.cashflow-presets-premium button {
    border-radius: var(--nortex-radius) !important;
    background: #ffffff !important;
    border: 1px solid var(--nortex-border) !important;
    color: #334155 !important;
    font-weight: 500 !important;
    box-shadow: none !important;
}

.period-btn.active,
.period-btn:hover,
.cashflow-presets-premium button.active,
.cashflow-presets-premium button:hover {
    background: var(--nortex-green) !important;
    border-color: var(--nortex-green) !important;
    color: #ffffff !important;
}

/* Padronizacao visual quadrada nos containers principais */
.nx-kpi-card,
.summary-card,
.card,
.table-panel,
.pdv-sales-filter-panel,
.commercial-sales-filter-panel,
.clients-filter-panel,
.commercial-form .form-grid,
.commercial-add-row,
.commercial-totals,
.commercial-payment-card,
.modal-content,
.quick-client-modal,
#quickClientModal .modal-content {
    border-radius: var(--nortex-radius) !important;
}

/* Campos de formulario quadrados */
input,
select,
textarea,
.form-control,
.nx-input,
.table-search,
.filter-field input,
.filter-field select,
.commercial-form input,
.commercial-form select,
.commercial-form textarea,
.pdv-sales-filter-panel input,
.pdv-sales-filter-panel select,
.commercial-sales-filter-panel input,
.commercial-sales-filter-panel select {
    border-radius: var(--nortex-radius) !important;
    box-shadow: none !important;
}

/* Menos negrito nos textos operacionais */
.form-group label,
.filter-field span,
.nx-filter-label,
.commercial-form .form-group label,
.pdv-sales-filter-panel label,
.commercial-sales-filter-panel label,
.quick-client-form .form-group label {
    font-weight: 500 !important;
}

/* Indicacao visual de foco no novo padrao */
input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.nx-input:focus {
    border-color: var(--nortex-green) !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, .12) !important;
    outline: none !important;
}



/* =====================================================
   NORTEX UI v23 - Topo discreto estilo SaaS/Conta Azul
   Escopo: cabeçalho superior e remoção do título "Dashboard"
   sem alterar os KPIs e painéis do dashboard.
   ===================================================== */
body.nortex-asaas-sidebar-page .nortex-page-topbar {
    height: 76px !important;
    min-height: 76px !important;
    padding: 0 28px !important;
    display: grid !important;
    grid-template-columns: minmax(210px, 1fr) minmax(280px, 520px) auto !important;
    align-items: center !important;
    column-gap: 18px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: none !important;
}

body.nortex-asaas-sidebar-page .nortex-topbar-greeting {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
}

body.nortex-asaas-sidebar-page .nortex-topbar-greeting strong {
    color: #0f172a !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    white-space: nowrap !important;
}

body.nortex-asaas-sidebar-page .nortex-topbar-system-notice {
    min-height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    justify-self: center !important;
    max-width: 520px !important;
    padding: 0 14px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 4px !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
}

body.nortex-asaas-sidebar-page .nortex-topbar-system-notice[hidden] {
    display: none !important;
}

body.nortex-asaas-sidebar-page .nortex-topbar-system-notice i {
    color: #f59e0b !important;
    font-size: 14px !important;
}

body.nortex-asaas-sidebar-page .nortex-topbar-system-notice span {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.nortex-asaas-sidebar-page .nortex-topbar-system-notice button {
    border: 0 !important;
    background: transparent !important;
    color: #2563eb !important;
    cursor: pointer !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    padding: 0 !important;
}

body.nortex-asaas-sidebar-page .nortex-topbar-system-notice.tone-danger i,
body.nortex-asaas-sidebar-page .nortex-topbar-system-notice.tone-billing i {
    color: #ef4444 !important;
}

body.nortex-asaas-sidebar-page .nortex-topbar-system-notice.tone-success i {
    color: #16a34a !important;
}

body.nortex-asaas-sidebar-page .nortex-topbar-actions {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    min-width: 0 !important;
}

body.nortex-asaas-sidebar-page .nortex-period-button,
body.nortex-asaas-sidebar-page .top-icon-btn,
body.nortex-asaas-sidebar-page .nortex-user-chip {
    border-radius: 4px !important;
    border: 1px solid #dbe3ee !important;
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: none !important;
}

body.nortex-asaas-sidebar-page .nortex-period-button {
    height: 40px !important;
    padding: 0 13px !important;
    font-weight: 500 !important;
}

body.nortex-asaas-sidebar-page .top-icon-btn {
    position: relative !important;
    width: 40px !important;
    height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #0f172a !important;
}

body.nortex-asaas-sidebar-page .top-icon-btn span {
    position: absolute !important;
    top: -6px !important;
    right: -6px !important;
    min-width: 18px !important;
    height: 18px !important;
    padding: 0 5px !important;
    border-radius: 999px !important;
    background: #ef4444 !important;
    color: #ffffff !important;
    font-size: 11px !important;
    line-height: 18px !important;
    text-align: center !important;
    font-weight: 600 !important;
}

body.nortex-asaas-sidebar-page .top-icon-btn:not(.has-active-announcements) span {
    display: none !important;
}

body.nortex-asaas-sidebar-page .nortex-user-chip {
    height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 0 8px !important;
    cursor: default !important;
}

body.nortex-asaas-sidebar-page .nortex-user-chip span {
    width: 28px !important;
    height: 28px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: #e8eef7 !important;
    color: #0f172a !important;
    font-weight: 600 !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-head.nx-mvp-head-compact {
    justify-content: flex-end !important;
    margin: 0 0 18px !important;
    min-height: 40px !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-head.nx-mvp-head-compact .nx-mvp-head-actions {
    margin-left: auto !important;
}

body.nortex-asaas-sidebar-page .nx-mvp-head.nx-mvp-head-compact h1,
body.nortex-asaas-sidebar-page .nx-mvp-head.nx-mvp-head-compact p {
    display: none !important;
}

body.nortex-asaas-sidebar-page .system-announcements-container {
    display: none !important;
    margin: 0 auto 18px !important;
    max-width: 1520px !important;
}

body.nortex-asaas-sidebar-page .system-announcements-container.is-expanded {
    display: flex !important;
}

body.nortex-asaas-sidebar-page .system-announcement-card {
    border-radius: 4px !important;
}

@media (max-width: 1180px) {
    body.nortex-asaas-sidebar-page .nortex-page-topbar {
        grid-template-columns: 1fr auto !important;
        row-gap: 10px !important;
        height: auto !important;
        min-height: 76px !important;
        padding: 14px 18px !important;
    }

    body.nortex-asaas-sidebar-page .nortex-topbar-system-notice {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        justify-self: stretch !important;
        max-width: none !important;
    }
}

@media (max-width: 760px) {
    body.nortex-asaas-sidebar-page .nortex-page-topbar {
        grid-template-columns: 1fr !important;
    }

    body.nortex-asaas-sidebar-page .nortex-topbar-actions {
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
    }

    body.nortex-asaas-sidebar-page .nortex-period-button {
        width: 100% !important;
        justify-content: center !important;
    }

    body.nortex-asaas-sidebar-page .nx-mvp-head.nx-mvp-head-compact .nx-mvp-head-actions {
        width: 100% !important;
    }
}

/* =====================================================
   V25 - Visualização de cliente no padrão Nortex
   ===================================================== */
.nx-client-view-page {
    --nx-client-green: #28a745;
    --nx-client-blue: #2563eb;
    --nx-client-red: #dc2626;
    --nx-client-orange: #ea580c;
    --nx-client-bg: #f3f6fb;
    --nx-client-border: #dbe3ee;
    --nx-client-text: #0f172a;
    --nx-client-muted: #64748b;
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: var(--nx-client-text);
}

.nx-client-view-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 2px;
}

.nx-client-eyebrow {
    display: block;
    color: #009f7f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.nx-client-title-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nx-client-title-line h1 {
    margin: 0;
    color: #07162d;
    font-size: 23px;
    line-height: 1.2;
    font-weight: 700;
}

.nx-client-view-title p {
    margin: 5px 0 0;
    color: var(--nx-client-muted);
    font-size: 13px;
}

.nx-client-view-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.nx-client-view-page .nx-btn,
.nx-client-view-page .btn {
    min-height: 38px;
    border-radius: 4px !important;
    font-weight: 500;
}

.nx-client-view-page .nx-btn-success,
.nx-client-view-page .btn-success {
    background: var(--nx-client-green) !important;
    color: #ffffff !important;
    border: 1px solid var(--nx-client-green) !important;
}

.nx-client-view-page .nx-btn-secondary,
.nx-client-view-page .btn-secondary {
    background: #ffffff !important;
    color: #334155 !important;
    border: 1px solid var(--nx-client-border) !important;
}

.nx-client-finance-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 12px;
}

.nx-client-fin-card,
.nx-client-card {
    background: #ffffff;
    border: 1px solid var(--nx-client-border);
    border-radius: 4px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}

.nx-client-fin-card {
    padding: 14px 16px;
    min-height: 92px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    border-left: 4px solid var(--nx-client-blue);
}

.nx-client-fin-card span,
.nx-client-info-grid span {
    display: block;
    color: var(--nx-client-muted);
    font-size: 12px;
    font-weight: 500;
}

.nx-client-fin-card strong {
    display: block;
    color: #0f172a;
    font-size: 21px;
    line-height: 1.15;
    font-weight: 700;
}

.nx-client-fin-card small {
    color: var(--nx-client-muted);
    font-size: 12px;
}

.nx-client-fin-card.tone-danger {
    border-left-color: var(--nx-client-red);
}

.nx-client-fin-card.tone-danger strong,
.nx-client-money-grid strong.danger {
    color: var(--nx-client-red) !important;
}

.nx-client-fin-card.tone-success {
    border-left-color: var(--nx-client-green);
}

.nx-client-fin-card.tone-primary {
    border-left-color: var(--nx-client-blue);
}

.nx-client-fin-card.tone-neutral {
    border-left-color: #64748b;
}

.nx-client-card {
    padding: 18px;
}

.nx-client-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e5edf7;
}

.nx-client-section-head h3 {
    margin: 0;
    color: #07162d;
    font-size: 16px;
    font-weight: 700;
}

.nx-client-section-head p {
    margin: 3px 0 0;
    color: var(--nx-client-muted);
    font-size: 12.5px;
}

.nx-client-view-page .nx-section-icon {
    width: 34px;
    height: 34px;
    border-radius: 4px;
    background: #dcfce7;
    color: #009f7f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
}

.nx-client-info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 16px 20px;
}

.nx-client-info-grid strong {
    display: block;
    margin-top: 5px;
    color: #172033;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.35;
    word-break: break-word;
}

.nx-client-info-wide {
    grid-column: span 2;
}

.nx-client-map-link {
    margin-top: 16px;
}

.nx-client-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: #ffffff;
    border: 1px solid var(--nx-client-border);
    border-radius: 4px;
    padding: 6px;
}

.nx-client-tabs button {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: #475569;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.nx-client-tabs button.active {
    background: #eef3f8;
    border-color: #dbe3ee;
    color: #0f2f5f;
    font-weight: 700;
}

.nx-client-tab-panel {
    display: none;
}

.nx-client-tab-panel.active {
    display: block;
}

.client-active-chip,
.client-profile-status {
    border-radius: 4px !important;
    font-style: normal;
}

@media (max-width: 1180px) {
    .nx-client-view-header {
        flex-direction: column;
        align-items: stretch;
    }

    .nx-client-view-actions {
        justify-content: flex-start;
    }

    .nx-client-finance-cards,
    .nx-client-info-grid {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }
}

@media (max-width: 680px) {
    .nx-client-finance-cards,
    .nx-client-info-grid {
        grid-template-columns: 1fr;
    }

    .nx-client-info-wide {
        grid-column: auto;
    }

    .nx-client-view-actions .btn,
    .nx-client-tabs button {
        width: 100%;
        justify-content: center;
    }
}

/* =====================================================
   Módulo NF-e emitidas - Nortex
   ===================================================== */
.nfe-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(160px, 1fr));
    gap: 12px;
    margin: 14px 0;
}

.nfe-filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(130px, 1fr)) auto;
    gap: 12px;
    align-items: end;
}

.nfe-filter-form .form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.nfe-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    background: #eef3f8;
    color: #26384d;
}

.nfe-status-badge.authorized { background: #e8f6ed; color: #1f7a3a; }
.nfe-status-badge.rejected { background: #fff1f1; color: #b42318; }
.nfe-status-badge.cancelled { background: #f1f5f9; color: #64748b; }
.nfe-status-badge.draft,
.nfe-status-badge.validated,
.nfe-status-badge.signed,
.nfe-status-badge.created { background: #fff7e6; color: #925b00; }

.nfe-access-key {
    display: inline-block;
    max-width: 220px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    white-space: nowrap;
}

.nfe-actions-dropdown {
    position: relative;
    display: inline-block;
}

.nfe-actions-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 30;
    min-width: 230px;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 4px;
    box-shadow: 0 12px 28px rgba(15, 49, 92, 0.14);
    padding: 4px;
    text-align: left;
}

.nfe-actions-dropdown.is-open .nfe-actions-menu {
    display: block;
}

.nfe-actions-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: 0;
    background: #fff;
    color: #26384d;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.nfe-actions-menu button:hover:not(:disabled) {
    background: #eef3f8;
}

.nfe-actions-menu button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.nfe-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
}

.nfe-pagination > div {
    display: flex;
    gap: 8px;
}

@media (max-width: 1200px) {
    .nfe-summary-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
    .nfe-filter-form { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
}

@media (max-width: 720px) {
    .nfe-summary-grid,
    .nfe-filter-form { grid-template-columns: 1fr; }
    .nfe-filter-form .form-actions,
    .nfe-pagination { flex-direction: column; align-items: stretch; }
    .nfe-actions-menu { right: auto; left: 0; }
}


/* =====================================================
   NF-e - Modal de cancelamento
   ===================================================== */
.nfe-cancel-modal {
    color: #172033;
}

.nfe-cancel-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5edf5;
    margin-bottom: 16px;
}

.nfe-cancel-icon {
    width: 42px;
    height: 42px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff1f2;
    color: #b91c1c;
    border: 1px solid #fecdd3;
    flex: 0 0 auto;
}

.nfe-cancel-head h2 {
    margin: 0 0 4px;
    font-size: 20px;
    color: #0f315c;
}

.nfe-cancel-head p {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #64748b;
}

.nfe-cancel-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    margin-bottom: 16px;
}

.nfe-cancel-summary div {
    min-width: 0;
}

.nfe-cancel-summary .full {
    grid-column: 1 / -1;
}

.nfe-cancel-summary small {
    display: block;
    font-size: 11px;
    color: #64748b;
    margin-bottom: 3px;
}

.nfe-cancel-summary strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #172033;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nfe-cancel-form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 8px;
}

.nfe-cancel-form label span {
    color: #b91c1c;
}

.nfe-cancel-form textarea {
    width: 100%;
    min-height: 110px;
    resize: vertical;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 12px;
    font-size: 14px;
    color: #172033;
    outline: none;
    background: #fff;
}

.nfe-cancel-form textarea:focus {
    border-color: #0f315c;
    box-shadow: 0 0 0 3px rgba(15, 49, 92, 0.12);
}

.nfe-cancel-help {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 6px 0 14px;
    font-size: 12px;
    color: #64748b;
}

.nfe-cancel-help strong {
    color: #0f315c;
}

.nfe-cancel-warning {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-radius: 4px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    margin-bottom: 14px;
}

.nfe-cancel-warning p {
    margin: 2px 0 0;
    font-size: 13px;
    line-height: 1.4;
}

.nfe-cancel-check {
    display: flex !important;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 0;
    margin-bottom: 0 !important;
    color: #334155 !important;
}

.nfe-cancel-check input {
    margin-top: 3px;
}

.nfe-cancel-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid #e5edf5;
    margin-top: 12px;
}

@media (max-width: 768px) {
    .nfe-cancel-summary {
        grid-template-columns: 1fr;
    }

    .nfe-cancel-actions {
        flex-direction: column-reverse;
    }

    .nfe-cancel-actions .btn {
        width: 100%;
    }
}

/* =====================================================
   NF-e Emitidas - Layout premium Nortex v2
   ===================================================== */
.nfe-issued-header-modern {
    align-items: flex-start;
    margin-bottom: 18px;
}

.nfe-summary-grid-modern {
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 16px;
    margin: 18px 0 20px;
}

.nfe-kpi-card {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 104px;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 4px;
    padding: 18px 20px;
    box-shadow: 0 8px 22px rgba(15, 49, 92, 0.08);
}

.nfe-kpi-card span:not(.nfe-kpi-icon) {
    display: block;
    margin-bottom: 5px;
    color: #50607a;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
}

.nfe-kpi-card strong {
    display: block;
    color: #0f315c;
    font-size: 24px;
    line-height: 1.15;
    font-weight: 700;
}

.nfe-kpi-card small {
    display: block;
    margin-top: 6px;
    color: #50607a;
    font-size: 12px;
    font-weight: 500;
}

.nfe-kpi-icon {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #fff;
    font-size: 22px;
}

.nfe-kpi-blue .nfe-kpi-icon { background: #2563eb; }
.nfe-kpi-green .nfe-kpi-icon { background: #28a745; }
.nfe-kpi-orange .nfe-kpi-icon { background: #f97316; }
.nfe-kpi-red .nfe-kpi-icon { background: #dc2626; }
.nfe-kpi-purple .nfe-kpi-icon { background: #6d4aff; }
.nfe-kpi-green small { color: #168033; }
.nfe-kpi-orange small { color: #c45704; }
.nfe-kpi-red small { color: #b42318; }

.nfe-filter-card-modern {
    padding: 18px 20px 20px;
    border: 1px solid #dbe3ee;
    border-radius: 4px;
    box-shadow: 0 10px 26px rgba(15, 49, 92, 0.07);
    margin-bottom: 18px;
}

.nfe-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.nfe-filter-head h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #0f315c;
    font-size: 17px;
    font-weight: 700;
}

.nfe-filter-form-modern {
    grid-template-columns: 1.25fr 1fr 1fr 1fr;
    gap: 16px 20px;
    align-items: end;
}

.nfe-filter-form-modern .form-group label {
    display: block;
    margin-bottom: 7px;
    color: #0f315c;
    font-size: 12px;
    font-weight: 500;
}

.nfe-filter-form-modern input,
.nfe-filter-form-modern select {
    width: 100%;
    height: 42px;
    border: 1px solid #dbe3ee;
    border-radius: 4px;
    background: #fff;
    color: #172033;
    font-size: 14px;
    padding: 0 12px;
    outline: none;
}

.nfe-filter-form-modern input:focus,
.nfe-filter-form-modern select:focus {
    border-color: #0f315c;
    box-shadow: 0 0 0 3px rgba(15, 49, 92, 0.08);
}

.nfe-input-icon {
    position: relative;
}

.nfe-input-icon input {
    padding-right: 40px;
}

.nfe-input-icon i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #0f315c;
    font-size: 14px;
}

.nfe-filter-actions {
    grid-column: 3 / 5;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.nfe-filter-card-modern.is-collapsed .nfe-filter-form-modern .form-group,
.nfe-filter-card-modern.is-collapsed .nfe-filter-form-modern .nfe-filter-actions {
    display: none;
}

.nfe-table-card-modern {
    border: 1px solid #dbe3ee;
    border-radius: 4px;
    box-shadow: 0 10px 26px rgba(15, 49, 92, 0.07);
    overflow: visible;
}

.nfe-issued-table {
    border-collapse: separate;
    border-spacing: 0;
}

.nfe-issued-table thead th {
    background: #f8fafc;
    color: #0f315c;
    font-size: 12px;
    font-weight: 700;
    border-bottom: 1px solid #dbe3ee;
    padding: 14px 16px;
}

.nfe-issued-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #e8edf4;
    color: #172033;
    vertical-align: middle;
}

.nfe-issued-table tbody tr:hover td {
    background: #f8fbff;
}

.nfe-issued-table small {
    color: #50607a;
    font-size: 12px;
    font-weight: 500;
}

.nfe-col-number strong {
    color: #0f315c;
    font-weight: 700;
}

.nfe-env-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.nfe-env-badge.production { background: #e8f6ed; color: #1f7a3a; }
.nfe-env-badge.homolog { background: #eef3f8; color: #0f315c; }

.nfe-pagination-modern {
    padding: 14px 16px;
    border-top: 1px solid #e8edf4;
}

.nfe-pagination-modern > span {
    color: #26384d;
    font-size: 13px;
    font-weight: 500;
}

.nfe-pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nfe-per-page-select {
    height: 38px;
    min-width: 78px;
    border: 1px solid #dbe3ee;
    border-radius: 4px;
    background: #fff;
    padding: 0 10px;
}

.nfe-page-btn-modern {
    min-width: 38px;
    height: 38px;
    border: 1px solid #dbe3ee;
    border-radius: 4px;
    background: #fff;
    color: #0f315c;
    font-weight: 600;
    cursor: pointer;
}

.nfe-page-btn-modern:hover:not(:disabled),
.nfe-page-btn-modern.is-active {
    background: #0f315c;
    border-color: #0f315c;
    color: #fff;
}

.nfe-page-btn-modern:disabled {
    opacity: .45;
    cursor: not-allowed;
}

@media (max-width: 1380px) {
    .nfe-summary-grid-modern { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
    .nfe-filter-form-modern { grid-template-columns: repeat(3, minmax(190px, 1fr)); }
    .nfe-filter-actions { grid-column: 2 / 4; }
}

@media (max-width: 980px) {
    .nfe-summary-grid-modern { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
    .nfe-filter-form-modern { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
    .nfe-filter-actions { grid-column: 1 / 3; }
    .nfe-pagination-modern,
    .nfe-pagination-controls { flex-wrap: wrap; }
}

@media (max-width: 640px) {
    .nfe-summary-grid-modern,
    .nfe-filter-form-modern { grid-template-columns: 1fr; }
    .nfe-filter-head,
    .nfe-issued-header-modern,
    .nfe-pagination-modern { flex-direction: column; align-items: stretch; }
    .nfe-filter-actions { grid-column: auto; flex-direction: column; }
    .nfe-kpi-card { min-height: auto; }
}

/* NF-e: Carta de Correção Eletrônica */
.nfe-cce-icon {
    background: #eef6ff;
    color: #0f315c;
}

.nfe-cce-warning {
    background: #eef6ff;
    border-color: #bfdbfe;
    color: #0f315c;
}

.nfe-cce-form textarea {
    min-height: 140px;
}

/* =====================================================
   NF-e Emitidas - Layout enterprise compacto Nortex v3
   Baseado no padrão aprovado de Vendas/Orçamentos
   ===================================================== */
.nfe-issued-header-enterprise {
    margin-bottom: 16px;
    padding-top: 4px;
}
.nfe-module-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: #00a884;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
}
.nfe-issued-header-enterprise h1 {
    margin: 0 0 4px;
    color: #0b1f3a;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 700;
}
.nfe-issued-header-enterprise .module-subtitle {
    max-width: 760px;
    color: #50607a;
    font-size: 13px;
}
.nfe-header-actions-enterprise {
    align-items: center;
    gap: 8px;
}
.nfe-header-actions-enterprise .btn {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 4px;
    font-weight: 600;
}
.nfe-summary-grid-modern {
    grid-template-columns: repeat(5, minmax(160px, 1fr));
    gap: 12px;
    margin: 16px 0 18px;
}
.nfe-kpi-card {
    min-height: 96px;
    padding: 18px 16px;
    gap: 14px;
    box-shadow: none;
    border-color: #d7e1ee;
}
.nfe-kpi-card:hover {
    border-color: #c4d3e6;
    box-shadow: 0 8px 18px rgba(15, 49, 92, .06);
}
.nfe-kpi-icon {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
    font-size: 17px;
    border-radius: 4px;
}
.nfe-kpi-card span:not(.nfe-kpi-icon) {
    margin-bottom: 5px;
    color: #50607a;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}
.nfe-kpi-card strong {
    color: #0b1f3a;
    font-size: 20px;
    font-weight: 700;
}
.nfe-kpi-card small {
    margin-top: 5px;
    color: #50607a;
    font-size: 11px;
}
.nfe-filter-card-enterprise {
    padding: 16px;
    margin-bottom: 18px;
    box-shadow: none;
    border-color: #d7e1ee;
}
.nfe-filter-card-enterprise::before {
    content: '';
    display: block;
    height: 0;
}
.nfe-filter-form-enterprise {
    display: grid;
    grid-template-columns: minmax(280px, 2fr) minmax(130px, .7fr) minmax(150px, .8fr) minmax(130px, .7fr);
    gap: 14px 12px;
    align-items: end;
}
.nfe-filter-search-wide {
    grid-column: span 2;
}
.nfe-filter-form-enterprise .form-group label {
    margin-bottom: 6px;
    color: #0b1f3a;
    font-size: 11px;
    font-weight: 500;
}
.nfe-filter-form-enterprise input,
.nfe-filter-form-enterprise select {
    height: 38px;
    border-color: #d7e1ee;
    font-size: 13px;
    padding: 0 11px;
}
.nfe-filter-actions {
    grid-column: 3 / 5;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.nfe-filter-actions .btn {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 4px;
    font-weight: 600;
}
.nfe-table-card-modern {
    box-shadow: none;
    border-color: #d7e1ee;
}
.nfe-issued-table thead th {
    background: #fff;
    color: #0b1f3a;
    font-size: 11px;
    font-weight: 700;
    padding: 12px 14px;
    text-transform: none;
}
.nfe-issued-table tbody td {
    padding: 12px 14px;
    font-size: 13px;
}
.nfe-pagination-modern {
    padding: 12px 14px;
}
.nfe-pagination-controls .nfe-per-page-select,
.nfe-page-btn-modern {
    height: 34px;
    min-width: 34px;
}
@media (max-width: 1380px) {
    .nfe-summary-grid-modern { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
    .nfe-filter-form-enterprise { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
    .nfe-filter-search-wide { grid-column: span 2; }
    .nfe-filter-actions { grid-column: 2 / 4; }
}
@media (max-width: 980px) {
    .nfe-summary-grid-modern { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
    .nfe-filter-form-enterprise { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
    .nfe-filter-search-wide { grid-column: span 2; }
    .nfe-filter-actions { grid-column: 1 / 3; }
    .nfe-header-actions-enterprise { justify-content: flex-start; flex-wrap: wrap; }
}
@media (max-width: 640px) {
    .nfe-summary-grid-modern,
    .nfe-filter-form-enterprise { grid-template-columns: 1fr; }
    .nfe-filter-search-wide,
    .nfe-filter-actions { grid-column: auto; }
}

/* =====================================================
   NFC-e / Cupom Fiscal - Configuração Fiscal Etapa 2
   ===================================================== */
.nfce-config-card {
    border-radius: 4px;
}

.nfce-config-card .section-kicker {
    display: block;
    margin-bottom: 4px;
    color: #0f315c;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.nfce-config-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid #dbe3ee;
    border-left: 4px solid #28a745;
    border-radius: 4px;
    background: #f8fbff;
    color: #0f315c;
}

.nfce-config-alert i {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: #eaf8ee;
    color: #28a745;
}

.nfce-config-alert strong {
    display: block;
    margin-bottom: 2px;
    font-size: 14px;
}

.nfce-config-alert span {
    display: block;
    color: #4b5f7a;
    font-size: 13px;
}

.nfce-actions-inline .btn {
    width: 100%;
    min-height: 38px;
}

.nfce-status-result {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #dbe3ee;
    border-radius: 4px;
    background: #fff;
    color: #0f315c;
    line-height: 1.45;
}

.nfce-status-result i {
    margin-right: 6px;
    color: #28a745;
}

.fiscal-config-actions.compact {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #edf2f7;
}

/* =====================================================
   NFC-e / Cupom Fiscal - Etapa 1/2
   Reaproveita padrão NF-e, com ajustes mínimos seguros
   ===================================================== */
.nfce-issued-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px 0;
    padding: 14px 16px;
    border: 1px solid #f6d58a;
    background: #fff8e6;
    color: #0f315c;
    border-radius: 4px;
}
.nfce-issued-alert > i {
    color: #b7791f;
    font-size: 18px;
}
.nfce-issued-alert div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}
.nfce-issued-alert strong {
    font-weight: 600;
}
.nfce-issued-alert span {
    font-size: 12px;
    color: #455a75;
}
.nfce-issued-header .btn-primary {
    background: #28a745;
    color: #fff;
    border-radius: 4px;
}
.nfe-page-btn-modern[data-active="1"] {
    background: #0f315c;
    color: #fff;
    border-color: #0f315c;
}


/* =====================================================
   PDV - Modais padrão Nortex para substituir alert/confirm nativos
   ===================================================== */
#nortexPdvDialogRoot {
    position: relative;
    z-index: 99999;
}

.nortex-pdv-dialog {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 99999;
}

.nortex-pdv-dialog.show {
    display: flex;
}

.nortex-pdv-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(2px);
}

.nortex-pdv-dialog-card {
    position: relative;
    width: min(430px, calc(100vw - 40px));
    background: #ffffff;
    border: 1px solid #dbe3ee;
    border-radius: 4px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.25);
    padding: 24px;
    text-align: center;
    animation: nortexPdvDialogIn .14s ease-out;
}

@keyframes nortexPdvDialogIn {
    from { transform: translateY(8px) scale(.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.nortex-pdv-dialog-icon {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    color: #ffffff;
    background: #0f315c;
    font-size: 18px;
}

.nortex-pdv-dialog-success .nortex-pdv-dialog-icon { background: #28a745; }
.nortex-pdv-dialog-warning .nortex-pdv-dialog-icon { background: #f59e0b; }
.nortex-pdv-dialog-error .nortex-pdv-dialog-icon,
.nortex-pdv-dialog-danger .nortex-pdv-dialog-icon { background: #dc2626; }
.nortex-pdv-dialog-question .nortex-pdv-dialog-icon,
.nortex-pdv-dialog-info .nortex-pdv-dialog-icon,
.nortex-pdv-dialog-print .nortex-pdv-dialog-icon,
.nortex-pdv-dialog-receipt .nortex-pdv-dialog-icon { background: #0f315c; }

.nortex-pdv-dialog-card h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 700;
}

.nortex-pdv-dialog-card p {
    margin: 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
}

.nortex-pdv-dialog-details {
    margin-top: 14px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 4px;
    color: #0f315c;
    font-size: 13px;
    font-weight: 600;
    white-space: pre-line;
    text-align: left;
}

.nortex-pdv-dialog-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.nortex-pdv-dialog-btn {
    min-height: 38px;
    padding: 9px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all .16s ease;
}

.nortex-pdv-dialog-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.18);
}

.nortex-pdv-dialog-btn-primary,
.nortex-pdv-dialog-btn-success {
    background: #28a745;
    border: 1px solid #28a745;
    color: #ffffff;
}

.nortex-pdv-dialog-btn-primary:hover,
.nortex-pdv-dialog-btn-success:hover {
    background: #218838;
    border-color: #218838;
}

.nortex-pdv-dialog-btn-danger {
    background: #dc2626;
    border: 1px solid #dc2626;
    color: #ffffff;
}

.nortex-pdv-dialog-btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

.nortex-pdv-dialog-btn-secondary {
    background: #ffffff;
    border: 1px solid #dbe3ee;
    color: #0f315c;
}

.nortex-pdv-dialog-btn-secondary:hover {
    background: #eef3f8;
}

@media (max-width: 480px) {
    .nortex-pdv-dialog-card {
        padding: 20px;
    }

    .nortex-pdv-dialog-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .nortex-pdv-dialog-btn {
        width: 100%;
    }
}

/* V061 - Ajustes UX Motor Fiscal: regras internas ocultas e checkbox organizado */
.fiscal-operation-info .fiscal-internal-note {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid #dbe8f6;
    background: #f8fbff;
    color: #49627f;
    border-radius: 6px;
    padding: 9px 11px;
    font-size: 12px;
    line-height: 1.35;
}
.fiscal-operation-info .fiscal-internal-note i {
    color: #0f315c;
    flex: 0 0 auto;
}
.fiscal-sale-draft-form .fiscal-apply-nature-defaults {
    align-self: end;
    border: 1px solid #dbe8f6;
    background: #f8fbff;
    border-radius: 6px;
    padding: 10px 12px;
}
.fiscal-sale-draft-form .fiscal-checkbox-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 4px;
    cursor: pointer;
    color: #0f315c;
    font-weight: 600;
    line-height: 1.35;
}
.fiscal-sale-draft-form .fiscal-checkbox-line input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    flex: 0 0 16px;
    padding: 0;
    margin: 0;
    accent-color: #28a745;
}
.fiscal-sale-draft-form .fiscal-apply-nature-defaults .field-hint {
    display: block;
    margin-left: 26px;
    color: #64748b;
    font-size: 11px;
}
@media (max-width: 820px) {
    .fiscal-sale-draft-form .fiscal-apply-nature-defaults .field-hint { margin-left: 0; }
}

/* V065 - Modal padrão Nortex para confirmações críticas */
.nortex-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.42);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.nortex-confirm-dialog {
    width: min(460px, 100%);
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 6px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22);
    padding: 22px;
    display: flex;
    gap: 14px;
}
.nortex-confirm-icon {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    background: #eaf7ef;
    color: #28a745;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 18px;
}
.nortex-confirm-warning .nortex-confirm-icon { background: #fff7e6; color: #b7791f; }
.nortex-confirm-danger .nortex-confirm-icon { background: #fff0f0; color: #c53030; }
.nortex-confirm-content h3 {
    margin: 0 0 8px;
    color: #0f315c;
    font-size: 17px;
    font-weight: 700;
}
.nortex-confirm-content p {
    margin: 0;
    color: #334155;
    line-height: 1.45;
    font-size: 14px;
}
.nortex-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

/* V072 - Plano de recebimento: geração segura de cobrança vencida sem boleto */
.nx-overdue-generate {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.nx-boleto-date {
  width: 132px;
  min-height: 30px;
  padding: 4px 8px;
  font-size: 12px;
}

/* V074 - Nomenclatura profissional dos status financeiros */
.status-badge.status-completed {
    background: rgba(34,197,94,.12) !important;
    color: #14804A !important;
}
.status-badge.status-pending {
    background: rgba(245,158,11,.14) !important;
    color: #B45309 !important;
}
.status-badge.status-cancelled {
    background: rgba(239,68,68,.12) !important;
    color: #DC2626 !important;
}
.status-badge.status-info {
    background: rgba(59,130,246,.12) !important;
    color: #1D4ED8 !important;
}

/* =========================================================
   Neion/Nortex MVP - menu do usuário no rodapé lateral
   ========================================================= */
body.nortex-asaas-sidebar-page .nortex-aside-footer {
    position: relative !important;
}

body.nortex-asaas-sidebar-page .nortex-company-card {
    display: none !important;
}

body.nortex-asaas-sidebar-page .nortex-user-menu-wrap {
    position: relative !important;
}

body.nortex-asaas-sidebar-page .nortex-user-menu-button {
    width: 100% !important;
    cursor: pointer !important;
    text-align: left !important;
}

body.nortex-asaas-sidebar-page .nortex-user-meta {
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

body.nortex-asaas-sidebar-page .nortex-user-menu-chevron {
    margin-left: auto !important;
    color: #9fb7d3 !important;
    font-size: 12px !important;
}

body.nortex-asaas-sidebar-page .nortex-user-dropdown {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: calc(100% + 8px) !important;
    z-index: 80 !important;
    padding: 8px !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    border-radius: 12px !important;
    background: #0a1d33 !important;
    box-shadow: 0 16px 36px rgba(0,0,0,.25) !important;
}

body.nortex-asaas-sidebar-page .nortex-user-dropdown[hidden] {
    display: none !important;
}

body.nortex-asaas-sidebar-page .nortex-user-dropdown button {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 38px !important;
    padding: 0 10px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #e5efff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

body.nortex-asaas-sidebar-page .nortex-user-dropdown button:hover {
    background: rgba(255,255,255,.08) !important;
}

.nortex-profile-modal[hidden] {
    display: none !important;
}

.nortex-profile-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    background: rgba(15, 23, 42, .56) !important;
}

.nortex-profile-modal__panel {
    position: relative !important;
    width: min(520px, 100%) !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: 0 26px 70px rgba(15,23,42,.28) !important;
    padding: 26px !important;
}

.nortex-profile-modal__panel h2 {
    margin: 0 0 6px !important;
    color: #102b4a !important;
    font-size: 22px !important;
}

.nortex-profile-modal__panel p {
    margin: 0 0 18px !important;
    color: #64748b !important;
}

.nortex-profile-modal__close {
    position: absolute !important;
    top: 14px !important;
    right: 16px !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 28px !important;
    line-height: 1 !important;
    color: #64748b !important;
    cursor: pointer !important;
}

.nortex-profile-form {
    display: grid !important;
    gap: 12px !important;
}

.nortex-profile-form label {
    display: grid !important;
    gap: 6px !important;
    color: #334155 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

.nortex-profile-form input {
    width: 100% !important;
    min-height: 42px !important;
    border: 1px solid #dbe3ee !important;
    border-radius: 6px !important;
    padding: 0 12px !important;
    color: #0f172a !important;
    background: #fff !important;
}

.nortex-profile-modal__actions {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    margin-top: 10px !important;
}

.nortex-profile-modal__actions .btn-primary,
.nortex-profile-modal__actions .btn-secondary {
    min-height: 40px !important;
    border-radius: 4px !important;
    padding: 0 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
}

.nortex-profile-modal__actions .btn-primary {
    border: 1px solid #28a745 !important;
    background: #28a745 !important;
    color: #fff !important;
}

.nortex-profile-modal__actions .btn-secondary {
    border: 1px solid #dbe3ee !important;
    background: #fff !important;
    color: #334155 !important;
}

/* =====================================================
   Neion v214 - Layout profissional do cadastro de usuário
   ===================================================== */
.nx-user-form-page-v214 .nx-user-form-shell{max-width:1100px;padding:0;overflow:hidden;background:#fff;border:1px solid var(--nx-border,#E6EAF0);border-radius:14px;box-shadow:0 12px 28px rgba(15,23,42,.06)}
.nx-user-form-modern{display:grid;grid-template-columns:280px 1fr;min-height:520px}
.nx-user-profile-summary{padding:28px 24px;background:linear-gradient(180deg,#0f315c 0%,#102f56 100%);color:#fff;display:flex;flex-direction:column;gap:14px;position:relative;overflow:hidden}
.nx-user-profile-summary:after{content:"";position:absolute;right:-60px;bottom:-70px;width:190px;height:190px;border-radius:999px;background:rgba(40,167,69,.18)}
.nx-user-avatar-preview{width:76px;height:76px;border-radius:18px;background:#28a745;color:#fff;display:flex;align-items:center;justify-content:center;font-size:30px;font-weight:800;box-shadow:0 12px 24px rgba(0,0,0,.18);position:relative;z-index:1}
.nx-user-profile-summary h2{font-size:22px;line-height:1.2;margin:8px 0 0;color:#fff;position:relative;z-index:1}
.nx-user-profile-summary p{margin:0;color:rgba(255,255,255,.78);font-size:13px;position:relative;z-index:1}
.nx-user-summary-tags{display:flex;flex-direction:column;gap:9px;margin-top:8px;position:relative;z-index:1}
.nx-user-summary-tags span{display:flex;align-items:center;gap:8px;padding:9px 10px;border:1px solid rgba(255,255,255,.12);border-radius:10px;background:rgba(255,255,255,.06);font-size:12px;color:rgba(255,255,255,.88)}
.nx-user-summary-note{margin-top:auto;display:flex;gap:10px;padding:12px;border-radius:12px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);color:rgba(255,255,255,.82);font-size:12px;line-height:1.45;position:relative;z-index:1}
.nx-user-summary-note i{color:#8ed341;margin-top:2px}
.nx-user-form-content{padding:26px 28px;background:#fff}
.nx-user-form-section{border:1px solid var(--nx-border,#E6EAF0);border-radius:14px;padding:20px;margin-bottom:18px;background:#fff}
.nx-user-form-section .nx-form-section-head{margin-bottom:16px;padding-bottom:14px;border-bottom:1px solid var(--nx-border,#E6EAF0)}
.nx-user-form-section .nx-form-section-icon{width:40px;height:40px;border-radius:12px;background:#eaf8ef;color:#28a745;display:inline-flex;align-items:center;justify-content:center}
.nx-user-form-section h2{font-size:17px;margin:0;color:#0f172a;font-weight:700}
.nx-user-form-section p{margin:3px 0 0;color:#64748b;font-size:13px}
.nx-user-form-grid{max-width:none!important;gap:16px 18px}
.nx-user-form-grid .form-group label{font-weight:600;color:#0f172a;font-size:12px;margin-bottom:7px}
.nx-user-form-grid .form-control{height:42px;border-radius:8px;border:1px solid #dbe3ee;background:#fff;box-shadow:none;transition:border-color .15s ease,box-shadow .15s ease}
.nx-user-form-grid .form-control:focus{border-color:#28a745;box-shadow:0 0 0 3px rgba(40,167,69,.12);outline:none}
.nx-user-form-grid input:-webkit-autofill{box-shadow:0 0 0 30px #fff inset!important;-webkit-text-fill-color:#0f172a!important}
.nx-field-help{display:block;margin-top:7px;color:#64748b;font-size:12px;line-height:1.35}
.nx-user-form-footer{display:flex;justify-content:flex-end;gap:10px;padding-top:4px}
.nx-user-form-footer .nx-btn{min-width:132px;height:42px;border-radius:8px}
@media(max-width:980px){.nx-user-form-modern{grid-template-columns:1fr}.nx-user-profile-summary{min-height:auto}.nx-user-summary-note{margin-top:10px}.nx-user-form-content{padding:20px}.nx-user-form-page-v214 .nx-user-form-shell{max-width:100%}}
@media(max-width:640px){.nx-user-form-grid{grid-template-columns:1fr!important}.nx-user-form-grid .span-2{grid-column:auto!important}.nx-user-form-footer{flex-direction:column-reverse}.nx-user-form-footer .nx-btn{width:100%}}

/* =====================================================
   Neion v215 - Cadastro de usuário sem coluna lateral
   ===================================================== */
.nx-user-form-page-v214 .nx-user-form-shell{
    max-width: 1040px !important;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
.nx-user-form-modern{
    display: block !important;
    min-height: auto !important;
}
.nx-user-form-modern .nx-user-profile-summary{
    display: none !important;
}
.nx-user-form-content{
    padding: 0 !important;
    background: transparent !important;
}
.nx-user-form-section{
    margin-bottom: 18px !important;
    padding: 22px 24px !important;
    border: 1px solid var(--nx-border,#E6EAF0) !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 10px 26px rgba(15,23,42,.04) !important;
}
.nx-user-form-section .nx-form-section-head{
    margin-bottom: 18px !important;
    padding-bottom: 16px !important;
    border-bottom: 1px solid var(--nx-border,#E6EAF0) !important;
}
.nx-user-form-grid{
    max-width: none !important;
}
.nx-user-form-footer{
    display: flex !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    padding: 4px 0 0 !important;
}
.nx-user-form-footer .nx-btn{
    min-width: 132px !important;
    height: 42px !important;
    border-radius: 8px !important;
}
@media(max-width:640px){
    .nx-user-form-section{padding:18px !important;border-radius:14px !important;}
    .nx-user-form-footer{flex-direction:column-reverse !important;}
    .nx-user-form-footer .nx-btn{width:100% !important;}
}

/* =====================================================
   NEION v215 - Matriz de permissões profissional
   ===================================================== */
.nx-users-permissions-page-v215 .nx-acl-modern-panel{
    padding:20px;
    border-radius:18px;
    overflow:visible;
}
.nx-users-permissions-page-v215 .nx-permission-tabs{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin:14px 0 20px;
}
.nx-users-permissions-page-v215 .nx-permission-tabs .acl-tab{
    height:38px;
    padding:0 14px;
    border-radius:999px;
    font-size:13px;
}
.nx-acl-profile-card-modern{
    display:none;
    border:1px solid var(--nx-border,#E6EAF0);
    border-radius:18px;
    background:#fff;
    box-shadow:none;
    padding:0;
    overflow:hidden;
}
.nx-acl-profile-card-modern.active{display:block;}
.nx-acl-profile-header{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto auto;
    align-items:center;
    gap:16px;
    padding:18px 20px;
    border-bottom:1px solid var(--nx-border,#E6EAF0);
    background:linear-gradient(180deg,#fff,#F8FAFC);
}
.nx-acl-profile-label{
    display:inline-flex;
    align-items:center;
    height:22px;
    padding:0 8px;
    border-radius:999px;
    background:var(--nx-accent-soft,#E8FFF9);
    color:var(--nx-accent,#00BFA5);
    font-size:11px;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:.04em;
    margin-bottom:6px;
}
.nx-acl-profile-header h3{
    margin:0;
    color:var(--nx-text,#0F172A);
    font-size:20px;
    font-weight:600 !important;
}
.nx-acl-profile-header p{
    margin:5px 0 0;
    color:var(--nx-muted,#64748B);
    font-size:13px;
}
.nx-acl-profile-summary{
    min-width:160px;
    padding:12px 14px;
    border:1px solid var(--nx-border,#E6EAF0);
    border-radius:14px;
    background:#fff;
    text-align:right;
}
.nx-acl-profile-summary strong{
    display:block;
    color:var(--nx-accent,#00BFA5);
    font-size:22px;
    line-height:1;
}
.nx-acl-profile-summary span{
    display:block;
    margin-top:4px;
    color:var(--nx-muted,#64748B);
    font-size:12px;
}
.nx-acl-quick-actions{
    display:flex;
    justify-content:flex-end;
    gap:8px;
    padding:14px 20px;
    border-bottom:1px solid var(--nx-border,#E6EAF0);
    background:#fff;
}
.nx-acl-accordion{
    border-bottom:1px solid var(--nx-border,#E6EAF0);
}
.nx-acl-accordion:last-child{border-bottom:0;}
.nx-acl-accordion-head{
    width:100%;
    border:0;
    background:#fff;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:16px 20px;
    color:var(--nx-text,#0F172A);
    text-align:left;
}
.nx-acl-accordion-head:hover{background:#F8FAFC;}
.nx-acl-accordion-head strong{
    display:block;
    margin-bottom:3px;
    font-size:15px;
    font-weight:600;
}
.nx-acl-accordion-head small{
    display:block;
    color:var(--nx-muted,#64748B);
    font-size:12px;
}
.nx-acl-accordion-head i{
    color:var(--nx-muted,#64748B);
    transition:transform .18s ease;
}
.nx-acl-accordion.open .nx-acl-accordion-head i{transform:rotate(180deg);}
.nx-acl-accordion-body{display:none;padding:0 20px 18px;background:#fff;}
.nx-acl-accordion.open .nx-acl-accordion-body{display:block;}
.nx-acl-group-toolbar{
    display:flex;
    justify-content:flex-end;
    gap:8px;
    margin-bottom:12px;
}
.nx-acl-table-wrap{
    overflow-x:auto;
    border:1px solid var(--nx-border,#E6EAF0);
    border-radius:14px;
    background:#fff;
}
.nx-acl-table{
    width:100%;
    min-width:980px;
    border-collapse:separate;
    border-spacing:0;
}
.nx-acl-table th{
    height:42px;
    padding:10px 12px;
    background:#F8FAFC;
    border-bottom:1px solid var(--nx-border,#E6EAF0);
    color:#475569;
    font-size:12px;
    font-weight:600;
    text-align:center;
    white-space:nowrap;
}
.nx-acl-table th:first-child{text-align:left;width:250px;}
.nx-acl-table td{
    padding:12px;
    border-bottom:1px solid var(--nx-border,#E6EAF0);
    vertical-align:middle;
}
.nx-acl-table tbody tr:last-child td{border-bottom:0;}
.nx-acl-table tbody tr:hover td{background:#FAFBFC;}
.nx-acl-module-name strong{
    display:block;
    color:var(--nx-text,#0F172A);
    font-size:13px;
    font-weight:600 !important;
}
.nx-acl-module-name small{
    display:block;
    margin-top:3px;
    color:var(--nx-muted,#64748B);
    font-size:11px;
    line-height:1.35;
}
.nx-acl-check-cell{text-align:center;}
.nx-acl-check-cell label{
    display:inline-flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:4px;
    min-width:64px;
    color:#334155;
    font-size:11px;
    line-height:1.1;
    cursor:pointer;
    font-weight:400 !important;
}
.nx-acl-check-cell input{
    width:15px;
    height:15px;
    accent-color:var(--nx-accent,#00BFA5);
}
@media(max-width:1100px){
    .nx-acl-profile-header{grid-template-columns:1fr;align-items:flex-start;}
    .nx-acl-profile-summary{text-align:left;}
    .nx-acl-quick-actions,.nx-acl-group-toolbar{justify-content:flex-start;flex-wrap:wrap;}
}

/* =====================================================
   Neion/Nortex v218 - Responsividade mobile segura
   - Mantém desktop intacto.
   - No celular, transforma o menu lateral em off-canvas.
   ===================================================== */
.nortex-mobile-overlay {
    display: none;
}

@media (max-width: 900px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
    }

    body.nortex-asaas-sidebar-page .nortex-single-sidebar-layout {
        display: block !important;
        grid-template-columns: 1fr !important;
        min-height: 100vh !important;
        background: #f3f6fb !important;
    }

    body.nortex-asaas-sidebar-page .nortex-aside-menu {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 286px !important;
        max-width: 86vw !important;
        height: 100dvh !important;
        min-height: 100dvh !important;
        transform: translateX(-105%) !important;
        transition: transform .24s ease !important;
        z-index: 10020 !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        background: #102b4a !important;
        box-shadow: 18px 0 38px rgba(15, 23, 42, .28) !important;
    }

    body.nortex-asaas-sidebar-page.mobile-menu-open .nortex-aside-menu {
        transform: translateX(0) !important;
    }

    body.nortex-asaas-sidebar-page .nortex-aside-menu::after {
        display: none !important;
        content: none !important;
    }

    body.nortex-asaas-sidebar-page .nortex-aside-brand {
        height: 72px !important;
        flex: 0 0 auto !important;
        padding: 0 18px !important;
    }

    body.nortex-asaas-sidebar-page .nortex-aside-logo {
        max-width: 154px !important;
        height: 42px !important;
    }

    body.nortex-asaas-sidebar-page .nortex-sidebar-nav {
        display: block !important;
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 12px !important;
        background: #102b4a !important;
    }

    body.nortex-asaas-sidebar-page .nortex-aside-footer {
        flex: 0 0 auto !important;
        margin-top: 0 !important;
        padding: 12px 14px 14px !important;
        background: #102b4a !important;
    }

    body.nortex-asaas-sidebar-page .nortex-user-card div:not(.nortex-user-avatar),
    body.nortex-asaas-sidebar-page .nortex-user-card .nortex-user-meta {
        display: block !important;
    }

    body.nortex-asaas-sidebar-page .nortex-user-card strong,
    body.nortex-asaas-sidebar-page .nortex-user-card small {
        max-width: 168px !important;
    }

    body.nortex-asaas-sidebar-page .nortex-main-content,
    body.nortex-asaas-sidebar-page .main-content {
        width: 100% !important;
        margin: 0 !important;
        min-width: 0 !important;
        padding: 0 !important;
    }

    body.nortex-asaas-sidebar-page .nortex-page-topbar {
        position: sticky !important;
        top: 0 !important;
        z-index: 900 !important;
        min-height: auto !important;
        height: auto !important;
        padding: 12px 14px !important;
        display: grid !important;
        grid-template-columns: auto 1fr !important;
        gap: 10px 12px !important;
        align-items: center !important;
        background: rgba(255, 255, 255, .96) !important;
        border-bottom: 1px solid #dfe7f1 !important;
    }

    body.nortex-asaas-sidebar-page .nortex-topbar-greeting {
        display: contents !important;
    }

    body.nortex-asaas-sidebar-page .toggle-sidebar {
        display: inline-flex !important;
        pointer-events: auto !important;
        width: 44px !important;
        height: 44px !important;
        border-radius: 10px !important;
        border: 1px solid #d8e0ec !important;
        background: #ffffff !important;
        color: #0f172a !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 18px !important;
        grid-column: 1 !important;
        grid-row: 1 !important;
    }

    body.nortex-asaas-sidebar-page #nortexTopGreeting {
        grid-column: 2 !important;
        grid-row: 1 !important;
        font-size: 15px !important;
        line-height: 1.2 !important;
        min-width: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    body.nortex-asaas-sidebar-page .nortex-topbar-system-notice {
        grid-column: 1 / -1 !important;
        width: 100% !important;
    }

    body.nortex-asaas-sidebar-page .nortex-topbar-actions,
    body.nortex-asaas-sidebar-page .header-right {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr 44px 44px 58px !important;
        gap: 8px !important;
        align-items: center !important;
        margin: 0 !important;
    }

    body.nortex-asaas-sidebar-page .nortex-period-button {
        width: 100% !important;
        justify-content: center !important;
        height: 44px !important;
        padding: 0 10px !important;
        font-size: 14px !important;
    }

    body.nortex-asaas-sidebar-page .top-icon-btn,
    body.nortex-asaas-sidebar-page .nortex-user-chip {
        width: 44px !important;
        min-width: 44px !important;
        height: 44px !important;
        border-radius: 10px !important;
    }

    body.nortex-asaas-sidebar-page .nortex-user-chip {
        width: 58px !important;
    }

    body.nortex-asaas-sidebar-page .content-area {
        width: 100% !important;
        padding: 14px !important;
        background: #f3f6fb !important;
    }

    .nortex-mobile-overlay {
        position: fixed;
        inset: 0;
        z-index: 10010;
        background: rgba(15, 23, 42, .48);
        opacity: 0;
        visibility: hidden;
        transition: opacity .22s ease, visibility .22s ease;
        display: block;
    }

    body.mobile-menu-open .nortex-mobile-overlay {
        opacity: 1;
        visibility: visible;
    }

    body.mobile-menu-open {
        overflow: hidden !important;
    }

    /* Dashboard e componentes principais */
    .nx-mvp-dashboard,
    .nx-enterprise-page,
    .nx-users-page,
    .page-shell,
    .module-page,
    .content-page {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .nx-mvp-head,
    .nx-mvp-head-actions,
    .nx-page-header,
    .nx-page-actions,
    .section-title-row,
    .page-header,
    .form-actions,
    .receive-premium-actions {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .nx-mvp-head h1,
    .nx-page-header h1,
    .page-header h1 {
        font-size: 22px !important;
        line-height: 1.15 !important;
    }

    .nx-mvp-head-actions .btn,
    .nx-mvp-head-actions button,
    .nx-page-actions .btn,
    .form-actions .btn,
    .receive-premium-actions .btn,
    .nx-mvp-date-filter,
    .nx-mvp-refresh {
        width: 100% !important;
        justify-content: center !important;
    }

    .nx-mvp-kpis,
    .nx-home-kpis,
    .nx-kpi-grid,
    .nx-users-kpi-grid,
    .stats-grid,
    .dashboard-stats,
    .summary-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .nx-mvp-kpi,
    .nx-home-kpi,
    .nx-kpi-card,
    .stat-card {
        min-height: auto !important;
        padding: 16px !important;
    }

    .nx-mvp-grid,
    .nx-mvp-grid-main,
    .nx-mvp-grid-financial,
    .nx-mvp-grid-bottom,
    .nx-home-grid,
    .nx-home-grid-main,
    .nx-home-grid-bottom,
    .form-grid,
    .form-grid.two-cols,
    .form-row,
    .nx-form-grid,
    .receive-info-grid,
    .receive-form-grid,
    .users-permission-grid,
    .nx-users-layout {
        grid-template-columns: 1fr !important;
    }

    .nx-mvp-shortcuts,
    .quick-actions,
    .actions-row {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .nx-mvp-shortcut,
    .quick-actions .btn,
    .actions-row .btn {
        width: 100% !important;
        flex: 1 1 auto !important;
    }

    .card,
    .nx-mvp-panel,
    .nx-home-panel,
    .nx-section-card,
    .nx-card,
    .form-card {
        border-radius: 10px !important;
        padding: 14px !important;
        overflow: hidden !important;
    }

    input,
    select,
    textarea,
    button {
        max-width: 100% !important;
    }

    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea {
        min-height: 42px !important;
        font-size: 16px !important;
    }

    .table-responsive,
    .nx-table-wrap,
    .table-container,
    .data-table-wrap,
    .card:has(table),
    .nx-card:has(table),
    .nx-section-card:has(table) {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    table {
        min-width: 760px;
    }

    .modal,
    .nortex-profile-modal {
        padding: 12px !important;
    }

    .modal-content,
    .nortex-profile-modal__panel {
        width: 96vw !important;
        max-width: 96vw !important;
        max-height: 90dvh !important;
        overflow-y: auto !important;
        border-radius: 12px !important;
    }

    .nortex-profile-modal__actions {
        flex-direction: column-reverse !important;
        gap: 8px !important;
    }

    .nortex-profile-modal__actions button {
        width: 100% !important;
    }
}

@media (min-width: 901px) {
    body.nortex-asaas-sidebar-page .nortex-aside-menu {
        transform: none !important;
    }
}

/* =====================================================
   Neion/Nortex v219 - Correção dos títulos do menu mobile
   - Garante que as regras do sidebar recolhido no desktop não escondam
     os textos quando o menu off-canvas estiver aberto no celular.
   - Mantém o desktop preservado.
   ===================================================== */
@media (max-width: 900px) {
    body.nortex-asaas-sidebar-page .nortex-aside-menu {
        width: 320px !important;
        max-width: 92vw !important;
        background: #102b4a !important;
    }

    body.nortex-asaas-sidebar-page .nortex-sidebar-nav {
        padding: 10px 14px 16px !important;
    }

    body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-section-label {
        display: block !important;
        padding: 14px 10px 6px !important;
        color: rgba(226, 232, 240, .68) !important;
        font-size: 11px !important;
        font-weight: 800 !important;
        letter-spacing: .08em !important;
        text-transform: uppercase !important;
        width: auto !important;
        height: auto !important;
        line-height: 1.2 !important;
        overflow: visible !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    body.nortex-asaas-sidebar-page .nav-item-single > a,
    body.nortex-asaas-sidebar-page .nav-group-toggle,
    body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu a {
        justify-content: flex-start !important;
        gap: 12px !important;
        min-height: 46px !important;
        padding: 0 13px !important;
        border-radius: 10px !important;
        color: #eaf2ff !important;
        background: transparent !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        overflow: visible !important;
    }

    body.nortex-asaas-sidebar-page .nav-item-single > a span,
    body.nortex-asaas-sidebar-page .nav-group-toggle span,
    body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu a span {
        display: inline-flex !important;
        align-items: center !important;
        gap: 12px !important;
        width: auto !important;
        max-width: 210px !important;
        min-width: 0 !important;
        height: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        color: inherit !important;
        line-height: 1.2 !important;
    }

    body.nortex-asaas-sidebar-page .nav-item-single > a i,
    body.nortex-asaas-sidebar-page .nav-group-toggle i:first-child,
    body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu a i {
        width: 22px !important;
        min-width: 22px !important;
        max-width: 22px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #dbeafe !important;
        font-size: 16px !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    body.nortex-asaas-sidebar-page .nav-chevron {
        display: inline-flex !important;
        margin-left: auto !important;
        color: rgba(226, 232, 240, .75) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    body.nortex-asaas-sidebar-page .nav-item-single > a:hover,
    body.nortex-asaas-sidebar-page .nav-group-toggle:hover,
    body.nortex-asaas-sidebar-page .nav-item-single > a.active,
    body.nortex-asaas-sidebar-page .nav-group.is-open > .nav-group-toggle,
    body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu a.active {
        background: rgba(37, 99, 235, .42) !important;
        color: #ffffff !important;
    }

    body.nortex-asaas-sidebar-page .nav-item-single > a.active i,
    body.nortex-asaas-sidebar-page .nav-group.is-open > .nav-group-toggle i:first-child,
    body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu a.active i {
        color: #ffffff !important;
    }

    body.nortex-asaas-sidebar-page .nav-submenu {
        margin: 4px 0 8px 34px !important;
        padding: 4px 0 4px 10px !important;
        border-left: 1px solid rgba(226, 232, 240, .22) !important;
        background: transparent !important;
    }

    body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu a {
        min-height: 40px !important;
        padding: 0 10px !important;
        font-size: 13px !important;
        color: rgba(234, 242, 255, .92) !important;
        font-weight: 600 !important;
    }

    body.nortex-asaas-sidebar-page .nortex-user-card {
        min-height: 64px !important;
        padding: 10px 12px !important;
        border-radius: 13px !important;
        background: rgba(8, 26, 48, .62) !important;
        border-color: rgba(226, 232, 240, .12) !important;
        color: #ffffff !important;
    }

    body.nortex-asaas-sidebar-page .nortex-user-card div:not(.nortex-user-avatar),
    body.nortex-asaas-sidebar-page .nortex-user-card .nortex-user-meta {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        width: auto !important;
        height: auto !important;
        overflow: hidden !important;
    }

    body.nortex-asaas-sidebar-page .nortex-user-card strong {
        color: #ffffff !important;
        font-size: 14px !important;
        max-width: 180px !important;
    }

    body.nortex-asaas-sidebar-page .nortex-user-card small {
        color: rgba(226, 232, 240, .82) !important;
        font-size: 12px !important;
        max-width: 180px !important;
    }
}

@media (max-width: 420px) {
    body.nortex-asaas-sidebar-page .nortex-aside-menu {
        width: 88vw !important;
        max-width: 88vw !important;
    }

    body.nortex-asaas-sidebar-page .nav-item-single > a span,
    body.nortex-asaas-sidebar-page .nav-group-toggle span,
    body.nortex-asaas-sidebar-page .nortex-sidebar-nav .nav-submenu a span {
        max-width: 180px !important;
    }
}

/* =====================================================
   NEION v220 - Indicador de força e critérios de senha
   ===================================================== */
.nx-password-strength {
    margin-top: 8px;
    margin-bottom: 10px;
}

.nx-password-bars {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin: 4px 0 6px;
}

.nx-password-bars span {
    display: block;
    height: 5px;
    border-radius: 999px;
    background: #e5e7eb;
    transition: background .18s ease, transform .18s ease;
}

.nx-password-bars span.active {
    transform: translateY(-1px);
}

.nx-password-bars-weak span.active { background: #ef4444; }
.nx-password-bars-medium span.active { background: #f59e0b; }
.nx-password-bars-strong span.active { background: #22c55e; }
.nx-password-bars-very-strong span.active { background: #10b981; }

.nx-password-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 4px;
}

.nx-password-label-weak { color: #dc2626; }
.nx-password-label-medium { color: #d97706; }
.nx-password-label-strong,
.nx-password-label-very-strong { color: #059669; }

.nx-password-rules {
    list-style: none;
    padding: 0;
    margin: 2px 0 0;
    display: grid;
    gap: 3px;
}

.nx-password-rules li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 1.35;
    color: #64748b;
}

.nx-password-rules li i {
    font-size: 12px;
    color: #cbd5e1;
}

.nx-password-rules li.ok {
    color: #059669;
}

.nx-password-rules li.ok i {
    color: #10b981;
}

.nortex-profile-form .nx-password-strength,
.nx-user-form-modern .nx-password-strength {
    width: 100%;
}

@media (max-width: 768px) {
    .nx-password-rules li {
        font-size: 12px;
    }
}


/* v221 - Usuários: botão de reativação */
.action-icon-btn.success,
.btn-icon.success {
    color: #15803d;
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.action-icon-btn.success:hover,
.btn-icon.success:hover {
    color: #ffffff;
    border-color: #16a34a;
    background: #16a34a;
}

/* =====================================================
   Neion v222 - Modal de confirmação padrão do sistema
   ===================================================== */
body.neion-confirm-open {
    overflow: hidden !important;
}

.neion-confirm-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10050 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    background: rgba(15, 23, 42, .56) !important;
    backdrop-filter: blur(2px) !important;
}

.neion-confirm-modal__panel {
    position: relative !important;
    width: min(460px, 100%) !important;
    border: 1px solid #e5eaf2 !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .26) !important;
    padding: 24px !important;
    animation: neionConfirmIn .16s ease-out !important;
}

@keyframes neionConfirmIn {
    from { transform: translateY(8px) scale(.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.neion-confirm-modal__close {
    position: absolute !important;
    top: 12px !important;
    right: 14px !important;
    width: 32px !important;
    height: 32px !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: #64748b !important;
    font-size: 24px !important;
    line-height: 1 !important;
    cursor: pointer !important;
}

.neion-confirm-modal__close:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

.neion-confirm-modal__icon {
    width: 46px !important;
    height: 46px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 16px !important;
    font-size: 18px !important;
}

.neion-confirm-modal--danger .neion-confirm-modal__icon {
    background: #fee2e2 !important;
    color: #b91c1c !important;
}

.neion-confirm-modal--success .neion-confirm-modal__icon {
    background: #dcfce7 !important;
    color: #15803d !important;
}

.neion-confirm-modal__content h2 {
    margin: 0 0 8px !important;
    color: #102b4a !important;
    font-size: 21px !important;
    font-weight: 800 !important;
    letter-spacing: -.02em !important;
}

.neion-confirm-modal__content p {
    margin: 0 !important;
    color: #64748b !important;
    font-size: 14px !important;
    line-height: 1.55 !important;
}

.neion-confirm-modal__user {
    display: inline-flex !important;
    margin: 0 0 10px !important;
    padding: 5px 9px !important;
    border-radius: 999px !important;
    background: #f1f5f9 !important;
    color: #334155 !important;
    font-weight: 700 !important;
    font-size: 12px !important;
}

.neion-confirm-modal__actions {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    margin-top: 22px !important;
}

.neion-confirm-modal__cancel,
.neion-confirm-modal__confirm {
    min-height: 40px !important;
    border-radius: 4px !important;
    padding: 0 16px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
}

.neion-confirm-modal__cancel {
    border: 1px solid #dbe3ee !important;
    background: #fff !important;
    color: #334155 !important;
}

.neion-confirm-modal__cancel:hover {
    background: #f8fafc !important;
}

.neion-confirm-modal--danger .neion-confirm-modal__confirm {
    border: 1px solid #dc2626 !important;
    background: #dc2626 !important;
    color: #fff !important;
}

.neion-confirm-modal--danger .neion-confirm-modal__confirm:hover {
    background: #b91c1c !important;
}

.neion-confirm-modal--success .neion-confirm-modal__confirm {
    border: 1px solid #28a745 !important;
    background: #28a745 !important;
    color: #fff !important;
}

.neion-confirm-modal--success .neion-confirm-modal__confirm:hover {
    background: #218838 !important;
}

@media (max-width: 520px) {
    .neion-confirm-modal {
        align-items: flex-end !important;
        padding: 14px !important;
    }

    .neion-confirm-modal__panel {
        width: 100% !important;
        border-radius: 12px !important;
        padding: 22px 18px 18px !important;
    }

    .neion-confirm-modal__actions {
        flex-direction: column-reverse !important;
    }

    .neion-confirm-modal__cancel,
    .neion-confirm-modal__confirm {
        width: 100% !important;
    }
}
