:root {
  --bg-0: #07090f;
  --bg-1: #0c1018;
  --bg-2: #111620;
}

html, body, #root {
  height: 100%;
  margin: 0;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(520px 40% at 5% -5%, rgba(245,158,11,0.07), #0000 40%),
    radial-gradient(800px 50% at 95% 0%, rgba(16,185,129,0.06), #0000 45%),
    radial-gradient(900px 45% at 50% 110%, rgba(139,92,246,0.05), #0000 55%),
    var(--bg-0);
  color: #d9e0ec;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 18px 96px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 8px 0 6px;
}

.app-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: conic-gradient(from 200deg,
    rgba(245,158,11,0.35), rgba(59,130,246,0.25), rgba(16,185,129,0.35));
  border: 1px solid #2a3344;
  border-radius: 12px;
  color: #fbbf24;
  font-size: 20px;
}

.updated {
  color: #8a93a3;
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.25);
  color: #86efac;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.status .dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.20);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}
@media (max-width: 860px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.panel {
  background: linear-gradient(180deg, rgba(19,22,32,0.90), rgba(17,22,32,0.90));
  border: 1px solid #1d2231;
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.25);
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(160px 80px at -10% -10%, rgba(255,255,255,0.03), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent 70%);
  mix-blend-mode: overlay;
}

.panel .label {
  color: #8a93a3;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.panel .value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-top: 6px;
}
.panel .sub {
  margin-top: 8px;
  font-size: 12px;
  color: #8a93a3;
}

.panel.petrol { border-color: #1e3b30; }
.panel.petrol .value { color: #34d399; }

.panel.diesel { border-color: #1f2b3b; }
.panel.diesel .value { color: #60a5fa; }

.panel.ip { border-color: #3a3220; }
.panel.ip .value { color: #fbbf24; }

.panel.crude { border-color: #352e22; }
.panel.crude .value { color: #fbbf24; }

.panel.recovery { border-color: #312d42; }
.panel.recovery .value { color: #a78bfa; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255,255,255,0.04);
  color: #aab3c2;
}
.badge.up { color: #86efac; background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.20); }
.badge.down { color: #fca5a5; background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.20); }

.chart-wrap {
  margin-top: 18px;
}
.chart-title {
  font-size: 14px;
  font-weight: 700;
  color: #cfd5e0;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: #c7cdd8;
  font-weight: 600;
}
.chip .dot { width: 8px; height: 8px; border-radius: 999px; }

.section-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 26px 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.filter-btn {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #1d2231;
  background: #131720;
  color: #c8cdd8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.filter-btn.active {
  background: #1b2435;
  border-color: #2a394f;
}
.filter-btn.accent {
  border-color: #2a394f;
  background: #1b2435;
}
.custom-range {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.range-input {
  width: 88px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid #1d2231;
  background: #131720;
  color: #c8cdd8;
  font-size: 13px;
  font-weight: 600;
  outline: none;
}
.range-input:focus {
  border-color: #2a394f;
}

.usd-row {
  margin-top: 22px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid #1d2231;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.usd-row .note {
  color: #8a93a3;
  font-size: 12px;
  margin-top: 4px;
}

.loader {
  display: grid;
  place-items: center;
  height: 180px;
  color: #8a93a3;
  font-size: 14px;
}

.empty {
  color: #8a93a3;
  padding: 14px 0;
  font-weight: 600;
}
