
#curva-abc-view {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.curva-abc-container {
    padding: 1.25rem 2rem 3rem;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
    color: #1e293b;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

.curva-abc-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.curva-abc-title-box h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.25rem 0;
    letter-spacing: -0.02em;
}

.curva-abc-title-box p {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
}

.curva-abc-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.curva-abc-select {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #334155;
    outline: none;
    transition: all 0.2s;
    cursor: pointer;
}

.curva-abc-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.curva-abc-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.95rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.curva-abc-btn-primary {
    background: #0f172a;
    color: #ffffff;
}

.curva-abc-btn-primary:hover {
    background: #1e293b;
}

.curva-abc-btn-secondary {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #334155;
}

.curva-abc-btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.curva-abc-btn-success {
    background: #166534;
    color: #ffffff;
}

.curva-abc-btn-success:hover {
    background: #14532d;
}

.cache-status-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    padding: 0.3rem 0.65rem;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-weight: 500;
}

.cache-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
}

.curva-abc-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.curva-abc-tab {
    padding: 0.65rem 1.2rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.curva-abc-tab:hover {
    color: #0f172a;
}

.curva-abc-tab.active {
    color: #0f172a;
    border-bottom-color: #0f172a;
}

.abc-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.abc-kpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}

.abc-kpi-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #cbd5e1;
}

.abc-kpi-card.curva-a-border::before {
    background: #16a34a;
}

.abc-kpi-card.curva-b-border::before {
    background: #0284c7;
}

.abc-kpi-card.curva-c-border::before {
    background: #94a3b8;
}

.abc-kpi-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.abc-kpi-value {
    font-size: 1.45rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.abc-kpi-sub {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 0.35rem;
    display: flex;
    justify-content: space-between;
}

.badge-curva {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.badge-curva-a {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.badge-curva-b {
    background: #e0f2fe;
    color: #075985;
    border: 1px solid #bae6fd;
}

.badge-curva-c {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.abc-charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 1100px) {
    .abc-charts-grid {
        grid-template-columns: 1fr;
    }
}

.abc-chart-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.abc-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.abc-chart-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.abc-chart-canvas-box {
    position: relative;
    height: 320px;
    width: 100%;
}

.abc-table-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    overflow: hidden;
}

.abc-table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.abc-filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.abc-input-search {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
    color: #1e293b;
    outline: none;
    min-width: 260px;
    transition: all 0.2s;
}

.abc-input-search:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.abc-pill-filter {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    transition: all 0.15s;
}

.abc-pill-filter.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.abc-table-wrapper {
    overflow-x: auto;
    width: 100%;
}

.abc-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.abc-data-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.74rem;
    letter-spacing: 0.03em;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: right;
    white-space: nowrap;
}

.abc-data-table th.align-left {
    text-align: left;
}

.abc-data-table th.align-center {
    text-align: center;
}

.abc-data-table td {
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    text-align: right;
    white-space: nowrap;
}

.abc-data-table td.align-left {
    text-align: left;
}

.abc-data-table td.align-center {
    text-align: center;
}

.abc-data-table tbody tr:hover {
    background: #f8fafc;
}

.abc-progress-bar-bg {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.abc-progress-bar-fill {
    height: 100%;
    background: #0f172a;
    border-radius: 3px;
}

.abc-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    font-size: 0.82rem;
    color: #64748b;
}

.abc-pagination-btns {
    display: flex;
    gap: 0.35rem;
}

.abc-unit-tag {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.abc-unit-kg {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.abc-unit-un {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.abc-esforco-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
}

.abc-esforco-val {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.8rem;
}

.abc-esforco-sub {
    font-size: 0.7rem;
    color: #64748b;
}

.abc-sortable {
    cursor: pointer;
    user-select: none;
    transition: background 0.15s, color 0.15s;
    position: relative;
    padding-right: 1.25rem !important;
}

.abc-sortable:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.abc-sortable::after {
    content: " ↕";
    font-size: 0.7rem;
    color: #94a3b8;
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
}

.abc-sortable.sorted-asc::after {
    content: " ▲";
    color: #0f172a;
}

.abc-sortable.sorted-desc::after {
    content: " ▼";
    color: #0f172a;
}

.abc-clickable-row {
    cursor: pointer;
    transition: background 0.15s;
}

.abc-clickable-row:hover td {
    background: #f8fafc;
}

.abc-link-text {
    color: #2563eb;
    text-decoration: underline;
    text-decoration-style: dotted;
}

.abc-link-text:hover {
    color: #1d4ed8;
    text-decoration-style: solid;
}

.abc-matriz-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.abc-quadrantes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

@media (max-width: 1024px) {
    .abc-quadrantes-grid {
        grid-template-columns: 1fr;
    }
}

.abc-quadrante-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.abc-quadrante-card.q1 { border-top: 4px solid #10b981; }
.abc-quadrante-card.q2 { border-top: 4px solid #0284c7; }
.abc-quadrante-card.q3 { border-top: 4px solid #8b5cf6; }
.abc-quadrante-card.q4 { border-top: 4px solid #ef4444; }

.abc-quadrante-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.abc-quadrante-title h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.2rem 0;
}

.abc-quadrante-title p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
}

.abc-quadrante-metrics {
    display: flex;
    gap: 1.5rem;
    background: #f8fafc;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.abc-q-metric-item {
    display: flex;
    flex-direction: column;
}

.abc-q-metric-label {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
}

.abc-q-metric-val {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

.abc-quadrante-acao {
    background: #f8fafc;
    border-left: 3px solid #0f172a;
    padding: 0.6rem 0.85rem;
    border-radius: 0 4px 4px 0;
    font-size: 0.82rem;
    line-height: 1.4;
    color: #334155;
}

.abc-quadrante-acao strong {
    color: #0f172a;
}

.abc-quadrante-top-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    margin-top: 0.25rem;
}

.abc-quadrante-top-table th {
    background: #f1f5f9;
    padding: 0.4rem 0.5rem;
    color: #475569;
    font-size: 0.7rem;
    text-transform: uppercase;
    text-align: right;
}

.abc-quadrante-top-table th.align-left { text-align: left; }

.abc-quadrante-top-table td {
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid #f1f5f9;
    text-align: right;
}

.abc-quadrante-top-table td.align-left { text-align: left; }

.abc-diagnostico-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 1rem;
}

@media (max-width: 1100px) {
    .abc-diagnostico-grid {
        grid-template-columns: 1fr;
    }
}

.abc-diag-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.abc-diag-header {
    margin-bottom: 0.75rem;
}

.abc-diag-header h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.2rem 0;
}

.abc-diag-header p {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0;
}

.abc-diag-stat {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0.5rem 0;
}

.abc-diag-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.75rem;
    max-height: 220px;
    overflow-y: auto;
}

.abc-diag-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0.5rem;
    background: #f8fafc;
    border-radius: 4px;
    font-size: 0.78rem;
}

.abc-analise-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.abc-analise-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}

.abc-analise-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #94a3b8;
}

.abc-analise-card.border-amber::before { background: #f59e0b; }
.abc-analise-card.border-green::before { background: #10b981; }
.abc-analise-card.border-red::before { background: #ef4444; }
.abc-analise-card.border-blue::before { background: #0284c7; }
.abc-analise-card.border-rose::before { background: #e11d48; }

.abc-analise-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #475569;
    margin-bottom: 0.35rem;
}

.abc-analise-val {
    font-size: 1.55rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.abc-analise-sub {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.35rem;
    display: flex;
    justify-content: space-between;
    font-weight: 500;
}

.badge-trans-ba {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.76rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-trans-ab {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.76rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-trans-cb {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.76rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-trans-bc {
    background: #ffedd5;
    color: #9a3412;
    border: 1px solid #fed7aa;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.76rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-descont-critico {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.76rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-descont-baixo {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.76rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-descont-dreno {
    background: #450a0a;
    color: #fecaca;
    border: 1px solid #7f1d1d;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.76rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

