:root {
    --green-950: #07351f;
    --green-900: #0b4f2f;
    --green-800: #11643d;
    --green-700: #1b7b4d;
    --green-100: #e8f5ed;
    --cream: #f8f8f2;
    --orange: #ef6c24;
    --gold: #efa612;
    --blue: #2e6da4;
    --red: #d94b3d;
    --ink: #17211b;
    --muted: #68746d;
    --line: #e4e9e6;
    --shadow: 0 18px 50px rgba(24, 63, 43, .11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: "DM Sans", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(64, 139, 93, .13), transparent 25%),
        linear-gradient(180deg, #f5f7f2 0%, #eef3ef 100%);
}
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }

.page-shell { width: min(1480px, calc(100% - 32px)); margin: 16px auto 48px; }
.hero {
    overflow: hidden;
    border-radius: 30px;
    background:
        linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.96) 45%, rgba(234,245,235,.78) 100%),
        radial-gradient(circle at 88% 10%, rgba(238,173,65,.28), transparent 24%);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,.9);
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 34px; border-bottom: 1px solid rgba(16,86,50,.08); }
.brand { display: inline-flex; align-items: center; gap: 13px; }
.brand-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; color: white; background: linear-gradient(135deg, var(--green-700), var(--green-950)); box-shadow: 0 10px 25px rgba(14,87,49,.24); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; }
.brand small { color: var(--muted); margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.month-control { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: white; border-radius: 14px; padding: 0 14px; height: 46px; color: var(--green-900); }
.month-control input { border: 0; outline: 0; color: var(--ink); background: transparent; }
.btn { border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 20px; border-radius: 14px; font-weight: 800; transition: .25s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: white; background: linear-gradient(135deg, var(--green-700), var(--green-950)); box-shadow: 0 10px 24px rgba(11,79,47,.22); }
.btn-outline { color: var(--orange); border: 1px solid rgba(239,108,36,.42); background: white; }
.btn-accent { color: white; background: linear-gradient(135deg, #f28a25, #e45314); box-shadow: 0 14px 30px rgba(224,83,20,.28); }
.btn-lg { min-height: 52px; padding: 0 24px; }

.hero-grid { display: grid; grid-template-columns: .95fr 1.25fr; gap: 36px; padding: 54px 38px 42px; align-items: center; }
.hero-copy { padding: 18px 0 18px 12px; position: relative; z-index: 2; }
.eyebrow, .section-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; color: var(--green-700); }
.eyebrow { padding: 8px 12px; border-radius: 999px; background: var(--green-100); }
.hero h1 { max-width: 670px; margin: 18px 0 18px; font-family: "Playfair Display", serif; font-size: clamp(44px, 5vw, 78px); line-height: .98; letter-spacing: -.045em; color: var(--green-950); }
.hero-copy > p { max-width: 640px; color: var(--muted); line-height: 1.75; font-size: 17px; }
.source-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.source-pills span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: white; border: 1px solid var(--line); font-size: 13px; font-weight: 700; }
.source-pills span:last-child { color: var(--orange); border-color: rgba(239,108,36,.24); background: #fff8f3; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-products { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 48px 8px 20px; min-height: 480px; align-items: end; }
.hero-products::before { content: ""; position: absolute; inset: 0; border-radius: 34px 0 0 34px; background: linear-gradient(180deg, rgba(103,169,112,.19), rgba(243,187,72,.12)); transform: skewX(-4deg); }
.hero-glow { position: absolute; inset: 10% 8% auto auto; width: 300px; height: 300px; border-radius: 50%; background: rgba(245, 190, 84, .24); filter: blur(30px); }
.product-visual { position: relative; z-index: 2; min-height: 310px; padding: 16px 14px 20px; border-radius: 24px; background: rgba(255,255,255,.92); border: 1px solid rgba(255,255,255,.96); box-shadow: 0 16px 30px rgba(20,64,40,.15); text-align: center; display: flex; flex-direction: column; justify-content: flex-end; transition: .3s ease; }
.product-visual:nth-child(3) { transform: translateY(-24px); }
.product-visual:nth-child(5) { transform: translateY(-18px); }
.product-visual:hover { transform: translateY(-34px); }
.product-visual .sku { position: absolute; top: 14px; left: 14px; color: white; border-radius: 999px; padding: 6px 9px; font-size: 12px; font-weight: 900; background: var(--green-700); }
.product-visual.pimenton .sku { background: var(--red); }
.product-visual.guineo .sku { background: var(--gold); }
.produce { font-size: clamp(60px, 7vw, 108px); filter: drop-shadow(0 12px 14px rgba(40,58,45,.16)); margin-bottom: auto; padding-top: 50px; }
.product-visual h3 { margin: 8px 0 4px; color: var(--green-950); font-size: 18px; }
.product-visual small { color: var(--muted); }

main { display: grid; gap: 22px; margin-top: 22px; }
.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.kpi-card, .section-card { background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.95); box-shadow: var(--shadow); }
.kpi-card { min-height: 174px; border-radius: 22px; padding: 20px; position: relative; overflow: hidden; }
.kpi-card::after { content: ""; position: absolute; width: 120px; height: 120px; border-radius: 50%; right: -38px; bottom: -55px; background: rgba(49,135,78,.06); }
.kpi-icon { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 17px; }
.kpi-icon.green { color: var(--green-700); background: var(--green-100); }
.kpi-icon.orange { color: var(--orange); background: #fff0e7; }
.kpi-icon.blue { color: var(--blue); background: #e8f1f9; }
.kpi-icon.gold { color: var(--gold); background: #fff5db; }
.kpi-card span, .kpi-card small { display: block; color: var(--muted); }
.kpi-card span { font-weight: 700; font-size: 13px; }
.kpi-card strong { display: block; margin: 6px 0 4px; font-size: 30px; color: var(--green-900); }
.kpi-card:nth-child(2) strong, .kpi-card:nth-child(5) strong { color: var(--orange); }
.kpi-card:nth-child(4) strong { color: var(--blue); }
.kpi-card small { font-size: 11px; }
.sparkline { position: absolute; left: 18px; right: 18px; bottom: 13px; height: 26px; opacity: .65; }
.sparkline svg { width: 100%; height: 100%; }

.section-card { border-radius: 24px; padding: 26px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-heading.compact { margin-bottom: 12px; }
.section-heading h2 { margin: 6px 0 5px; color: var(--green-950); font-family: "Playfair Display", serif; font-size: 30px; }
.section-heading p { margin: 0; color: var(--muted); }
.status-pill { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 9px 13px; color: var(--green-700); background: var(--green-100); font-size: 12px; font-weight: 800; }
.status-pill span { width: 8px; height: 8px; border-radius: 50%; background: #25a45c; box-shadow: 0 0 0 5px rgba(37,164,92,.12); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; }
table { width: 100%; min-width: 1040px; border-collapse: collapse; }
thead { background: linear-gradient(90deg, var(--green-950), var(--green-700)); color: white; }
th, td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line); }
th { font-size: 12px; letter-spacing: .03em; }
td { font-size: 14px; }
tbody tr:hover { background: #fbfdfb; }
.product-cell { display: flex; align-items: center; gap: 12px; font-weight: 800; }
.product-emoji { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: #f4f6f2; font-size: 24px; }
.sku-code { font-weight: 900; color: var(--green-700); }
.participation { display: flex; align-items: center; gap: 10px; }
.mini-ring { --p: 0; width: 34px; height: 34px; border-radius: 50%; background: conic-gradient(var(--orange) calc(var(--p) * 1%), #edf0ed 0); position: relative; }
.mini-ring::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: white; }
.trend { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; }
.trend.up { color: var(--orange); }
.trend.down { color: var(--green-700); }
.trend.flat { color: var(--blue); }

.dashboard-grid { display: grid; grid-template-columns: .9fr 1.5fr .9fr; gap: 22px; }
.chart-card { min-width: 0; }
.chart-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.chart-title h3 { margin: 5px 0 0; font-size: 18px; }
.unit-badge { padding: 7px 10px; border-radius: 999px; background: #f0f4f1; color: var(--muted); font-size: 11px; font-weight: 800; }
.chart-container { position: relative; height: 310px; }
.donut-container { padding: 8px; }
.split-grid { display: grid; grid-template-columns: 1.45fr .75fr; gap: 22px; }
.market-list { display: grid; gap: 10px; }
.market-row { display: grid; grid-template-columns: 1.2fr .8fr .9fr .7fr; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: #f8faf8; border: 1px solid var(--line); }
.market-product { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.market-product .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); }
.market-row small { display: block; color: var(--muted); margin-bottom: 4px; }
.market-row strong { font-size: 13px; }
.insight-panel { background: linear-gradient(145deg, #0c4d2e, #113f2b); color: white; }
.insight-panel .section-kicker { color: #a9dfbd; }
.insight-panel h2 { font-family: "Playfair Display", serif; font-size: 32px; margin: 8px 0 20px; }
.main-insight { min-height: 170px; padding: 20px; border-radius: 18px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.1); line-height: 1.65; }
.main-insight strong { color: #ffd58f; }
.opportunity-meter { margin-top: 24px; }
.meter-label { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 13px; }
.meter-track { height: 10px; background: rgba(255,255,255,.15); border-radius: 999px; overflow: hidden; }
.meter-track span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #f0af2e, #ff7c29); border-radius: inherit; transition: width .6s ease; }
.insights-section { padding: 8px 0; }
.insight-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.insight-card { border-radius: 20px; padding: 20px; min-height: 180px; background: white; box-shadow: var(--shadow); border: 1px solid var(--line); }
.insight-card .icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; color: var(--orange); background: #fff0e6; margin-bottom: 16px; }
.insight-card h3 { margin: 0 0 9px; font-size: 17px; }
.insight-card p { margin: 0; color: var(--muted); line-height: 1.6; font-size: 13px; }
.method-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.method-grid article { position: relative; padding: 22px; border-radius: 18px; background: #f8faf8; border: 1px solid var(--line); }
.method-grid article > span { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: white; background: var(--green-700); font-weight: 900; }
.method-grid i { font-size: 27px; color: var(--green-700); margin-bottom: 18px; }
.method-grid h3 { margin: 0 0 8px; }
.method-grid p { margin: 0; color: var(--muted); line-height: 1.6; font-size: 13px; }
.final-cta { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 44px; border-radius: 28px; overflow: hidden; color: white; background: linear-gradient(100deg, rgba(6,51,30,.98), rgba(16,92,52,.88)), radial-gradient(circle at right, #c9781e, transparent 40%); box-shadow: var(--shadow); }
.final-cta .eyebrow.light { color: white; background: rgba(255,255,255,.1); }
.final-cta h2 { max-width: 780px; margin: 14px 0 10px; font-family: "Playfair Display", serif; font-size: clamp(32px, 4vw, 54px); line-height: 1; }
.final-cta p { max-width: 780px; margin: 0; color: rgba(255,255,255,.75); line-height: 1.7; }

.loading-layer { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(242,247,243,.82); backdrop-filter: blur(8px); opacity: 0; pointer-events: none; transition: .2s ease; }
.loading-layer.show { opacity: 1; pointer-events: all; }
.loader { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-radius: 18px; background: white; box-shadow: var(--shadow); font-weight: 800; color: var(--green-900); }
.loader i { animation: pulse 1s infinite alternate; }
@keyframes pulse { to { transform: scale(1.3) rotate(8deg); } }
.error-box { padding: 18px; border-radius: 16px; color: #8f2920; background: #fff1ef; border: 1px solid #f2c9c4; }

@media (max-width: 1200px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-products { min-height: 390px; }
    .kpi-grid { grid-template-columns: repeat(3, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr 1fr; }
    .wide-chart { grid-column: span 2; order: -1; }
    .split-grid { grid-template-columns: 1fr; }
    .insight-grid, .method-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
    .page-shell { width: min(100% - 14px, 1480px); margin-top: 7px; }
    .topbar { padding: 18px; align-items: flex-start; }
    .brand small { display: none; }
    .topbar-actions { width: 100%; justify-content: flex-end; }
    .month-control { min-width: 0; }
    .topbar .btn { width: 46px; padding: 0; font-size: 0; }
    .hero-grid { padding: 34px 18px 24px; }
    .hero h1 { font-size: 46px; }
    .hero-products { grid-template-columns: repeat(2, 1fr); padding-top: 10px; }
    .product-visual { min-height: 220px; }
    .product-visual:nth-child(3), .product-visual:nth-child(5) { transform: none; }
    .produce { font-size: 65px; }
    .kpi-grid { grid-template-columns: 1fr 1fr; }
    .kpi-card:last-child { grid-column: span 2; }
    .section-card { padding: 20px; }
    .section-heading, .final-cta { flex-direction: column; align-items: flex-start; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .wide-chart { grid-column: auto; }
    .market-row { grid-template-columns: 1fr 1fr; }
    .insight-grid, .method-grid { grid-template-columns: 1fr; }
    .final-cta { padding: 28px; }
}
@media (max-width: 480px) {
    .topbar { flex-direction: column; }
    .topbar-actions { justify-content: stretch; }
    .month-control { flex: 1; }
    .hero h1 { font-size: 39px; }
    .hero-products { gap: 8px; }
    .product-visual { padding: 12px; }
    .product-visual h3 { font-size: 15px; }
    .kpi-grid { grid-template-columns: 1fr; }
    .kpi-card:last-child { grid-column: auto; }
    .chart-container { height: 270px; }
    .market-row { grid-template-columns: 1fr; }
}

.financial-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.kpi-card.featured{background:linear-gradient(135deg,#0b4f2f,#166b43);color:#fff}.kpi-card.featured span,.kpi-card.featured small{color:rgba(255,255,255,.76)}.kpi-card.featured strong{color:#fff}.kpi-icon.purple{background:#f0eaff;color:#7457c8}.data-quality-banner{max-width:1380px;margin:18px auto 28px;padding:18px 22px;border:1px solid #d7e8dc;border-radius:18px;background:linear-gradient(135deg,#f3fbf6,#fff);display:flex;align-items:center;gap:16px;box-shadow:0 10px 30px rgba(16,70,44,.06)}.quality-icon{width:48px;height:48px;border-radius:15px;background:#e0f2e6;color:#166b43;display:grid;place-items:center;font-size:20px}.data-quality-banner p{margin:3px 0 0;color:#66746c}.quality-badge{margin-left:auto;padding:9px 13px;border-radius:999px;background:#0b4f2f;color:#fff;font-size:12px;font-weight:800;letter-spacing:.05em}.table-wrap table{min-width:1180px}.table-wrap td small,.product-cell small,.price-cell small{display:block;margin-top:4px;color:#87918b;font-size:11px}.money-primary,.money-total{color:#0b6f3c}.money-total{font-size:18px}.no-price{display:inline-flex;align-items:center;gap:7px;color:#b1492b;font-weight:800}.muted-value{color:#929b96}.analysis-card tfoot td{background:#f2f8f4;border-top:2px solid #cfe2d4}.analysis-card tfoot strong{color:#123c29}.finance-grid{grid-template-columns:1fr 1.5fr 1fr}.full-chart{grid-column:1/-1}.finance-row{grid-template-columns:1.25fr repeat(4,1fr)}.finance-row>div{min-width:0}.finance-row small{display:block;color:#8b948f;margin-bottom:4px}.finance-row strong{display:block}.saving-value{color:#0b7a42}.financial-callout{padding:13px 15px;border-radius:14px;background:#edf8f1;border:1px solid #d2e9d9}.hero .source-pills{flex-wrap:wrap}.product-cell>span:last-child{display:flex;flex-direction:column}.chart-container{min-height:300px}.full-chart .chart-container{min-height:360px}
@media(max-width:1100px){.financial-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.finance-grid{grid-template-columns:1fr 1fr}.wide-chart,.full-chart{grid-column:1/-1}.finance-row{grid-template-columns:1fr 1fr}.finance-row .market-product{grid-column:1/-1}}
@media(max-width:720px){.financial-kpis{grid-template-columns:1fr}.data-quality-banner{align-items:flex-start;flex-wrap:wrap}.quality-badge{margin-left:0}.finance-grid{grid-template-columns:1fr}.wide-chart,.full-chart{grid-column:auto}.finance-row{grid-template-columns:1fr}.finance-row .market-product{grid-column:auto}}
