﻿:root {
    --background: #f5f6f8;
    --surface: #ffffff;
    --text: #222222;
    --muted: #6b7280;

    --border: #e5e7eb;

    --primary: #3483fa;
    --primary-hover: #2968c8;

    --success: #00a650;
    --success-light: #e8f7ef;

    --danger: #f23d4f;
    --danger-light: #fff0f2;

    --warning: #f59e0b;
    --warning-light: #fff7e6;

    --shadow: 0 8px 28px rgba(0, 0, 0, 0.06);

    --radius: 16px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--background);
    color: var(--text);
}

.topbar {
    background: #ffe600;

    padding: 30px max(30px, calc((100vw - 1280px) / 2));

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.topbar h1 {
    margin: 2px 0 5px;
    font-size: 28px;
}

.subtitle {
    margin: 0;
    color: #505050;
}

.eyebrow {
    margin: 0 0 5px;

    font-size: 12px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: 0.08em;

    color: #666;
}

.integration-status {
    display: flex;
    align-items: center;
    gap: 10px;

    background: rgba(255,255,255,0.65);

    padding: 11px 15px;
    border-radius: 12px;
}

.integration-status small {
    display: block;
    color: #666;
    margin-top: 2px;
}

.status-dot {
    width: 10px;
    height: 10px;

    border-radius: 50%;
    background: var(--success);

    box-shadow: 0 0 0 5px rgba(0,166,80,0.13);
}

.container {
    max-width: 1280px;
    margin: 30px auto;
    padding: 0 24px;
}

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

    gap: 18px;
    margin-bottom: 22px;
}

.metric-card {
    background: var(--surface);

    padding: 22px;

    border-radius: var(--radius);
    border: 1px solid var(--border);

    box-shadow: var(--shadow);
}

.metric-card strong {
    display: block;

    font-size: 34px;
    margin: 6px 0;
}

.metric-card small,
.metric-label {
    color: var(--muted);
}

.metric-card.success strong {
    color: var(--success);
}

.metric-card.danger strong {
    color: var(--danger);
}

.panel {
    background: var(--surface);

    border-radius: var(--radius);
    border: 1px solid var(--border);

    padding: 24px;

    box-shadow: var(--shadow);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-bottom: 20px;
}

.panel h2 {
    margin: 0;
    font-size: 21px;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;

    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;

    color: var(--muted);

    padding: 13px 12px;

    border-bottom: 1px solid var(--border);
}

td {
    padding: 17px 12px;
    border-bottom: 1px solid var(--border);

    vertical-align: middle;
}

.product-name {
    max-width: 320px;
}

.product-name strong {
    display: block;
}

.product-name small {
    color: var(--muted);
}

.status-badge {
    display: inline-flex;

    border-radius: 999px;

    padding: 6px 10px;

    font-size: 12px;
    font-weight: 800;
}

.status-winning {
    background: var(--success-light);
    color: var(--success);
}

.status-losing {
    background: var(--danger-light);
    color: var(--danger);
}

.status-neutral {
    background: #f3f4f6;
    color: #555;
}

.price-to-win {
    font-weight: 700;
    color: var(--primary);
}

.primary-button,
.secondary-button,
.detail-button {
    border: 0;

    cursor: pointer;

    font-weight: 700;

    border-radius: 9px;

    transition: 0.15s ease;
}

.primary-button {
    width: 100%;

    padding: 13px 17px;

    background: var(--primary);
    color: white;
}

.primary-button:hover {
    background: var(--primary-hover);
}

.secondary-button {
    padding: 10px 15px;

    color: var(--primary);
    background: #eef5ff;
}

.detail-button {
    padding: 8px 13px;

    color: var(--primary);
    background: transparent;

    border: 1px solid #bfd6fa;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;

    gap: 22px;
    margin-top: 22px;
}

.price-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;

    align-items: center;

    gap: 20px;

    padding: 22px;

    background: #f8fafc;

    border-radius: 13px;
}

.price-comparison span {
    display: block;

    font-size: 13px;
    color: var(--muted);

    margin-bottom: 5px;
}

.price-comparison strong {
    font-size: 25px;
}

.price-comparison .arrow {
    font-size: 25px;
    color: var(--muted);
}

.boost-section {
    margin-top: 25px;
}

.boost-section h3 {
    font-size: 16px;
}

.boost-list {
    display: grid;
    gap: 10px;
}

.boost-item {
    padding: 12px 14px;

    display: flex;
    justify-content: space-between;
    gap: 10px;

    border: 1px solid var(--border);

    border-radius: 10px;
}

.boost-good {
    background: var(--success-light);
}

.boost-opportunity {
    background: var(--warning-light);
}

.simulator-description {
    color: var(--muted);

    line-height: 1.5;
}

.simulator label {
    display: block;

    margin: 20px 0 7px;

    font-size: 13px;
    font-weight: 700;
}

.input-money {
    display: flex;
    align-items: center;

    border: 1px solid #cfd4dc;

    border-radius: 10px;

    margin-bottom: 12px;

    overflow: hidden;
}

.input-money span {
    padding: 0 12px;

    color: var(--muted);
    font-weight: 600;
}

.input-money input {
    border: 0;
    outline: 0;

    width: 100%;

    padding: 13px 10px 13px 0;

    font-size: 17px;
}

.simulation-result {
    margin-top: 20px;

    padding: 16px;

    background: #f8fafc;

    border-radius: 12px;
}

.result-row {
    display: flex;
    justify-content: space-between;

    padding: 8px 0;
}

.result-row.total strong {
    color: var(--success);
    font-size: 22px;
}

.divider {
    height: 1px;

    background: var(--border);

    margin: 8px 0;
}

.mock-warning {
    display: block;

    margin-top: 14px;

    line-height: 1.4;
    color: var(--muted);
}

.loading-cell {
    text-align: center;
    color: var(--muted);

    padding: 40px;
}

.hidden {
    display: none !important;
}

footer {
    text-align: center;

    color: var(--muted);

    padding: 30px;
    font-size: 13px;
}

@media (max-width: 900px) {

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

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

}

@media (max-width: 560px) {

    .cards {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 12px;
    }

    .price-comparison {
        grid-template-columns: 1fr;
    }

    .price-comparison .arrow {
        transform: rotate(90deg);
    }

}
.filters-bar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.filters-bar input {
    flex: 1;
    min-width: 260px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
}

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

.filter-button {
    border: 1px solid var(--border);
    background: white;
    padding: 9px 13px;
    border-radius: 9px;
    cursor: pointer;
    font-weight: 700;
    color: var(--muted);
}

.filter-button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.diagnosis-card {
    margin-bottom: 24px;
    padding: 24px;
    border-radius: 18px;
    background: #fff8db;
    border: 1px solid #f2dc78;
}

.diagnosis-label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #746321;
}

.diagnosis-card h3 {
    margin: 0 0 10px;
    font-size: 22px;
}

.diagnosis-card p {
    margin: 0;
    line-height: 1.6;
    color: #4b5563;
}

.analysis-section {
    margin-top: 26px;
}

.analysis-section h4 {
    margin-bottom: 14px;
    font-size: 16px;
}

.price-comparison {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.price-comparison > div {
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
}

.price-comparison span {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #6b7280;
}

.price-comparison strong {
    font-size: 20px;
}

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

.boost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.boost-active {
    color: #079455;
}

.boost-opportunity {
    color: #b7791f;
}

@media (max-width: 800px) {
    .price-comparison,
    .boost-grid {
        grid-template-columns: 1fr;
    }
}

.profitability-section {
    margin-top: 32px;
}

.cost-helper {
    margin-top: -6px;
    margin-bottom: 16px;
    color: #6b7280;
    font-size: 14px;
}

.cost-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.cost-grid label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
}

.cost-grid input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d9dee7;
    border-radius: 10px;
    font-size: 15px;
    background: #fff;
}

.profitability-button {
    margin-bottom: 20px;
}

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

.profitability-result > div {
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
}

.profitability-result span,
.profitability-result small {
    display: block;
}

.profitability-result strong {
    display: block;
    margin: 7px 0;
    font-size: 22px;
}

@media (max-width: 800px) {
    .cost-grid,
    .profitability-result {
        grid-template-columns: 1fr;
    }
}

.winner-disclaimer {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f8fafc;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
}

.results-analysis-header {
    margin-top: 28px;
    margin-bottom: 14px;
    padding-top: 22px;
    border-top: 1px solid #e5e7eb;
}

.results-analysis-header h4 {
    margin: 0 0 5px;
    font-size: 18px;
}

.results-analysis-header p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
}


/* ===== Refinamento visual V1.1 ===== */

.profitability-section {
    margin-top: 34px;
}

.results-analysis-header {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.results-analysis-header h4 {
    margin: 0 0 6px;
    font-size: 19px;
    font-weight: 800;
    color: #172033;
}

.results-analysis-header p {
    margin: 0 0 16px;
    color: #667085;
    font-size: 13px;
}

.profitability-result {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.profitability-result > div {
    min-height: 108px;
    padding: 16px 18px;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.profitability-result span {
    color: #344054;
    font-size: 13px;
    line-height: 1.35;
}

.profitability-result strong {
    margin: 7px 0 3px;
    font-size: 21px;
    line-height: 1.15;
    color: #172033;
}

.profitability-result small {
    color: #475467;
    font-size: 12px;
}

.winner-disclaimer {
    margin-top: 12px;
    padding: 12px 15px;
    border: 1px solid #d6e4ff;
    border-radius: 11px;
    background: #f5f8ff;
    color: #516071;
    font-size: 12px;
}

/* Custos */
.cost-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.cost-grid input {
    min-height: 44px;
    background: #fff;
}

.profitability-button {
    width: 100%;
    min-height: 48px;
    border-radius: 10px;
    font-weight: 700;
}

/* Painéis principais */
.detail-grid {
    align-items: start;
    gap: 24px;
}

.detail-grid > .panel {
    border-radius: 18px;
}

/* Melhor aproveitamento em telas grandes */
@media (min-width: 1200px) {
    .detail-grid {
        grid-template-columns: minmax(0, 2.15fr) minmax(360px, 0.95fr);
    }
}

@media (max-width: 900px) {
    .profitability-result,
    .cost-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Resultados abaixo da simulação financeira ===== */

.financial-analysis-results {
    margin-top: 26px;
}

.financial-analysis-results:empty {
    display: none;
}

.financial-analysis-results .results-analysis-header {
    margin-top: 0;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.financial-analysis-results .profitability-result {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.financial-analysis-results .profitability-result > div {
    min-height: 105px;
    padding: 15px;
}

.financial-analysis-results .profitability-result strong {
    font-size: 20px;
}

.financial-analysis-results .winner-disclaimer {
    margin-bottom: 10px;
}

@media (max-width: 900px) {
    .financial-analysis-results .profitability-result {
        grid-template-columns: 1fr;
    }
}
