/* =============================================================
   BIDSMART - FORM COMPONENTS (Template do Sistema)
   Input, Select, Button, Section, Table, Tabs, ActionBar, CNAEs
   ============================================================= */

/* =========================
   CSS VARIABLES (Form-specific)
   ========================= */
:root {
    --bs-primary: #1E3A5F;
    --bs-primary-2: #2F6FED;
    --bs-line: #E2E8F0;
    --bs-text: #0F172A;
    --bs-muted: #64748B;
    --bs-ro-bg: rgba(30, 58, 95, 0.10);
    --bs-ro-border: rgba(30, 58, 95, 0.28);
}

/* =========================
   PAGE LAYOUT
   ========================= */
.bidsmart-page {
    padding-bottom: 24px;
}

.bidsmart-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 10px 0 16px;
}

/* =========================
   CARDS
   ========================= */
.bidsmart-card {
    background: var(--bidsmart-card);
    border-radius: var(--radius);
    border: 1px solid var(--bidsmart-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

    .bidsmart-card:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

.bidsmart-card-modern {
    background: #ffffff;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.bidsmart-card-sub {
    background: #ffffff;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.bidsmart-actions-card {
    padding: 16px 18px;
}

.bidsmart-cards-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* =========================
   SECTION HEADER
   ========================= */
.bidsmart-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid #f1f5f9;
    gap: 12px;
    flex-wrap: wrap;
}

.bidsmart-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bidsmart-section-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 58, 95, 0.08);
    color: #1E3A5F;
}

/* =========================
   GRID
   ========================= */
.bidsmart-grid {
    row-gap: 10px;
}

/* =========================
   INPUT LINE (MudBlazor Variant.Text)
   ========================= */
.bidsmart-input-line {
    width: 100%;
}

    /* Label */
    .bidsmart-input-line .mud-input-label {
        font-weight: 500;
        color: #334155;
        opacity: 1 !important;
    }

    /* Tipografia do valor */
    .bidsmart-input-line input,
    .bidsmart-input-line textarea {
        font-size: 14px;
        font-weight: 500;
        color: var(--bs-text) !important;
    }

    /* Helper text */
    .bidsmart-input-line .mud-input-helper-text {
        font-size: 12px;
        color: var(--bs-muted) !important;
        margin-top: 6px;
    }

    /* Underline base */
    .bidsmart-input-line .mud-input-underline:before {
        border-bottom: 1px solid var(--bs-line) !important;
        opacity: 1 !important;
    }

    /* Linha gradiente no foco */
    .bidsmart-input-line .mud-input-underline {
        position: relative;
    }

        .bidsmart-input-line .mud-input-underline::after {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            height: 2px;
            border-radius: 2px;
            background: linear-gradient(90deg, var(--bs-primary), var(--bs-primary-2));
            transform: scaleX(0);
            transform-origin: left;
            transition: transform .18s ease;
            pointer-events: none;
        }

    .bidsmart-input-line:focus-within .mud-input-underline::after {
        transform: scaleX(1);
    }

    /* Sem foco: fecha gradiente */
    .bidsmart-input-line:not(:focus-within) .mud-input-underline::after {
        transform: scaleX(0) !important;
    }

    /* Erro sem foco: volta pro underline base cinza */
    .bidsmart-input-line.mud-input-error:not(:focus-within) .mud-input-underline::before {
        border-bottom: 1px solid var(--bs-line) !important;
    }

    .bidsmart-input-line.mud-input-error:not(:focus-within) .mud-input-underline::after {
        transform: scaleX(0) !important;
    }

/* Disabled: nao mostra gradiente */
.bidsmart-disabled:focus-within .mud-input-underline::after {
    transform: scaleX(0) !important;
}

/* Fonte consistente */
.bidsmart-input-line,
.bidsmart-input-line * {
    font-family: inherit !important;
}

    .bidsmart-input-line input,
    .bidsmart-input-line textarea,
    .bidsmart-input-line .mud-input-slot,
    .bidsmart-input-line .mud-input-slot * {
        font-family: inherit !important;
        font-weight: 500;
    }

        .bidsmart-input-line input::placeholder,
        .bidsmart-input-line textarea::placeholder {
            font-family: inherit !important;
            font-weight: 500;
            opacity: 0.55;
        }

    .bidsmart-input-line label,
    .bidsmart-input-line .mud-input-label,
    .bidsmart-input-line .mud-input-helper-text {
        font-family: inherit !important;
    }

    .bidsmart-input-line input:-webkit-autofill,
    .bidsmart-input-line input:-webkit-autofill:hover,
    .bidsmart-input-line input:-webkit-autofill:focus {
        font-family: inherit !important;
    }

    /* Label alinhada */
    .bidsmart-input-line.mud-input-control .mud-input-label,
    .bidsmart-input-line .mud-input-control .mud-input-label {
        transform-origin: left top !important;
        left: 0 !important;
    }

    .bidsmart-input-line.mud-input-control.mud-input-has-value .mud-input-label,
    .bidsmart-input-line.mud-input-control:focus-within .mud-input-label,
    .bidsmart-input-line .mud-input-control.mud-input-has-value .mud-input-label,
    .bidsmart-input-line .mud-input-control:focus-within .mud-input-label {
        transform: translate3d(0, 0, 0) scale(.85) !important;
    }

    .bidsmart-input-line .mud-input-label.mud-input-label-shrink {
        transform: translate3d(0, 0, 0) scale(.85) !important;
    }

    /* Slot padding */
    .bidsmart-input-line .mud-input-slot {
        padding-left: 3px !important;
        padding-right: 4px !important;
    }

/* =========================
   READONLY FIELD
   ========================= */
.bidsmart-readonly .mud-input-underline:before,
.bidsmart-readonly .mud-input-underline:after,
.bidsmart-readonly .mud-input-underline::before,
.bidsmart-readonly .mud-input-underline::after {
    border-bottom: none !important;
    background: none !important;
    box-shadow: none !important;
    content: none !important;
    display: none !important;
}

.bidsmart-readonly .mud-input-slot {
    position: relative;
    background: var(--bs-ro-bg) !important;
    border: 1px dashed var(--bs-ro-border);
    border-radius: 20px;
    margin-top: 4px !important;
    padding: 8px 34px 8px 12px !important;
}

    .bidsmart-readonly .mud-input-slot::after {
        content: "\1F512";
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 13px;
        opacity: .70;
        pointer-events: none;
    }

.bidsmart-readonly input,
.bidsmart-readonly textarea {
    opacity: 1 !important;
    cursor: default;
}

.bidsmart-readonly:focus-within .mud-input-underline::after {
    transform: scaleX(0) !important;
}

/* =========================
   BUTTONS (modern)
   ========================= */
.bidsmart-btn-modern {
    border-radius: 12px;
    padding: 10px 16px;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}

    .bidsmart-btn-modern:hover:enabled {
        transform: translateY(-1px);
        box-shadow: 0 10px 22px rgba(15, 23, 42, 0.10);
    }

.bidsmart-gradient {
    background: linear-gradient(90deg, #1E3A5F 0%, #255184 100%) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
}

    .bidsmart-gradient:hover:enabled {
        filter: brightness(1.02);
        transform: translateY(-1px);
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
    }

    .bidsmart-gradient:active:enabled {
        transform: translateY(0px);
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
    }

.bidsmart-btn-outline-primary {
    border: 1px solid #1E3A5F;
    background: transparent;
    color: #1E3A5F;
}

    .bidsmart-btn-outline-primary:hover {
        background: rgba(30, 58, 95, .08);
    }

/* =========================
   ACTION BAR
   ========================= */
.bidsmart-actionbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: #ffffff;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    padding: 14px 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
    margin-bottom: 20px;
}

.bidsmart-actionbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.bidsmart-actionbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* =========================
   STATUS BADGES
   ========================= */
.bidsmart-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

    .bidsmart-status-badge.success {
        background: rgba(34, 197, 94, .12);
        color: #16a34a;
    }

    .bidsmart-status-badge.danger {
        background: rgba(239, 68, 68, .12);
        color: #dc2626;
    }

    .bidsmart-status-badge.neutral {
        background: rgba(148, 163, 184, .14);
        color: #475569;
    }

.bidsmart-status-chip {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 999px;
}

/* =========================
   TABS PREMIUM
   ========================= */
.bidsmart-tabs-premium {
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
    margin-bottom: 12px !important;
}

    .bidsmart-tabs-premium .mud-tabs-tabbar,
    .bidsmart-tabs-premium .mud-tabs-toolbar {
        border-bottom: none !important;
        box-shadow: none !important;
    }

    .bidsmart-tabs-premium .mud-tabs-slider,
    .bidsmart-tabs-premium .mud-tabs-slider-wrapper {
        display: none !important;
    }

    .bidsmart-tabs-premium .mud-tab {
        margin: 0 !important;
        padding: 8px 12px !important;
        border-radius: 999px !important;
        font-weight: 700;
        text-transform: none !important;
        color: #334155 !important;
        background: transparent !important;
        border: 1px solid transparent;
        transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
    }

        .bidsmart-tabs-premium .mud-tab:hover {
            background: var(--bidsmart-primary) !important;
            color: #fff !important;
            border-color: rgba(30, 58, 95, .18) !important;
            transform: translateY(-1px);
            box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
        }

            .bidsmart-tabs-premium .mud-tab:hover .mud-tab-icon {
                color: #fff !important;
                opacity: 1 !important;
            }

        .bidsmart-tabs-premium .mud-tab.mud-tab-active {
            color: #1E3A5F !important;
            background: rgba(30, 58, 95, .10) !important;
        }

        .bidsmart-tabs-premium .mud-tab .mud-tab-icon {
            margin-right: 8px !important;
            color: inherit !important;
            opacity: .92;
        }

    .bidsmart-tabs-premium .mud-tab-button {
        padding: 0 !important;
        min-height: unset !important;
    }

.mud-tab-slider.mud-tab-slider-horizontal {
    height: 0px !important;
    bottom: 0;
    transition: left .12s cubic-bezier(0.64, 0.09, 0.08, 1);
    will-change: left;
}

.bidsmart-tabs-premium .mud-tabs-tabbar,
.bidsmart-tabs-premium .mud-tabs-toolbar,
.bidsmart-tabs-premium .mud-tabs-tabbar-wrapper,
.bidsmart-tabs-premium .mud-tabs-toolbar-content {
    padding-left: 4px !important;
    padding-right: 4px !important;
}

.bidsmart-tabs-premium .mud-tabs-tabbar {
    border-radius: 14px;
    margin-bottom: 8px !important;
    box-shadow: none !important;
    background: transparent !important;
}

.mud-tabs-tabbar-content {
    width: 100%;
    flex: 1 1 auto;
    display: inline-block;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    margin: 4px 0 8px 0;
    padding-bottom: 2px;
}

/* =========================
   CNAEs
   ========================= */
.bidsmart-cnae-highlight {
    background: linear-gradient(180deg, rgba(30, 58, 95, .03), rgba(30, 58, 95, .01));
    border: 1px solid #e8eef6;
    border-radius: 14px;
    padding: 16px;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

    .bidsmart-cnae-highlight:hover {
        border-color: rgba(30, 58, 95, .18);
        box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
        transform: translateY(-1px);
    }

.bidsmart-cnae-highlight-header {
    margin-bottom: 12px;
}

.bidsmart-cnae-highlight-body {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.bidsmart-cnae-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(30, 58, 95, .10);
    color: #1E3A5F;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
}

.bidsmart-cnae-code-small {
    font-size: 12px;
    padding: 5px 10px;
}

.bidsmart-cnae-text {
    color: #334155;
    font-size: 14px;
    line-height: 1.45;
}

.bidsmart-cnae-table-wrap {
    margin-top: 8px;
}

.bidsmart-cnae-table {
    border: 1px solid #eef2f7;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: none !important;
}

    .bidsmart-cnae-table .mud-table-container {
        border-radius: 14px;
    }

    .bidsmart-cnae-table thead th {
        background: #f8fafc;
        color: #475569;
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
        border-bottom: 1px solid #e8eef6;
    }

    .bidsmart-cnae-table tbody tr:not(:last-child) td {
        border-bottom: 1px solid #eef2f7;
    }

    .bidsmart-cnae-table tbody td {
        background: #fff;
        vertical-align: middle;
    }

.bidsmart-cnae-list-wrap {
    margin-top: 8px;
}

.bidsmart-cnae-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bidsmart-cnae-item {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: linear-gradient(180deg, rgba(30, 58, 95, .025), rgba(30, 58, 95, .01));
    border: 1px solid #e8eef6;
    border-radius: 12px;
    padding: 12px 14px;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

    .bidsmart-cnae-item:hover {
        border-color: rgba(30, 58, 95, .18);
        box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
        transform: translateY(-1px);
    }



/* =========================
   DASHBOARD HEADER
   ========================= */
.bidsmart-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 10px 0 16px;
    gap: 16px;
    flex-wrap: wrap;
}

.bidsmart-dashboard-subtitle {
    color: #64748b;
    font-size: 14px;
    margin-top: 4px;
}

/* =========================
   RESPONSIVE FIX
   ========================= */
html, body {
    overflow-x: hidden;
}

.app-main, .app-content, .bidsmart-dashboard {
    min-width: 0;
}

/* =========================
   STAT CARDS
   ========================= */
.bidsmart-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin: 14px 0 16px;
}

@media (max-width: 1100px) {
    .bidsmart-stats-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 800px) {
    .bidsmart-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .bidsmart-stats-grid {
        grid-template-columns: 1fr;
    }
}

.bidsmart-stat-card {
    position: relative;
    border-radius: 16px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e9eef5;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .06);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

    .bidsmart-stat-card::after {
        content: "";
        position: absolute;
        inset: -2px;
        pointer-events: none;
    }

    .bidsmart-stat-card::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        height: 3px;
        width: 100%;
        background: var(--accent, #1E3A5F);
    }

    .bidsmart-stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 30px rgba(15, 23, 42, .10);
        border-color: #dbe4f0;
    }

    .bidsmart-stat-card .d-flex {
        align-items: center !important;
        gap: 12px !important;
    }

.bidsmart-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--accent, #1E3A5F) 10%, white);
    border: 1px solid color-mix(in srgb, var(--accent, #1E3A5F) 18%, #e9eef5);
    color: var(--accent, #1E3A5F);
}

.bidsmart-stat-value {
    color: #0f172a;
    font-weight: 900;
    font-size: 20px;
    line-height: 1.1;
    margin-top: 1rem;
}

.bidsmart-stat-label {
    color: #64748b;
    font-weight: 700;
    font-size: 12px;
    margin-top: 2px;
}

.bidsmart-stat-sub {
    margin-top: 6px;
    color: #475569;
    font-size: 12px;
    font-weight: 650;
}

    .bidsmart-stat-sub .muted {
        color: #94a3b8;
        font-weight: 650;
    }

    .bidsmart-stat-sub .sep {
        margin: 0 8px;
        color: #cbd5e1;
    }

.bidsmart-stat-desc {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e8eef7;
    color: #64748b;
    font-size: 11px;
    line-height: 1.25;
}

    .bidsmart-stat-desc b {
        color: #0f172a;
        font-weight: 800;
    }

.bidsmart-stat-card:nth-child(1) {
    --accent: #1E3A5F;
}

.bidsmart-stat-card:nth-child(2) {
    --accent: #16a34a;
}

.bidsmart-stat-card:nth-child(3) {
    --accent: #f59e0b;
}

.bidsmart-stat-card:nth-child(4) {
    --accent: #3b82f6;
}

.bidsmart-stat-card:nth-child(5) {
    --accent: #7c3aed;
}

/* =========================
   CHARTS
   ========================= */
.bidsmart-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 1100px) {
    .bidsmart-charts-grid {
        grid-template-columns: 1fr;
    }
}

.bidsmart-chart-card {
    border: 1px solid #eef2f7;
    border-radius: 16px;
    padding: 14px 16px;
    background: #fff;
    box-shadow: none !important;
}

.bidsmart-chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.bidsmart-chart-title {
    font-weight: 800;
    color: #0f172a;
    font-size: 14px;
}

.bidsmart-chart-subtitle {
    color: #64748b;
    font-size: 12px;
    margin-top: 2px;
}

.bidsmart-chart-canvas {
    height: 190px;
    margin-top: 8px;
}

    .bidsmart-chart-canvas canvas {
        height: 190px !important;
        width: 100% !important;
        display: block;
    }

#clientesChart {
    width: 100% !important;
    height: 100% !important;
}

.bidsmart-range {
    display: flex;
    gap: 6px;
    align-items: center;
}

.range-btn {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    font-weight: 700;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
}

    .range-btn.active {
        background: #1E3A5F;
        border-color: #1E3A5F;
        color: #fff;
    }

/* Score pill */
.score-pill {
    font-weight: 900;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.score-good {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #166534;
}

.score-mid {
    background: #ffedd5;
    border-color: #fed7aa;
    color: #9a3412;
}

.score-bad {
    background: #ffe4e6;
    border-color: #fecdd3;
    color: #9f1239;
}

.score-desc {
    margin-top: 6px;
    color: #475569;
    font-size: 12px;
    line-height: 1.25;
    max-width: 520px;
}

.insights-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.insight {
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
}

    .insight .k {
        font-size: 11px;
        color: #64748b;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

    .insight .v {
        margin-top: 6px;
        font-size: 18px;
        font-weight: 900;
        color: #0f172a;
    }

    .insight .sub {
        margin-top: 4px;
        font-size: 11px;
        color: #64748b;
        font-weight: 600;
    }

/* =========================
   KPI BADGES & PROGRESS
   ========================= */
.kpi-good {
    color: #16a34a;
}

.kpi-medium {
    color: #f59e0b;
}

.kpi-bad {
    color: #dc2626;
}

.kpi-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    margin-right: 8px;
}

    .kpi-badge.kpi-good {
        background: #dcfce7;
        border-color: #bbf7d0;
    }

    .kpi-badge.kpi-medium {
        background: #ffedd5;
        border-color: #fed7aa;
    }

    .kpi-badge.kpi-bad {
        background: #ffe4e6;
        border-color: #fecdd3;
    }

.kpi-progress {
    height: 8px;
    background: #eef2f7;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 8px;
}

.kpi-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: var(--accent, #1E3A5F);
    transition: width .25s ease;
}

/* =========================
   FILTERS
   ========================= */
.bidsmart-filters-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.bidsmart-filter-search {
    flex: 1 1 520px;
    min-width: 320px;
}

.bidsmart-filter-select {
    width: 220px;
}

.bidsmart-filter-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

@media (max-width: 700px) {
    .bidsmart-filter-select {
        flex: 1 1 220px;
    }

    .bidsmart-filter-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* =========================
   DATATABLE (bs-table)
   ========================= */
.bidsmart-table-wrap {
    overflow: auto;
}

.bs-table {
    border: 1px solid #eef2f7;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

    .bs-table .mud-table-head {
        background: #f8fafc;
    }

        .bs-table .mud-table-head th {
            font-size: 11px;
            letter-spacing: .06em;
            text-transform: uppercase;
            font-weight: 900;
            color: #64748b;
            padding-top: 12px;
            padding-bottom: 12px;
            border-bottom: 1px solid #eef2f7;
        }

    .bs-table .mud-table-body td {
        padding-top: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid #f1f5f9;
        vertical-align: middle;
    }

    .bs-table .mud-table-body tr:hover {
        background: #f8fafc;
    }

/* Column widths */
.col-nome {
    width: 360px;
}

.col-perfil {
    width: 170px;
}

.col-bloqueado {
    width: 120px;
}

.col-lockout {
    width: 120px;
}

.col-razao {
    width: 360px;
}

.col-cnpj {
    width: 170px;
}

.col-status {
    width: 120px;
}

.col-contato {
    width: 290px;
}

.col-emailfin {
    width: 260px;
}

.col-prov {
    width: 160px;
}

.col-acoes {
    width: 80px;
}

.col-data {
    width: 130px;
}

@media (max-width: 1100px) {
    .col-nome {
        width: auto;
    }

    .col-razao {
        width: auto;
    }
}

.cell-razao .rs {
    font-weight: 900;
    color: #0f172a;
    font-size: 13px;
    line-height: 1.1;
}

.cell-perfil .rs {
    font-weight: 900;
    color: #0f172a;
    font-size: 13px;
    line-height: 1.1;
}

.data-stack .data-main {
    font-weight: 700;
    color: #0f172a;
    font-size: 12px;
}

.data-stack .data-sub {
    font-size: 10px;
    color: #64748b;
    margin-top: 2px;
}

.cnpj {
    font-variant-numeric: tabular-nums;
    letter-spacing: .3px;
    color: #334155;
    font-weight: 600;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.pill-success {
    background: #dcfce7;
    color: #166534;
}

.pill-warning {
    background: #ffedd5;
    color: #9a3412;
}

.pill-danger {
    background: #ffe4e6;
    color: #9f1239;
}

.pill-info {
    background: #e0e7ff;
    color: #3730a3;
}

.nome {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 240px;
}

.contact {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 240px;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 11px;
}

.contact-text .name {
    font-weight: 800;
    color: #0f172a;
    font-size: 12px;
    line-height: 1.1;
}

.contact-text .email {
    color: #64748b;
    font-size: 11px;
    line-height: 1.2;
    word-break: break-all;
}

.nome-text .name {
    font-weight: 800;
    color: #0f172a;
    font-size: 12px;
    line-height: 1.1;
}

.nome-text .email {
    color: #64748b;
    font-size: 11px;
    line-height: 1.2;
    word-break: break-all;
}

.email-stack .email-main {
    color: #334155;
    font-size: 12px;
    font-weight: 650;
    word-break: break-all;
}

.prov {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 800;
}

    .prov.ok {
        background: #dcfce7;
        color: #166534;
    }



.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 800;
}

    .status.ok {
        background: #dcfce7;
        color: #166534;
    }

    .status.not {
        background: #fcdcdc;
        color: #651616;
    }

    .status.block {
        background: #fcfadc;
        color: #656016;
    }

.muted {
    color: #94a3b8;
}

.center {
    text-align: center;
}

.bs-actions .mud-button-root {
    min-width: 36px !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
}

    .bs-actions .mud-button-root:hover {
        background: #f1f5f9 !important;
    }

.bs-pager {
    border-top: 1px solid #eef2f7;
    padding: 6px 8px;
}

/* =========================
   MODAL DE FORMULÁRIO (ppops-user-batch-modal)
   Padrão reutilizável para modais do sistema.
   Originado no UsuarioBidSmartModal, agora global.
   ========================= */
.ppops-user-batch-modal {
    padding: 12px 14px 10px;
}

.ppops-user-batch-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.ppops-user-batch-modal__titles {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ppops-user-batch-modal__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.ppops-user-batch-modal__subtitle {
    margin: 0;
    color: #64748b;
    line-height: 1.45;
    max-width: 760px;
}

.ppops-user-batch-modal__close {
    border-radius: 12px;
    color: #64748b !important;
}

.ppops-user-batch-modal__close:hover {
    background: #f8fafc;
    color: #0f172a !important;
}

.ppops-user-batch-modal__panel {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    padding: 18px;
    background: #ffffff;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 8px 24px rgba(15, 23, 42, 0.04);
}

.ppops-user-batch-modal__panel-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 20px;
}

.ppops-user-batch-modal__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.ppops-user-batch-modal__toolbar-left,
.ppops-user-batch-modal__toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ppops-user-batch-modal__search {
    min-width: 360px;
}

.ppops-user-batch-modal__search .mud-input-control {
    margin-top: 0;
}

.ppops-user-batch-modal__search .mud-input-outlined-border {
    border-color: rgba(148, 163, 184, 0.32) !important;
}

.ppops-user-batch-modal__search .mud-input-root {
    background: #fbfcfe;
    border-radius: 14px;
}

.ppops-user-batch-modal__search input {
    font-size: 14px;
}

.ppops-user-batch-modal__refresh {
    border-radius: 12px !important;
    color: #475569 !important;
    background: #f8fafc;
    padding-inline: 10px !important;
}

.ppops-user-batch-modal__refresh:hover {
    background: #f1f5f9;
}

.ppops-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.ppops-stat-chip__label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.ppops-stat-chip__value {
    font-size: 12px;
    color: #0f172a;
    font-weight: 700;
}

.ppops-stat-chip--success {
    background: #ecfdf3;
    border-color: rgba(34, 197, 94, 0.18);
}

.ppops-stat-chip--success .ppops-stat-chip__label,
.ppops-stat-chip--success .ppops-stat-chip__value {
    color: #15803d;
}

.ppops-user-batch-modal__table-wrap {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    min-height: 340px;
}

.ppops-user-batch-modal__table {
    background: transparent;
}

.ppops-user-batch-modal__table .mud-table-root {
    background: transparent;
}

.ppops-user-batch-modal__table .mud-table-head {
    background: #f8fafc;
}

.ppops-user-batch-modal__table .mud-table-head th {
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.ppops-user-batch-modal__table .mud-table-body td {
    padding-top: 13px;
    padding-bottom: 13px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    vertical-align: middle;
}

.ppops-user-batch-modal__table .mud-table-body tr:hover {
    background: #fcfdff;
}

.ppops-col-select {
    width: 64px;
}

.ppops-row-checkbox {
    display: flex;
    justify-content: center;
}

.ppops-user-batch-modal__user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ppops-user-batch-modal__user-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ppops-user-batch-modal__avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 999px;
    background: #f6f6f6;
    color: #243b71;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}

.ppops-user-name {
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.ppops-user-email,
.ppops-user-email-main {
    color: #64748b;
}

.ppops-user-email-main {
    font-size: 13px;
}

.ppops-perfil-wrap {
    position: relative;
    min-width: 180px;
}

.ppops-perfil-select .mud-input-outlined-border {
    border-color: rgba(148, 163, 184, 0.22) !important;
}

.ppops-perfil-select .mud-input-root {
    background: #ffffff;
    border-radius: 12px;
}

.ppops-perfil-wrap--disabled .ppops-perfil-select {
    opacity: 1;
}

.ppops-perfil-wrap--disabled .mud-input-root {
    background: #f8fafc !important;
}

.ppops-perfil-wrap--disabled .mud-input-outlined-border {
    border-color: rgba(148, 163, 184, 0.20) !important;
}

.ppops-perfil-wrap--disabled .mud-select-input,
.ppops-perfil-wrap--disabled input {
    color: #94a3b8 !important;
}

.ppops-perfil-lock {
    position: absolute;
    top: 50%;
    right: 36px;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2f7;
    color: #64748b;
    pointer-events: none;
}

.ppops-user-batch-modal__loading,
.ppops-user-batch-modal__empty {
    min-height: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #64748b;
    padding: 32px;
    text-align: center;
}

.ppops-user-batch-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 18px;
    margin-top: 18px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.ppops-user-batch-modal__footer-left {
    color: #64748b;
    font-size: 13px;
}

.ppops-user-batch-modal__footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ppops-user-batch-modal__footer-right .mud-button-root:first-child {
    border-radius: 12px;
    color: #475569 !important;
    border-color: rgba(148, 163, 184, 0.24) !important;
}

.ppops-primary-action {
    border-radius: 12px !important;
    min-width: 170px;
    box-shadow: 0 8px 18px rgba(29, 76, 209, 0.16);
}

.ppops-primary-action.mud-button-root:disabled,
.ppops-primary-action.mud-disabled {
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

.ppops-primary-action.mud-button-root:disabled .mud-button-label,
.ppops-primary-action.mud-disabled .mud-button-label,
.ppops-primary-action.mud-button-root:disabled span,
.ppops-primary-action.mud-disabled span,
.ppops-primary-action.mud-button-root:disabled i,
.ppops-primary-action.mud-disabled i {
    color: #94a3b8 !important;
}

.text-muted {
    color: #64748b;
}

@media (max-width: 900px) {
    .ppops-user-batch-modal__search {
        min-width: 100%;
        width: 100%;
    }

    .ppops-user-batch-modal__toolbar-left {
        width: 100%;
    }

    .ppops-user-batch-modal__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .ppops-user-batch-modal__footer-right {
        width: 100%;
        justify-content: stretch;
    }

    .ppops-primary-action {
        width: 100%;
    }
}
