:root {
  --bg: #eef3f8;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;

  --navy: #07111f;
  --navy-2: #102033;
  --navy-3: #182a40;

  --text: #122033;
  --muted: #68788d;
  --muted-2: #8996a8;

  --line: #dce4ed;
  --line-soft: #edf1f5;

  --green: #087a55;
  --green-bg: #e9f8f2;

  --amber: #9d6209;
  --amber-bg: #fff5df;

  --red: #b42318;
  --red-bg: #feeeee;

  --blue: #2463a9;
  --blue-soft: #edf4fc;

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 22px;

  --shadow-sm:
    0 1px 2px rgba(16, 24, 40, .03),
    0 3px 10px rgba(16, 24, 40, .035);

  --shadow:
    0 2px 4px rgba(16, 24, 40, .035),
    0 10px 28px rgba(16, 24, 40, .055);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(
      180deg,
      #f5f8fb 0,
      var(--bg) 270px
    );
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button,
select,
input {
  font: inherit;
}

/* =========================
   HEADER
========================= */

.topbar {
  background:
    linear-gradient(
      135deg,
      var(--navy) 0%,
      #0b192a 100%
    );

  color: white;

  padding:
    calc(20px + env(safe-area-inset-top))
    max(18px, calc((100vw - 1440px) / 2))
    22px;

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

  border-bottom:
    1px solid rgba(255,255,255,.05);
}

.eyebrow {
  font-size: 10px;
  letter-spacing: .18em;
  opacity: .58;
  font-weight: 800;
}

h1 {
  margin: 5px 0 3px;

  font-size:
    clamp(29px, 3vw, 39px);

  line-height: 1;

  letter-spacing: -.035em;
}

.subtitle {
  color: #aebacc;
  font-size: 13px;
}

.refresh-button {
  min-height: 44px;

  border:
    1px solid rgba(255,255,255,.14);

  border-radius: 12px;

  background:
    rgba(255,255,255,.07);

  color: white;

  padding: 0 18px;

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

  cursor: pointer;

  transition:
    background .15s ease,
    transform .15s ease;
}

.refresh-button:hover {
  background:
    rgba(255,255,255,.13);
}

.refresh-button:active {
  transform: scale(.97);
}

/* =========================
   NAV
========================= */

.tabs {
  position: sticky;
  top: 0;
  z-index: 20;

  display: flex;
  overflow-x: auto;

  gap: 4px;

  padding:
    7px
    max(12px, calc((100vw - 1440px) / 2));

  background:
    rgba(255,255,255,.92);

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

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  min-height: 42px;

  border: 0;

  background: transparent;

  color: var(--muted);

  padding: 0 15px;

  border-radius: 10px;

  white-space: nowrap;

  cursor: pointer;

  font-size: 13px;
  font-weight: 650;

  transition:
    color .15s ease,
    background .15s ease;
}

.tab:hover {
  color: var(--navy);
  background: #f2f5f8;
}

.tab.active {
  color: var(--navy);
  background: #e9eef4;
  font-weight: 800;
}

/* =========================
   PAGE
========================= */

main {
  width: min(1440px, 100%);

  margin: 0 auto;

  padding:
    24px
    clamp(14px, 2.6vw, 34px)
    72px;
}

.updated-row {
  display: flex;
  justify-content: space-between;
  align-items: center;

  min-height: 32px;

  margin:
    0
    2px
    14px;

  color: var(--muted);

  font-size: 12px;
}

/* =========================
   BADGES
========================= */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 27px;

  border-radius: 999px;

  padding: 0 10px;

  background: #edf1f6;

  color: var(--muted);

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

.badge.good {
  color: var(--green);
  background: var(--green-bg);
}

.badge.warn {
  color: var(--amber);
  background: var(--amber-bg);
}

.badge.bad {
  color: var(--red);
  background: var(--red-bg);
}

/* =========================
   KPI
========================= */

.kpi-grid {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 14px;
}

.kpi-card {
  position: relative;
  overflow: hidden;

  min-width: 0;
  min-height: 148px;

  background:
    linear-gradient(
      180deg,
      #ffffff 0%,
      #fbfcfe 100%
    );

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

  border-radius:
    var(--radius-lg);

  padding: 20px;

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

.kpi-card::after {
  content: "";

  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  height: 3px;

  background:
    linear-gradient(
      90deg,
      transparent,
      #d9e4ef,
      transparent
    );

  opacity: .7;
}

.kpi-label {
  color: var(--muted);

  font-size: 10px;

  font-weight: 850;

  letter-spacing: .105em;

  text-transform: uppercase;
}

.kpi-price {
  margin: 13px 0 8px;

  font-size:
    clamp(31px, 3.4vw, 47px);

  line-height: .95;

  letter-spacing: -.055em;

  font-weight: 860;

  color: var(--navy);
}

.kpi-price.target-hit {
  color: var(--green);
}

.kpi-meta {
  max-width: 320px;

  color: var(--muted);

  font-size: 12px;

  line-height: 1.45;
}

.status-text {
  font-size:
    clamp(25px, 2.3vw, 34px);

  letter-spacing: -.035em;
}

/* =========================
   PANELS
========================= */

.panel {
  margin-top: 18px;

  background:
    var(--surface);

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

  border-radius:
    var(--radius-lg);

  padding:
    22px;

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

.section-heading {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 14px;

  min-height: 48px;

  margin-bottom: 10px;
}

.section-kicker {
  color: var(--blue);

  font-size: 9px;

  font-weight: 900;

  letter-spacing: .15em;
}

h2 {
  margin: 3px 0 0;

  color: var(--navy);

  font-size: 22px;

  letter-spacing: -.025em;
}

.text-button {
  min-height: 42px;

  border: 0;

  border-radius: 10px;

  background: transparent;

  color: var(--blue);

  padding: 0 10px;

  font-size: 12px;

  font-weight: 800;

  cursor: pointer;
}

.text-button:hover {
  background: var(--blue-soft);
}

/* =========================
   DEALS
========================= */

.deal-list {
  display: grid;
  gap: 8px;
}

.deal-card {
  position: relative;

  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    auto;

  gap: 18px;

  align-items: center;

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

  border-radius:
    14px;

  background:
    #fff;

  padding:
    15px 16px;

  transition:
    border .15s ease,
    background .15s ease,
    transform .15s ease;
}

.deal-card:hover {
  border-color: #cad5e1;
  background: #fbfcfe;
}

.deal-card.hit {
  border-color: #96d9c3;

  background:
    linear-gradient(
      90deg,
      #f3fff9,
      #fff
    );
}

.deal-dates {
  color: var(--navy);

  font-size: 16px;

  font-weight: 820;

  letter-spacing: -.015em;
}

.deal-meta {
  margin-top: 5px;

  color: var(--muted);

  font-size: 11px;

  line-height: 1.55;
}

.deal-right {
  display: flex;

  align-items: center;

  justify-content: flex-end;

  gap: 18px;
}

.price {
  min-width: 82px;

  color: var(--navy);

  text-align: right;

  font-size: 25px;

  line-height: 1;

  font-weight: 870;

  letter-spacing: -.05em;
}

.price.hit {
  color: var(--green);
}

.book-button {
  min-width: 78px;
  min-height: 42px;

  display: inline-flex;

  justify-content: center;
  align-items: center;

  border-radius: 11px;

  background:
    var(--navy);

  color: white;

  padding: 0 15px;

  text-decoration: none;

  font-size: 11px;

  font-weight: 850;

  letter-spacing: .03em;

  box-shadow:
    0 2px 6px rgba(7,17,31,.14);

  transition:
    background .15s ease,
    transform .15s ease;
}

.book-button:hover {
  background: var(--navy-3);
}

.book-button:active {
  transform: scale(.97);
}

.book-button.disabled {
  background: #c9d1dc;
  color: #69788a;
  box-shadow: none;
  pointer-events: none;
}

/* =========================
   FILTERS
========================= */

.filters {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 12px;

  margin-bottom: 18px;

  padding: 14px;

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

  border-radius: 14px;

  background: var(--surface-soft);
}

.filters label {
  color: var(--muted);

  font-size: 10px;

  font-weight: 800;

  letter-spacing: .03em;
}

select,
input {
  width: 100%;

  min-height: 43px;

  margin-top: 6px;

  border:
    1px solid #d7e0e9;

  border-radius: 10px;

  background: white;

  color: var(--text);

  padding: 0 11px;

  outline: none;

  transition:
    border .15s ease,
    box-shadow .15s ease;
}

select:focus,
input:focus {
  border-color: #97bce6;

  box-shadow:
    0 0 0 3px rgba(36,99,169,.08);
}

/* =========================
   CHART
========================= */

.chart {
  min-height: 300px;

  display: flex;

  align-items: center;

  justify-content: center;

  overflow: hidden;

  margin-top: 4px;

  border-radius: 14px;

  background:
    linear-gradient(
      180deg,
      #fbfcfe,
      #fff
    );
}

.chart svg {
  width: 100%;
  height: auto;

  max-height: 300px;
}

.chart-line {
  fill: none;

  stroke: var(--blue);

  stroke-width: 3;

  stroke-linecap: round;

  stroke-linejoin: round;
}

.chart-dot {
  fill: white;

  stroke: var(--blue);

  stroke-width: 2;
}

.chart-grid {
  stroke: #e6ebf1;

  stroke-width: 1;
}

.chart-label {
  fill: #7c8a9d;

  font-size: 11px;
}

/* =========================
   SOURCE HEALTH
========================= */

.source-row {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    auto;

  gap: 18px;

  align-items: center;

  min-height: 64px;

  padding: 13px 4px;

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

.source-row:last-child {
  border-bottom: 0;
}

.source-name {
  color: var(--navy);

  font-weight: 820;
}

.source-meta {
  margin-top: 4px;

  color: var(--muted);

  font-size: 11px;
}

/* =========================
   STATES
========================= */

.empty {
  padding: 38px 12px;

  text-align: center;

  color: var(--muted);

  font-size: 13px;
}

.state-message {
  padding: 50px 20px;

  text-align: center;

  color: var(--muted);
}

.state-message.error {
  color: var(--red);
}

.hidden {
  display: none !important;
}

.view {
  display: none;
}

.active-view {
  display: block;
}

/* =========================
   DESKTOP TABLE-LIKE VIEW
========================= */

@media (min-width: 900px) {

  .deal-list.desktop-table {
    display: block;
  }

  .deal-list.desktop-table
  .deal-card {
    grid-template-columns:
      minmax(240px, 1.4fr)
      minmax(180px, .9fr);

    min-height: 72px;

    border-left: 0;
    border-right: 0;
    border-bottom: 0;

    border-radius: 0;

    padding:
      14px
      4px;

    background: transparent;
  }

  .deal-list.desktop-table
  .deal-card:first-child {
    border-top: 0;
  }

  .deal-list.desktop-table
  .deal-card:hover {
    background: #fafbfd;
  }

  .deal-list.desktop-table
  .deal-right {
    justify-content: flex-end;
  }

}

/* =========================
   TABLET
========================= */

@media (max-width: 1000px) {

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

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

}

/* =========================
   MOBILE
========================= */

@media (max-width: 640px) {

  body {
    background: #f1f5f9;
  }

  .topbar {
    padding:
      calc(16px + env(safe-area-inset-top))
      16px
      17px;

    align-items: flex-end;
  }

  h1 {
    font-size: 29px;
  }

  .subtitle {
    font-size: 11px;
  }

  .refresh-button {
    min-width: 74px;

    padding: 0 12px;

    font-size: 12px;
  }

  .tabs {
    padding:
      6px
      8px;
  }

  .tab {
    padding:
      0
      12px;

    font-size: 12px;
  }

  main {
    padding:
      14px
      10px
      45px;
  }

  .updated-row {
    margin:
      0
      3px
      10px;
  }

  .kpi-grid {
    grid-template-columns:
      1fr 1fr;

    gap: 8px;
  }

  .kpi-card {
    min-height: 133px;

    padding: 15px;

    border-radius: 16px;
  }

  .kpi-label {
    font-size: 9px;
  }

  .kpi-price {
    margin:
      10px
      0
      7px;

    font-size:
      clamp(27px, 9vw, 36px);
  }

  .kpi-meta {
    font-size: 10px;
  }

  .status-text {
    font-size: 23px;
  }

  .panel {
    margin-top: 10px;

    padding:
      15px;

    border-radius: 16px;
  }

  .section-heading {
    margin-bottom: 8px;
  }

  h2 {
    font-size: 19px;
  }

  .filters {
    grid-template-columns:
      1fr 1fr;

    gap: 9px;

    padding: 10px;

    margin-bottom: 12px;
  }

  .deal-list {
    gap: 8px;
  }

  .deal-card {
    padding:
      13px;

    gap: 10px;
  }

  .deal-dates {
    font-size: 15px;
  }

  .deal-meta {
    font-size: 10px;
  }

  .deal-right {
    flex-direction: column;

    gap: 9px;

    align-items: flex-end;
  }

  .price {
    min-width: 0;

    font-size: 23px;
  }

  .book-button {
    min-width: 72px;
    min-height: 40px;

    font-size: 10px;
  }

  .chart {
    min-height: 230px;
  }

}

/* =========================
   VERY SMALL PHONE
========================= */

@media (max-width: 390px) {

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

  .kpi-card {
    min-height: auto;
  }

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

}


/* ==========================================================
   FLIGHTWATCHER VISUAL UPGRADE
   Frontend only — no backend/data changes
   ========================================================== */

:root {
  --accent-blue: #2563eb;
  --accent-cyan: #0891b2;
  --accent-green: #059669;
  --accent-amber: #d97706;
  --accent-purple: #7c3aed;
  --accent-rose: #e11d48;

  --blue-tint: #eff6ff;
  --cyan-tint: #ecfeff;
  --green-tint: #ecfdf5;
  --amber-tint: #fffbeb;
  --purple-tint: #f5f3ff;
  --rose-tint: #fff1f2;
}


/* ---------- PAGE BACKGROUND ---------- */

body {
  background:
    radial-gradient(
      circle at 10% 0%,
      rgba(37, 99, 235, .08),
      transparent 28%
    ),
    radial-gradient(
      circle at 92% 8%,
      rgba(8, 145, 178, .07),
      transparent 24%
    ),
    linear-gradient(
      180deg,
      #f8fafc 0,
      #eef3f8 310px,
      #edf2f7 100%
    );
}


/* ---------- HEADER ---------- */

.topbar {
  position: relative;
  overflow: hidden;

  background:
    linear-gradient(
      125deg,
      #06111f 0%,
      #0b1d35 52%,
      #102a43 100%
    );

  box-shadow:
    0 10px 30px rgba(7, 17, 31, .13);
}

.topbar::before {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  right: -130px;
  top: -210px;
  border-radius: 999px;

  background:
    radial-gradient(
      circle,
      rgba(56, 189, 248, .16),
      rgba(56, 189, 248, 0) 68%
    );

  pointer-events: none;
}

.topbar::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  left: 28%;
  bottom: -230px;
  border-radius: 999px;

  background:
    radial-gradient(
      circle,
      rgba(99, 102, 241, .12),
      transparent 70%
    );

  pointer-events: none;
}

.topbar > * {
  position: relative;
  z-index: 1;
}

.refresh-button {
  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,.13),
      rgba(255,255,255,.06)
    );

  box-shadow:
    inset 0 1px rgba(255,255,255,.08),
    0 5px 14px rgba(0,0,0,.08);
}

.refresh-button:hover {
  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,.20),
      rgba(255,255,255,.10)
    );

  transform: translateY(-1px);
}


/* ---------- TABS ---------- */

.tabs {
  box-shadow:
    0 4px 18px rgba(16,24,40,.045);
}

.tab {
  position: relative;
}

.tab.active {
  color: #174ea6;

  background:
    linear-gradient(
      180deg,
      #eff6ff,
      #e8f1fc
    );

  box-shadow:
    inset 0 0 0 1px rgba(37,99,235,.07);
}

.tab.active::after {
  content: "";

  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 3px;

  height: 2px;

  border-radius: 999px;

  background:
    linear-gradient(
      90deg,
      var(--accent-blue),
      var(--accent-cyan)
    );
}


/* ---------- KPI CARDS ---------- */

.kpi-card {
  cursor: pointer;

  border-color:
    rgba(203, 213, 225, .82);

  box-shadow:
    0 2px 4px rgba(15,23,42,.03),
    0 12px 30px rgba(15,23,42,.045);

  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease;
}

.kpi-card:hover {
  transform: translateY(-3px);

  box-shadow:
    0 7px 17px rgba(15,23,42,.06),
    0 18px 38px rgba(15,23,42,.075);
}

.kpi-card:active {
  transform: translateY(-1px) scale(.995);
}

/* first KPI */
.kpi-card:nth-child(1) {
  background:
    radial-gradient(
      circle at 100% 0,
      rgba(37,99,235,.12),
      transparent 44%
    ),
    linear-gradient(
      145deg,
      #ffffff,
      #f5f9ff
    );

  border-color:
    rgba(59,130,246,.20);
}

.kpi-card:nth-child(1)::after {
  background:
    linear-gradient(
      90deg,
      #2563eb,
      #38bdf8
    );
}

/* second KPI */
.kpi-card:nth-child(2) {
  background:
    radial-gradient(
      circle at 100% 0,
      rgba(124,58,237,.10),
      transparent 44%
    ),
    linear-gradient(
      145deg,
      #ffffff,
      #faf7ff
    );

  border-color:
    rgba(124,58,237,.18);
}

.kpi-card:nth-child(2)::after {
  background:
    linear-gradient(
      90deg,
      #7c3aed,
      #c084fc
    );
}

/* third KPI */
.kpi-card:nth-child(3) {
  background:
    radial-gradient(
      circle at 100% 0,
      rgba(5,150,105,.10),
      transparent 44%
    ),
    linear-gradient(
      145deg,
      #ffffff,
      #f4fcf9
    );

  border-color:
    rgba(5,150,105,.17);
}

.kpi-card:nth-child(3)::after {
  background:
    linear-gradient(
      90deg,
      #059669,
      #34d399
    );
}

/* fourth KPI */
.kpi-card:nth-child(4) {
  background:
    radial-gradient(
      circle at 100% 0,
      rgba(217,119,6,.11),
      transparent 44%
    ),
    linear-gradient(
      145deg,
      #ffffff,
      #fffaf2
    );

  border-color:
    rgba(217,119,6,.17);
}

.kpi-card:nth-child(4)::after {
  background:
    linear-gradient(
      90deg,
      #d97706,
      #fbbf24
    );
}

.kpi-price {
  text-shadow:
    0 1px rgba(255,255,255,.7);
}


/* ---------- PANELS ---------- */

.panel {
  border-color:
    rgba(203,213,225,.78);

  box-shadow:
    0 3px 8px rgba(15,23,42,.025),
    0 15px 42px rgba(15,23,42,.045);

  transition:
    box-shadow .18s ease;
}

.panel:hover {
  box-shadow:
    0 5px 14px rgba(15,23,42,.035),
    0 20px 48px rgba(15,23,42,.055);
}

.section-kicker {
  display: inline-flex;
  align-items: center;

  min-height: 22px;

  padding: 0 8px;

  border-radius: 999px;

  background: var(--blue-tint);

  color: var(--accent-blue);

  letter-spacing: .12em;
}


/* ---------- DEAL CARDS ---------- */

.deal-list {
  gap: 10px;
}

.deal-card {
  overflow: hidden;

  cursor: pointer;

  background:
    linear-gradient(
      135deg,
      #ffffff 0%,
      #fbfdff 100%
    );

  border:
    1px solid rgba(203,213,225,.75);

  border-radius: 16px;

  box-shadow:
    0 2px 5px rgba(15,23,42,.025);

  transition:
    transform .16s ease,
    box-shadow .16s ease,
    border-color .16s ease,
    background .16s ease;
}

.deal-card::before {
  content: "";

  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;

  width: 3px;

  border-radius:
    0 4px 4px 0;

  background:
    linear-gradient(
      180deg,
      #2563eb,
      #38bdf8
    );

  opacity: .72;
}

.deal-card:hover {
  transform: translateY(-2px);

  border-color:
    rgba(96,165,250,.44);

  background:
    linear-gradient(
      135deg,
      #ffffff,
      #f7fbff
    );

  box-shadow:
    0 7px 16px rgba(15,23,42,.045),
    0 14px 34px rgba(15,23,42,.055);
}

.deal-card:active {
  transform: translateY(0) scale(.998);
}

.deal-card.hit {
  border-color:
    rgba(16,185,129,.42);

  background:
    radial-gradient(
      circle at 0 50%,
      rgba(16,185,129,.10),
      transparent 32%
    ),
    linear-gradient(
      90deg,
      #f1fff9,
      #ffffff
    );
}

.deal-card.hit::before {
  background:
    linear-gradient(
      180deg,
      #059669,
      #34d399
    );

  opacity: 1;
}

.deal-dates {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.deal-dates::before {
  content: "✈";

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 27px;
  height: 27px;

  border-radius: 9px;

  background:
    linear-gradient(
      135deg,
      #eaf3ff,
      #eef9ff
    );

  color: var(--accent-blue);

  font-size: 13px;
}

.deal-meta {
  color: #64748b;
}

.deal-meta strong {
  color: #334155;
}

.price {
  position: relative;

  padding: 8px 10px;

  border-radius: 12px;

  background:
    linear-gradient(
      135deg,
      #f8fafc,
      #f1f5f9
    );
}

.price.hit {
  background:
    linear-gradient(
      135deg,
      #ecfdf5,
      #dff9ef
    );
}

.book-button {
  position: relative;
  overflow: hidden;

  background:
    linear-gradient(
      135deg,
      #0b1728,
      #19324e
    );

  box-shadow:
    0 5px 14px rgba(7,17,31,.16);
}

.book-button::after {
  content: "→";

  margin-left: 6px;

  transition:
    transform .15s ease;
}

.book-button:hover::after {
  transform: translateX(2px);
}

.book-button:hover {
  background:
    linear-gradient(
      135deg,
      #16345a,
      #24517e
    );

  transform: translateY(-1px);
}


/* ---------- SOURCE-LIKE META PILLS ---------- */

.deal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 7px;
  align-items: center;
}

.deal-meta > span,
.deal-meta .source-pill {
  display: inline-flex;
  align-items: center;
}


/* ---------- SOURCE HEALTH ---------- */

.source-row {
  position: relative;

  margin-bottom: 8px;

  padding:
    14px 16px;

  border:
    1px solid rgba(203,213,225,.70);

  border-radius: 14px;

  background:
    linear-gradient(
      135deg,
      #ffffff,
      #fbfcfe
    );

  cursor: default;

  transition:
    transform .15s ease,
    border-color .15s ease,
    box-shadow .15s ease;
}

.source-row:hover {
  transform: translateY(-1px);

  border-color:
    rgba(96,165,250,.34);

  box-shadow:
    0 6px 16px rgba(15,23,42,.045);
}

.source-row:last-child {
  border-bottom:
    1px solid rgba(203,213,225,.70);
}

.source-name {
  display: flex;
  align-items: center;
  gap: 9px;
}

.source-name::before {
  content: "";

  width: 9px;
  height: 9px;

  border-radius: 999px;

  background:
    linear-gradient(
      135deg,
      #22c55e,
      #10b981
    );

  box-shadow:
    0 0 0 4px rgba(16,185,129,.09);
}


/* ---------- FILTERS ---------- */

.filters {
  border:
    1px solid rgba(203,213,225,.7);

  background:
    linear-gradient(
      135deg,
      #f8fafc,
      #f3f7fb
    );
}

select,
input {
  box-shadow:
    0 1px 2px rgba(15,23,42,.025);
}

select:hover,
input:hover {
  border-color:
    #b9c8da;
}


/* ---------- CHART ---------- */

.chart {
  border:
    1px solid rgba(226,232,240,.8);

  background:
    radial-gradient(
      circle at 100% 0,
      rgba(59,130,246,.055),
      transparent 32%
    ),
    linear-gradient(
      180deg,
      #fbfdff,
      #ffffff
    );

  box-shadow:
    inset 0 1px rgba(255,255,255,.8);
}

.chart-line {
  stroke:
    var(--accent-blue);

  stroke-width: 3.5;
}

.chart-dot {
  stroke:
    var(--accent-blue);

  fill:
    #ffffff;

  stroke-width: 2.4;
}


/* ---------- BADGES ---------- */

.badge {
  border:
    1px solid rgba(148,163,184,.12);
}

.badge.good {
  box-shadow:
    inset 0 0 0 1px rgba(5,150,105,.06);
}

.badge.warn {
  box-shadow:
    inset 0 0 0 1px rgba(217,119,6,.06);
}


/* ---------- CLICKABILITY ---------- */

.deal-card[data-clickable="true"] {
  cursor: pointer;
}

.deal-card[data-clickable="true"]:focus-visible,
.kpi-card:focus-visible {
  outline:
    3px solid rgba(59,130,246,.26);

  outline-offset: 2px;
}


/* ---------- SMALL ANIMATION ---------- */

@keyframes fwFadeUp {
  from {
    opacity: 0;
    transform: translateY(7px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.active-view .panel,
.active-view .kpi-card {
  animation:
    fwFadeUp .22s ease both;
}

.active-view .kpi-card:nth-child(2) {
  animation-delay: .025s;
}

.active-view .kpi-card:nth-child(3) {
  animation-delay: .05s;
}

.active-view .kpi-card:nth-child(4) {
  animation-delay: .075s;
}


/* ---------- MOBILE ---------- */

@media (max-width: 640px) {

  main {
    padding-left: 9px;
    padding-right: 9px;
  }

  .kpi-card:hover {
    transform: none;
  }

  .deal-card {
    border-radius: 15px;

    padding:
      14px 13px 14px 15px;
  }

  .deal-card::before {
    top: 10px;
    bottom: 10px;
  }

  .deal-dates::before {
    width: 25px;
    height: 25px;

    border-radius: 8px;
  }

  .price {
    padding:
      6px 8px;
  }

  .source-row {
    padding:
      13px;
  }

}


/* ---------- REDUCED MOTION ---------- */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }

}
