/* Widgets styling */

/* ============ CALCULATORS ============ */
.calc-card{
  background: var(--card);
  border-radius: 16px;
  padding: 36px;
  border: 1px solid var(--line);
  box-shadow: 0 2px 0 rgba(18,41,74,.04);
}
.calc-head{ margin-bottom: 22px; }
.calc-title{
  font-family: 'Barlow Condensed', sans-serif;
  font-style: italic; font-weight: 800;
  font-size: 36px; color: var(--navy-deep);
  margin: 10px 0 8px; text-transform: uppercase;
  letter-spacing: .01em;
}
.calc-sub{ font-size: 14.5px; color: var(--ink-2); margin: 0; max-width: 480px; }

.calc-field{ margin: 18px 0; }
.calc-field label{
  display:block; font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 4px;
}
.calc-value{
  font-family: 'Barlow Condensed', sans-serif;
  font-style: italic; font-weight: 700;
  font-size: 32px; color: var(--navy-deep);
  line-height: 1;
}
.calc-value span{ font-size: 14px; color: var(--ink-3); font-style: normal; margin-left: 4px; font-weight: 600; }

.calc-field input[type=range]{
  width:100%; -webkit-appearance:none; appearance:none;
  height: 4px; background: var(--bg-2); border-radius: 4px;
  margin-top: 8px; accent-color: var(--red);
}
.calc-field input[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none; appearance:none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--red); cursor: pointer;
  border: 3px solid #fff; box-shadow: 0 2px 6px rgba(139,30,45,.3);
}
.calc-ticks{
  display:flex; justify-content:space-between;
  font-size: 10px; color: var(--ink-3); margin-top: 4px;
  font-family: 'JetBrains Mono', monospace;
}

.calc-result{
  background: var(--bg);
  border-radius: 10px;
  padding: 18px 20px;
  margin-top: 24px;
  border: 1px solid var(--line);
}
.calc-result-row{
  display:flex; justify-content:space-between; align-items:center;
  padding: 8px 0;
  font-size: 14px; color: var(--ink-2);
}
.calc-result-row b{ color: var(--navy-deep); font-weight: 700; font-size: 15px; }
.calc-result-row.big{
  border-top: 1px solid var(--line);
  margin-top: 8px; padding-top: 14px;
}
.calc-result-row.big span{ font-weight: 600; color: var(--ink); font-size: 15px; }
.big-num{
  font-family: 'Barlow Condensed', sans-serif;
  font-style: italic; font-weight: 800;
  font-size: 40px !important; color: var(--red) !important;
  line-height: 1;
}
.calc-result-row.sub{ color: var(--ink-3); font-size: 13px; padding-top: 2px; padding-bottom: 0; }
.calc-result-row.sub b{ color: var(--ok); font-size: 13px; }
.calc-footnote{
  font-size: 12px; color: var(--ink-3); margin-top: 16px; line-height: 1.5;
}
.calc-footnote a{ color: var(--red); text-decoration: underline; }

/* Editable diesel price (number input next to slider value) */
.calc-price-row{
  display:flex; align-items:center; justify-content:space-between; gap: 12px;
  margin-bottom: 4px;
}
.calc-price-input{
  width: 110px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 6px;
  background: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; color: var(--navy-deep); font-weight: 600;
  text-align: right;
}
.calc-price-input:focus{ outline: none; border-color: var(--red); }

/* 80% → 100% rebate uplift block */
.calc-uplift{
  margin-top: 14px; padding: 14px 14px 16px;
  background: rgba(139,30,45,.04);
  border: 1px solid rgba(139,30,45,.18);
  border-radius: 10px;
  position: relative;
}
.calc-uplift-tag{
  position: absolute; top: -9px; left: 14px;
  background: var(--red); color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 700;
  padding: 3px 8px; border-radius: 4px;
}
.calc-uplift-grid{
  display:grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
  margin-top: 6px;
}
.calc-uplift-label{
  font-size: 10px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-3); font-weight: 700; margin-bottom: 4px;
}
.calc-uplift-val{
  font-family: 'Barlow Condensed', sans-serif;
  font-style: italic; font-weight: 800;
  font-size: 22px; color: var(--navy-deep); line-height: 1;
}
.calc-uplift-val.muted{ color: var(--ink-3); text-decoration: line-through; }
.calc-uplift-val.accent{ color: var(--red); }
.calc-uplift-sub{
  font-size: 11px; color: var(--ink-3); margin-top: 3px;
  font-family: 'JetBrains Mono', monospace;
}
@media (max-width: 520px){
  .calc-uplift-grid{ grid-template-columns: 1fr; gap: 8px; }
  .calc-uplift-val{ font-size: 20px; }
}

/* ============ DASHBOARD ============ */
.dash{
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -20px rgba(18,41,74,.25);
}
.dash-bar{
  display:flex; justify-content:space-between; align-items:center;
  background: var(--navy-deep); color: #fff;
  padding: 10px 16px;
  font-size: 13px;
}
.dash-bar-left{ display:flex; align-items:center; gap:8px; font-weight: 600; }
.dash-dot{
  width:8px; height:8px; background: #3AD66F; border-radius:50%;
  box-shadow: 0 0 0 0 rgba(58,214,111,.6); animation: pulseDot 2s infinite;
}
@keyframes pulseDot{
  0%{ box-shadow: 0 0 0 0 rgba(58,214,111,.6); }
  70%{ box-shadow: 0 0 0 8px rgba(58,214,111,0); }
  100%{ box-shadow: 0 0 0 0 rgba(58,214,111,0); }
}
.dash-bar-right{ display:flex; align-items:center; gap: 14px; }
.dash-bar-chip{
  font-family:'JetBrains Mono', monospace; font-size: 11px;
  background: rgba(255,255,255,.08); padding: 3px 8px; border-radius: 4px;
  color: rgba(255,255,255,.8);
}
.dash-dots{ display:flex; gap:4px; }
.dash-dots span{ width:8px; height:8px; background: rgba(255,255,255,.3); border-radius:50%; }

.dash-body{ padding: 16px; background: #F6F7F9; }

/* Top row: gauge + chart */
.dash-top{
  display:grid; grid-template-columns: 170px 1fr; gap: 12px;
  margin-bottom: 12px;
}
.dash-gauge-card, .dash-chart-card{
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  padding: 12px 14px;
}
.dash-card-label{
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--red);
  margin-bottom: 6px;
}
.dash-card-label.ok{ color: var(--ok); }
.dash-card-label.red{ color: var(--red); }

/* Volume gauge */
.dash-gauge{ text-align: center; position: relative; padding-top: 4px; }
.dash-gauge-pct{
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 300;
  font-size: 28px; color: #111827;
  letter-spacing: -.01em;
}
.dash-gauge-bar{
  position: relative;
  height: 170px; width: 54px;
  margin: 10px auto 6px;
  border: 1px solid rgba(139,30,45,.15);
  background: #FBF5EF;
  overflow: hidden;
}
.dash-gauge-fill{
  position: absolute; left:0; right:0; bottom: 0;
  background: var(--red);
  transition: height .6s ease;
  background-image: repeating-linear-gradient(
    0deg,
    #8B1E2D 0px, #8B1E2D 3px,
    #A8243A 3px, #A8243A 4px
  );
}
.dash-gauge-scale{
  position: absolute; top:-4px; bottom:-4px; left: calc(100% + 6px);
  display:flex; flex-direction:column; justify-content:space-between;
  font-size: 10px; color: #94A3B8;
  font-family: system-ui, sans-serif;
}
.dash-gauge-foot{
  font-size: 11px; font-weight: 700; color: var(--red);
  letter-spacing: .06em;
  margin-top: 6px;
}

/* Chart card */
.dash-chart-card{ padding: 10px 14px; position: relative; }
.dash-chart-sub{
  font-size: 11px; color: #64748B; margin-bottom: 4px;
  display:flex; align-items:center; gap:6px;
}
.clock-ic{ font-size: 12px; color: #94A3B8; }
.dash-chart-svg{ width: 100%; height: 170px; display:block; }
.dash-chart-legend-row{
  display:flex; gap: 18px; justify-content: center;
  font-size: 10px; color: #64748B;
  margin-top: 2px;
}
.dash-chart-legend-row .lg{ display:inline-flex; align-items:center; gap: 5px; }
.dash-chart-legend-row .sw{
  width: 10px; height: 2px; border-radius: 1px; display:inline-block;
}
.dash-chart-legend-row .sw.green{ background: #2AAE4F; }
.dash-chart-legend-row .sw.blue{ background: #3AA6E5; }
.dash-chart-legend-row .sw.yellow{ background: #F4C542; }
.dash-chart-legend-row .sw.red{ background: var(--red); }
.dash-chart-legend-row .sw.navy{ background: var(--navy-deep); }
.dash-chart-legend-row .sw.wheat{ background: #C9A961; }

/* KPI strip (matches real dashboard's white tiles) */
.dash-kpis{
  display:grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.dash-kpi{
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  padding: 10px 12px;
}
.dash-kpi-label{
  font-size: 10px; color: #64748B; letter-spacing: .08em;
  text-transform: uppercase; font-weight: 700; margin-bottom: 4px;
}
.dash-kpi-val{
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 300;
  font-size: 22px; color: #111827; line-height: 1.1;
  letter-spacing: -.01em;
}
.dash-kpi-val span{
  font-size: 12px; color: #64748B; font-weight: 400; margin-left: 2px;
}

/* ============ TESTIMONIALS ============ */
.testimonial{
  max-width: 880px; margin: 0 auto; position: relative;
  padding: 20px 0;
}
.testimonial-quote-mark{
  font-family: 'Barlow Condensed', serif;
  font-size: 160px; line-height: 1;
  color: var(--red); opacity: .15;
  position: absolute; top: -40px; left: -20px;
  font-weight: 800; font-style: italic;
}
.testimonial-quote{
  font-family: 'Barlow Condensed', sans-serif;
  font-style: italic; font-weight: 600;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.2;
  color: #fff;
  margin: 0 0 32px;
  animation: fadein .5s ease;
}
@keyframes fadein{ from{ opacity: 0; transform: translateY(6px); } to{ opacity:1; transform:none; } }
.testimonial-person{ display:flex; align-items:center; gap:16px; }
.testimonial-avatar{
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--red); color: #fff;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800; font-size: 20px;
  display:flex; align-items:center; justify-content:center;
  letter-spacing: .04em;
}
.testimonial-name{ font-weight: 700; color: #fff; font-size: 16px; }
.testimonial-role{ color: rgba(255,255,255,.65); font-size: 13px; }
.testimonial-dots{
  display:flex; gap: 8px; margin-top: 28px;
}
.testimonial-dot{
  width: 24px; height: 3px; border-radius: 2px;
  background: rgba(255,255,255,.2); border:none; cursor:pointer;
  transition: background .2s, width .2s;
}
.testimonial-dot.on{ background: var(--red-bright); width: 44px; }

/* ============ COMPARE TABLE ============ */
.compare{
  background: var(--card); border-radius: 14px;
  overflow: hidden; border: 1px solid var(--line);
}
.compare-head, .compare-row{
  display:grid; grid-template-columns: 1.2fr 1fr 1fr;
  align-items: center;
}
.compare-head{ background: var(--navy-deep); color: #fff; }
.compare-head-cell{
  padding: 24px 24px;
  font-family: 'Barlow Condensed', sans-serif;
  font-style: italic; font-weight: 800;
  font-size: 28px; text-transform: uppercase;
  display:flex; align-items:center; gap: 12px;
}
.compare-logo-mark{
  width: 28px; height: 28px;
  clip-path: polygon(20% 0, 100% 0, 100% 80%, 80% 100%, 0 100%, 0 20%);
}
.compare-logo-mark.red{ background: var(--red); }
.compare-logo-mark.navy{ background: var(--red); }
.compare-row{
  border-top: 1px solid var(--line);
  transition: background .15s;
}
.compare-row:hover{ background: var(--bg); }
.compare-label{
  padding: 18px 24px;
  font-size: 13px; font-weight: 700; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .08em;
  border-right: 1px solid var(--line);
}
.compare-cell{
  padding: 18px 24px;
  font-size: 15px; color: var(--ink);
  border-right: 1px solid var(--line);
}
.compare-cell:last-child{ border-right: none; }
.compare-cta-row{ background: var(--bg); }

@media (max-width: 960px){
  .dash-top{ grid-template-columns: 1fr; }
  .dash-kpis{ grid-template-columns: 1fr 1fr; }
  .compare-head, .compare-row{ grid-template-columns: 1fr; }
  .compare-label{ border-right: none; border-bottom: 1px solid var(--line); background: var(--bg); }
}
