/* ============================================================
   Direct Fuel — Global Stylesheet
   ============================================================ */

:root {
  --df-blue:    #1a3a6b;
  --df-blue-mid:#1e4fa0;
  --df-orange:  #e85d04;
  --df-orange-light: #ff7a1a;
  --df-light:   #f4f7fc;
  --df-card-shadow: 0 2px 16px rgba(26,58,107,0.09);
  --df-card-hover:  0 6px 28px rgba(26,58,107,0.15);
  --df-radius:  12px;
}

/* ── Base ─────────────────────────────────────────── */
body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--df-light);
  color: #1e293b;
}

a { color: var(--df-blue-mid); }

/* ── Navbar ───────────────────────────────────────── */
.df-navbar {
  background: var(--df-blue);
  padding: 0.75rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.df-navbar .navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff !important;
  letter-spacing: -0.5px;
}

.df-navbar .navbar-brand span {
  color: var(--df-orange);
}

.df-navbar .nav-link {
  color: rgba(255,255,255,0.85) !important;
  font-weight: 500;
  transition: color 0.2s;
}

.df-navbar .nav-link:hover {
  color: #fff !important;
}

.df-navbar .btn-nav-cta {
  background: var(--df-orange);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.4rem 1.1rem;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s, transform 0.1s;
}

.df-navbar .btn-nav-cta:hover {
  background: var(--df-orange-light);
  color: #fff;
  transform: translateY(-1px);
}

/* ── Hero ─────────────────────────────────────────── */
.df-hero {
  background: linear-gradient(135deg, var(--df-blue) 0%, var(--df-blue-mid) 60%, #2a6dd9 100%);
  color: #fff;
  padding: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.df-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 320px; height: 320px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.df-hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -40px;
  width: 250px; height: 250px;
  background: rgba(232,93,4,0.12);
  border-radius: 50%;
}

.df-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
}

.df-hero h1 span { color: var(--df-orange); }

.df-hero p.lead {
  font-size: 1.15rem;
  opacity: 0.9;
}

.df-search-card {
  background: #fff;
  border-radius: var(--df-radius);
  padding: 1.75rem 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.df-search-card .form-control {
  border-radius: 8px 0 0 8px;
  border: 1.5px solid #dde3ef;
  font-size: 1.05rem;
  padding: 0.65rem 1rem;
  height: auto;
}

.df-search-card .btn-search {
  background: var(--df-orange);
  color: #fff;
  border: none;
  border-radius: 0 8px 8px 0;
  padding: 0 1.4rem;
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.2s;
}

.df-search-card .btn-search:hover {
  background: var(--df-orange-light);
}

/* ── Stats bar ────────────────────────────────────── */
.df-stats-bar {
  background: var(--df-blue);
  color: #fff;
  padding: 0.9rem 0;
}

.df-stats-bar .stat-item {
  text-align: center;
  padding: 0 1rem;
}

.df-stats-bar .stat-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--df-orange);
}

.df-stats-bar .stat-label {
  font-size: 0.8rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Supplier cards ───────────────────────────────── */
.df-supplier-card {
  background: #fff;
  border-radius: var(--df-radius);
  box-shadow: var(--df-card-shadow);
  transition: box-shadow 0.22s, transform 0.22s;
  border: 1.5px solid #e8edf5;
  overflow: hidden;
}

.df-supplier-card:hover {
  box-shadow: var(--df-card-hover);
  transform: translateY(-3px);
}

.df-supplier-card .card-header-bar {
  background: linear-gradient(90deg, var(--df-blue), var(--df-blue-mid));
  height: 5px;
}

.df-supplier-card .supplier-logo {
  font-size: 2.5rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--df-light);
  border-radius: 12px;
  flex-shrink: 0;
}

.df-supplier-card .price-display {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--df-blue);
  line-height: 1;
}

.df-supplier-card .price-display small {
  font-size: 0.95rem;
  font-weight: 500;
  color: #64748b;
}

.df-supplier-card .delivery-chip {
  background: #eef2ff;
  color: var(--df-blue-mid);
  border-radius: 20px;
  padding: 0.2rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-buy-now {
  background: var(--df-orange);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1.4rem;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.1s;
  width: 100%;
}

.btn-buy-now:hover {
  background: var(--df-orange-light);
  color: #fff;
  transform: translateY(-1px);
}

/* ── Sort/filter bar ──────────────────────────────── */
.df-filter-bar {
  background: #fff;
  border-radius: var(--df-radius);
  box-shadow: var(--df-card-shadow);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}

.df-filter-bar .form-select {
  border-radius: 8px;
  border: 1.5px solid #dde3ef;
  font-size: 0.9rem;
  padding: 0.45rem 2rem 0.45rem 0.75rem;
}

/* ── Checkout ─────────────────────────────────────── */
.df-checkout-card {
  background: #fff;
  border-radius: var(--df-radius);
  box-shadow: var(--df-card-shadow);
  border: 1.5px solid #e8edf5;
  padding: 2rem;
}

.df-checkout-card h5 {
  font-weight: 700;
  color: var(--df-blue);
  border-bottom: 2px solid var(--df-light);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
}

.gallon-slider {
  accent-color: var(--df-orange);
  width: 100%;
  height: 6px;
}

.price-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.95rem;
}

.price-summary-row.total {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--df-blue);
  border-top: 2px solid #e8edf5;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
}

.step-badge {
  width: 32px;
  height: 32px;
  background: var(--df-blue);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* ── Order tracking ───────────────────────────────── */
.df-timeline {
  position: relative;
  padding-left: 2rem;
}

.df-timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0; bottom: 0;
  width: 2px;
  background: #e8edf5;
}

.df-timeline-item {
  position: relative;
  padding-bottom: 1.75rem;
}

.df-timeline-item:last-child { padding-bottom: 0; }

.df-timeline-dot {
  position: absolute;
  left: -1.75rem;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e8edf5;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #e8edf5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
}

.df-timeline-dot.done {
  background: var(--df-blue-mid);
  box-shadow: 0 0 0 2px #c7d7f8;
}

.df-timeline-dot.active {
  background: var(--df-orange);
  box-shadow: 0 0 0 2px #ffd8b8;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.df-timeline-label {
  font-weight: 600;
  color: #1e293b;
}

.df-timeline-label.muted { color: #94a3b8; font-weight: 500; }

.df-timeline-date {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 2px;
}

/* ── Supplier dashboard ───────────────────────────── */
.df-dash-stat {
  background: #fff;
  border-radius: var(--df-radius);
  box-shadow: var(--df-card-shadow);
  padding: 1.5rem;
  border-left: 4px solid var(--df-blue-mid);
}

.df-dash-stat.orange { border-left-color: var(--df-orange); }
.df-dash-stat.green  { border-left-color: #22c55e; }
.df-dash-stat.purple { border-left-color: #8b5cf6; }

.df-dash-stat .stat-val {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--df-blue);
}

.df-dash-stat .stat-lbl {
  font-size: 0.82rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 4px;
}

.df-login-card {
  max-width: 420px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--df-radius);
  box-shadow: 0 8px 32px rgba(26,58,107,0.12);
  padding: 2.5rem;
}

/* ── Footer ───────────────────────────────────────── */
.df-footer {
  background: var(--df-blue);
  color: rgba(255,255,255,0.75);
  padding: 2.5rem 0 1.5rem;
  margin-top: 4rem;
}

.df-footer .brand-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
}

.df-footer .brand-name span { color: var(--df-orange); }

.df-footer a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.df-footer a:hover { color: #fff; }

.df-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 2rem;
  padding-top: 1rem;
  font-size: 0.82rem;
  text-align: center;
}

/* ── Utilities ────────────────────────────────────── */
.badge-supplier {
  font-size: 0.72rem;
  padding: 0.28rem 0.65rem;
  border-radius: 20px;
  font-weight: 600;
}

.text-df-blue { color: var(--df-blue) !important; }
.text-df-orange { color: var(--df-orange) !important; }
.bg-df-blue { background: var(--df-blue) !important; }
.bg-df-orange { background: var(--df-orange) !important; }

.btn-df-primary {
  background: var(--df-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-df-primary:hover {
  background: var(--df-blue-mid);
  color: #fff;
}

.btn-df-orange {
  background: var(--df-orange);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-df-orange:hover {
  background: var(--df-orange-light);
  color: #fff;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #94a3b8;
}

.empty-state i { font-size: 3rem; margin-bottom: 1rem; }

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--df-blue);
}

.result-count {
  font-size: 0.9rem;
  color: #64748b;
}

/* ── Confirmation ─────────────────────────────────── */
.df-confirm-banner {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  border-radius: var(--df-radius);
  padding: 2rem;
  text-align: center;
}

.df-confirm-banner .check-circle {
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 767px) {
  .df-hero { padding: 2.5rem 0 2rem; }
  .df-search-card { padding: 1.25rem; }
  .df-checkout-card { padding: 1.25rem; }
  .df-login-card { padding: 1.75rem 1.25rem; }
}

/* ============================================================
   OilAdvisor AI — Extended Styles
   ============================================================ */

/* ── AI gradient text ─────────────────────────────── */
.ai-gradient-text {
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Supplier dashboard AI panel ──────────────────── */
.df-demand-card {
  background: linear-gradient(135deg, #1a3a6b, #1e4fa0);
  color: #fff;
  border-radius: var(--df-radius);
  padding: 1.5rem;
}

.df-demand-card .demand-stat {
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  text-align: center;
}

.df-demand-card .demand-stat .val {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}

.df-demand-card .demand-stat .lbl {
  font-size: 0.72rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 4px;
}

/* ── Forecast bar chart ────────────────────────────── */
.forecast-bar-wrap {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 80px;
  padding: 0 0.25rem;
}

.forecast-bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.forecast-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #60a5fa, #2563eb);
  transition: height 0.8s cubic-bezier(.4,0,.2,1);
  min-height: 4px;
}

.forecast-bar.high { background: linear-gradient(180deg, #f87171, #dc2626); }
.forecast-bar.low  { background: linear-gradient(180deg, #86efac, #16a34a); }

.forecast-bar-label {
  font-size: 0.58rem;
  color: rgba(255,255,255,0.7);
  margin-top: 3px;
  white-space: nowrap;
}

/* ── CRM / Customer list ───────────────────────────── */
.crm-row {
  background: #fff;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin-bottom: 0.5rem;
  border: 1.5px solid #e8edf5;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.crm-avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--df-blue), var(--df-blue-mid));
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* ── Route optimizer ───────────────────────────────── */
.route-stop {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.route-stop .stop-num {
  width: 26px;
  height: 26px;
  background: var(--df-blue);
  color: #fff;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── AI recommendation pill ────────────────────────── */
.ai-rec-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #312e81, #4338ca);
  color: #fff;
  border-radius: 20px;
  padding: 0.25rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ── Inventory gauge ────────────────────────────────── */
.inv-gauge-track {
  height: 12px;
  background: #e8edf5;
  border-radius: 6px;
  overflow: hidden;
  margin: 0.4rem 0;
}

.inv-gauge-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 1s cubic-bezier(.4,0,.2,1);
}

/* ── Alert notification dot ────────────────────────── */
.notif-dot {
  width: 8px;
  height: 8px;
  background: var(--df-orange);
  border-radius: 50%;
  display: inline-block;
  animation: notif-pulse 2s infinite;
}

@keyframes notif-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.4); opacity: 0.7; }
}

/* ── Smart pricing badge ───────────────────────────── */
.smart-price-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
}

/* ── Weather alert strip in supplier dash ──────────── */
.weather-alert-strip {
  background: linear-gradient(90deg, #1e3a8a, #1d4ed8);
  color: #fff;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.weather-alert-strip .alert-icon { font-size: 1.5rem; }
.weather-alert-strip .alert-body { flex-grow: 1; }
.weather-alert-strip .alert-title { font-weight: 700; font-size: 0.9rem; }
.weather-alert-strip .alert-sub   { font-size: 0.78rem; opacity: 0.85; }
