/* ============================================
   COMPONENTS — Reusable UI pieces
   ============================================ */

/* ============================================
   INTRO — Full-screen cinematic overlay
   ============================================ */

.intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0f1a;
  transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center center;
}

.intro--zoom {
  transform: scale(12);
  opacity: 0;
  pointer-events: none;
}

.intro--hidden {
  display: none;
}

.intro__text {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 5vw, 3rem);
  font-weight: var(--font-weight-bold);
  color: #ffffff;
  text-align: center;
  line-height: var(--line-height-tight);
  max-width: 700px;
  padding: 0 var(--space-lg);
}

.intro__text .intro__word {
  display: inline-block;
  margin-right: 0.3em;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.intro__text .intro__word--visible {
  opacity: 1;
  transform: translateY(0);
}

.intro__text .intro__word--highlight {
  color: var(--color-primary-light);
}

/* ============================================
   HOME PAGE — Why / Features / How sections
   ============================================ */

.home-section {
  margin-bottom: var(--space-3xl);
}
.home-section__title {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}
.home-section__sub {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
}

/* Why I built this */
.home-why {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: var(--space-2xl);
  align-items: start;
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-sm);
}
.home-why__title {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-lg);
}
.home-why__body {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-md);
}
.home-why__body:last-child { margin-bottom: 0; }
.home-why__stat-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  border-left: var(--border-width) solid var(--color-border);
  padding-left: var(--space-2xl);
}
.home-why__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.home-why__stat-val {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  line-height: 1;
}
.home-why__stat-lbl {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Feature cards */
.home-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
.home-feat-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-xl);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
}
.home-feat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--color-primary-light);
}
.home-feat-card__icon { font-size: 1.8rem; line-height: 1; }
.home-feat-card__title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}
.home-feat-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
}

/* About section */
.home-about {
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
}
img.home-about__avatar {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  border-radius: var(--radius-full);
  object-fit: cover;
  object-position: top;
  border: 3px solid var(--color-border);
}
.home-about__name {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}
.home-about__role {
  font-size: var(--text-sm);
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}
.home-about__bio {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
}
@media (max-width: 600px) {
  .home-about { flex-direction: column; align-items: center; text-align: center; }
}

/* How it works steps */
.home-how {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}
.home-how__step {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-xl);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
}
.home-how__num {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
}
.home-how__step-title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}
.home-how__step-body {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
}

@media (max-width: 900px) {
  .home-why { grid-template-columns: 1fr; }
  .home-why__stat-col { flex-direction: row; flex-wrap: wrap; border-left: none; border-top: var(--border-width) solid var(--color-border); padding-left: 0; padding-top: var(--space-xl); }
  .home-features { grid-template-columns: repeat(2, 1fr); }
  .home-how { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .home-features { grid-template-columns: 1fr; }
}

/* ============================================
   HERO — Landing section after intro
   ============================================ */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 55vh;
  padding: var(--space-3xl) var(--space-lg);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 8% 4% 8%;
  background-image:
    linear-gradient(to right, rgba(0, 200, 232, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 200, 232, 0.05) 1px, transparent 1px);
  background-size: 70px 70px;
  border-radius: var(--radius-lg);
  opacity: 0.22;
  pointer-events: none;
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 12% 6% 12%;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 360' preserveAspectRatio='none'%3E%3Cpath d='M0 284 L120 258 L220 270 L330 206 L430 228 L530 176 L640 194 L740 138 L840 160 L940 102 L1000 114' fill='none' stroke='%2300c8e8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' opacity='0.52'/%3E%3Cpath d='M0 305 L110 292 L210 300 L310 254 L410 266 L510 232 L620 246 L720 214 L820 224 L920 182 L1000 190' fill='none' stroke='%236ea8fe' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' opacity='0.45'/%3E%3C/svg%3E");
  opacity: 0.28;
  pointer-events: none;
  z-index: -1;
}

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

.hero__title {
  font-size: clamp(2rem, 5vw, var(--text-4xl));
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-lg);
  opacity: 0;
  transition: opacity 0.5s ease 0.2s;
}

.hero--visible .hero__title { opacity: 1; }

.hero__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
  opacity: 0;
  transition: opacity 0.5s ease 0.4s;
}

.hero--visible .hero__subtitle { opacity: 1; }

.hero__cta {
  padding: var(--space-md) var(--space-2xl);
  font-size: var(--text-base);
  opacity: 0;
  transition: opacity 0.5s ease 0.6s;
}

.hero--visible .hero__cta { opacity: 1; }

@media (max-width: 768px) {
  .hero {
    min-height: 45vh;
    padding: var(--space-2xl) var(--space-md);
  }

  .hero::before {
    background-size: 54px 54px;
    opacity: 0.18;
  }

  .hero::after {
    inset: 16% 4% 14%;
    opacity: 0.22;
  }
}

/* ---- Cards ---- */
.card {
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-md), 0 0 24px rgba(0,200,232,0.1);
  border-color: rgba(0,200,232,0.3);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  border: var(--border-width) solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  box-shadow: 0 0 16px rgba(0,200,232,0.35);
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  box-shadow: 0 0 28px rgba(0,200,232,0.55);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--outline:hover {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

/* ---- Section ---- */
.section {
  margin-bottom: var(--space-2xl);
}

.section__title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-md);
}

/* ---- Grid helpers ---- */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
}

/* ---- Stat / KPI box ---- */
.stat {
  text-align: center;
  padding: var(--space-lg);
}

.stat__value {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

.stat__label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

/* ---- Badge / Tag ---- */
.badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

/* ---- Job growth delta badge ---- */
.delta {
  font-weight: var(--font-weight-semibold);
  font-variant-numeric: tabular-nums;
}
.delta--up   { color: var(--color-success); }
.delta--down { color: var(--color-error); }
.delta--flat { color: var(--color-text-muted); }

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

/* KPI row */
.ins-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

/* Section */
.ins-section {
  margin-bottom: var(--space-2xl);
}
.ins-section__title {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}
.ins-section__sub {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

/* Callout cards */
.ins-callouts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
}
.ins-callout {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: var(--border-width) solid var(--color-border);
  background: var(--color-surface);
}
.ins-callout--info    { border-left: 4px solid var(--color-primary); }
.ins-callout--success { border-left: 4px solid var(--color-success); }
.ins-callout--warning { border-left: 4px solid #f59e0b; }
.ins-callout__icon { font-size: 1.6rem; flex-shrink: 0; line-height: 1; }
.ins-callout__body { display: flex; flex-direction: column; gap: var(--space-xs); }
.ins-callout__title {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}
.ins-callout__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
}

/* Momentum split */
.ins-momentum {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}
.ins-momentum__half {
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}
.ins-momentum__label {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: var(--border-width) solid var(--color-border);
}
.ins-momentum__label--hot  { color: var(--color-success); }
.ins-momentum__label--cold { color: var(--color-error); }
.ins-mrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  border-bottom: var(--border-width) solid var(--color-border);
  gap: var(--space-sm);
}
.ins-mrow:last-child { border-bottom: none; }
.ins-mrow__info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-width: 0;
}
.ins-mrow__name {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  text-transform: capitalize;
  white-space: nowrap;
}

/* Salary bars */
.ins-salary-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}
.ins-sbar { display: flex; flex-direction: column; gap: var(--space-xs); }
.ins-sbar__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ins-sbar__name {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  text-transform: capitalize;
}
.ins-sbar__val {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
}
.ins-sbar__track {
  height: 10px;
  background: var(--color-bg);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: var(--border-width) solid var(--color-border);
}
.ins-sbar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

/* Category chart */
.ins-chart-wrap {
  padding: var(--space-xl);
  height: 300px;
}

/* LinkedIn grid */
.ins-li-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-lg);
}
.ins-li-card {
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.ins-li-card__rank {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ins-li-card__name {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  text-transform: capitalize;
}
.ins-li-card__bar-wrap {
  height: 6px;
  background: var(--color-bg);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: var(--border-width) solid var(--color-border);
}
.ins-li-card__bar {
  height: 100%;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}
.ins-li-card__val {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
}
.ins-empty {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding: var(--space-md) 0;
}

@media (max-width: 900px) {
  .ins-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .ins-momentum { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .ins-kpi-row { grid-template-columns: 1fr 1fr; }
  .ins-callouts { grid-template-columns: 1fr; }
  .ins-li-grid  { grid-template-columns: 1fr; }
}

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


/* Toolbar */
.rk-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
  padding: var(--space-lg) var(--space-xl);
  margin-bottom: var(--space-xl);
}
.rk-toolbar__group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
}
.rk-toolbar__label {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  white-space: nowrap;
}
.rk-metric-btns,
.rk-cat-btns {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* Podium */
.rk-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
  min-height: 220px;
}
.rk-podium__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 180px;
}
.rk-podium__medal {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}
.rk-podium__card {
  width: 100%;
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}
.rk-podium__card--first {
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px #fef3c7, var(--shadow-md);
}
.rk-podium__name {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  text-transform: capitalize;
}
.rk-podium__value {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}
.rk-podium__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
/* Podium stand blocks */
.rk-podium__block {
  width: 100%;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.rk-podium__block--1 { height: 72px; background: #f59e0b; }
.rk-podium__block--2 { height: 48px; background: #94a3b8; }
.rk-podium__block--3 { height: 32px; background: #b45309; }

/* Ranked list */
.rk-list-wrap {
  padding: var(--space-lg) var(--space-xl);
}
.rk-list-header {
  display: grid;
  grid-template-columns: 2.5rem 1fr 7rem 180px;
  align-items: center;
  gap: var(--space-md);
  padding: 0 var(--space-sm) var(--space-md);
  border-bottom: var(--border-width) solid var(--color-border);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}
.rk-row {
  display: grid;
  grid-template-columns: 2.5rem 1fr 7rem 180px;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-sm);
  border-bottom: var(--border-width) solid var(--color-border);
  transition: background var(--transition-fast);
}
.rk-row:last-child { border-bottom: none; }
.rk-row:hover { background: var(--color-bg); }
.rk-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  background: var(--color-bg);
  color: var(--color-text-muted);
  border: var(--border-width) solid var(--color-border);
}
.rk-rank--gold   { background: #fef3c7; color: #92400e; border-color: #f59e0b; }
.rk-rank--silver { background: #f1f5f9; color: #475569; border-color: #94a3b8; }
.rk-rank--bronze { background: #fff7ed; color: #9a3412; border-color: #b45309; }
.rk-row__info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  min-width: 0;
}
.rk-row__name {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  text-transform: capitalize;
  white-space: nowrap;
}
.rk-row__value {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  text-align: right;
  white-space: nowrap;
}
.rk-bar-wrap {
  height: 8px;
  background: var(--color-bg);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: var(--border-width) solid var(--color-border);
}
.rk-bar {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}
.rk-empty {
  padding: var(--space-xl);
  text-align: center;
  color: var(--color-text-muted);
}

@media (max-width: 640px) {
  .rk-podium { flex-wrap: wrap; align-items: stretch; }
  .rk-podium__item { flex: 0 0 140px; }
  .rk-podium__block { display: none; }
  .rk-list-header,
  .rk-row { grid-template-columns: 2rem 1fr 5rem; }
  .rk-list-header :last-child,
  .rk-row .rk-bar-wrap { display: none; }
}

/* ============================================
   FILTERS PAGE — Power Filter
   ============================================ */

/* Summary bar */
.fl-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}
.fl-summary__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  flex: 1;
}
.fl-summary__right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  white-space: nowrap;
}
.fl-result-count {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: var(--font-weight-medium);
}
.fl-active-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px var(--space-md);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  background: rgba(37,99,235,0.08);
  color: var(--color-primary);
  border: var(--border-width) solid rgba(37,99,235,0.25);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.fl-active-chip:hover {
  background: rgba(37,99,235,0.16);
}
.fl-reset-btn {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.fl-reset-btn:hover {
  border-color: var(--color-error);
  color: var(--color-error);
}

/* Layout */
.fl-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-xl);
  align-items: start;
}

/* Filter panel */
.fl-panel {
  padding: var(--space-xl);
  position: sticky;
  top: calc(var(--nav-height) + var(--space-lg));
  max-height: calc(100vh - var(--nav-height) - var(--space-xl));
  overflow-y: auto;
}
.fl-panel__title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-xl);
}
.fl-group__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  margin-bottom: var(--space-md);
}
.fl-group__toggle:hover .fl-group__label {
  color: var(--color-primary);
}
.fl-group__chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--color-text-muted);
  border-bottom: 2px solid var(--color-text-muted);
  transform: rotate(45deg);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}
.fl-group__toggle[aria-expanded="true"] .fl-group__chevron {
  transform: rotate(225deg);
  border-color: var(--color-primary);
}
.fl-group__body[hidden] {
  display: none;
}
.fl-group {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: var(--border-width) solid var(--color-border);
}
.fl-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.fl-group__label {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

/* Checkboxes */
.fl-checkboxes {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.fl-check {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-text);
  cursor: pointer;
}
.fl-check input { accent-color: var(--color-primary); cursor: pointer; }

/* Dual range slider */
.fl-range-wrap { display: flex; flex-direction: column; gap: var(--space-sm); }
.fl-range-track {
  position: relative;
  height: 6px;
  background: var(--color-bg);
  border-radius: var(--radius-full);
  border: var(--border-width) solid var(--color-border);
  margin: 12px 0;
}
.fl-range-fill {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  pointer-events: none;
}
.fl-range {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;
  margin: 0;
}
.fl-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  cursor: pointer;
  pointer-events: all;
  transition: transform var(--transition-fast);
}
.fl-range::-webkit-slider-thumb:hover { transform: scale(1.15); }
.fl-range::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  cursor: pointer;
  pointer-events: all;
}
.fl-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Radios */
.fl-radios {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.fl-radio {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-text);
  cursor: pointer;
}
.fl-radio input { accent-color: var(--color-primary); cursor: pointer; }

/* Sort select */
.fl-select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}
.fl-select:focus { outline: none; border-color: var(--color-primary); }

/* Results */
.fl-results { min-width: 0; }
.fl-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-lg);
}
.fl-card {
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}
.fl-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.fl-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}
.fl-card__name {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  text-transform: capitalize;
}
.fl-card__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: var(--border-width) solid var(--color-border);
}
.fl-card__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fl-card__stat-val {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}
.fl-card__stat-lbl {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.fl-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-3xl);
  color: var(--color-text-muted);
  font-size: var(--text-base);
}
.fl-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-3xl);
  color: var(--color-text-muted);
}

@media (max-width: 900px) {
  .fl-layout { grid-template-columns: 1fr; }
  .fl-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }
}
@media (max-width: 480px) {
  .fl-cards { grid-template-columns: 1fr; }
}

/* ============================================
   TREND PAGE — Job Role Trends
   ============================================ */


/* Toolbar */
.tr-toolbar {
  margin-bottom: var(--space-xl);
}
.tr-toolbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-lg);
}
.tr-sort-btns {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.tr-search-wrap {
  flex: 1 1 200px;
  max-width: 280px;
}

/* Cards grid */
.tr-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.tr-loading, .tr-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-3xl);
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

/* Role card */
.tr-card {
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  cursor: pointer;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.tr-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.tr-card:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Trend colour variants — left border accent */
.tr-trend--hot      { border-left: 4px solid #f59e0b; }
.tr-trend--rising   { border-left: 4px solid var(--color-success); }
.tr-trend--stable   { border-left: 4px solid var(--color-primary); }
.tr-trend--declining{ border-left: 4px solid var(--color-error); }

.tr-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tr-card__icon { font-size: 1.5rem; line-height: 1; }
.tr-card__title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}
.tr-card__desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
  flex: 1;
}

/* Trend badge */
.tr-badge {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  padding: 2px var(--space-sm);
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.tr-trend--hot      .tr-badge { background: #fef3c7; color: #92400e; }
.tr-trend--rising   .tr-badge { background: #dcfce7; color: #166534; }
.tr-trend--stable   .tr-badge { background: #dbeafe; color: #1d4ed8; }
.tr-trend--declining.tr-badge { background: #fee2e2; color: #991b1b; }

/* Mini sparkbar */
.tr-spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 44px;
  margin: var(--space-xs) 0;
}
.tr-spark__bar {
  flex: 1;
  background: var(--color-primary-light);
  border-radius: 2px 2px 0 0;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
  min-height: 2px;
}
.tr-card:hover .tr-spark__bar { opacity: 1; }

/* Card stats row */
.tr-card__stats {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-xs);
  padding-top: var(--space-sm);
  border-top: var(--border-width) solid var(--color-border);
}
.tr-card__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.tr-card__stat-val {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
}
.tr-card__stat-lbl {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Detail panel */
.tr-detail {
  margin-bottom: var(--space-2xl);
  scroll-margin-top: calc(var(--nav-height) + var(--space-lg));
}
.tr-detail__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}
.tr-detail__title {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-bold);
}
.tr-detail__subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}
.tr-detail-kpis {
  margin-bottom: var(--space-xl);
}
.tr-detail__chart-wrap {
  position: relative;
  height: 340px;
  margin-bottom: var(--space-xl);
}

/* Driving skills */
.tr-skills-section__title {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}
.tr-skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.tr-skill-pill {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-bg-alt);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
}
.tr-skill-pill__name {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  text-transform: capitalize;
}
.tr-skill-pill__jobs { color: var(--color-text-muted); }
.tr-skill-pill__growth { font-weight: var(--font-weight-semibold); }

@media (max-width: 768px) {
  .tr-cards-grid { grid-template-columns: 1fr; }
  .tr-toolbar__inner { flex-direction: column; align-items: stretch; }
  .tr-search-wrap { max-width: none; }
  .tr-detail__header { flex-direction: column; }
  .tr-detail__chart-wrap { height: 260px; }
}

/* ---- Job growth delta badge ---- */
/* ============================================
   FORECASTING PAGE
   ============================================ */

/* Controls card */
.fc-controls {
  margin-bottom: var(--space-xl);
}

.fc-controls__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-xl);
}

.fc-control-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.fc-control-group--slider {
  flex: 1 1 280px;
}

.fc-label {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
}

.fc-select {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-base);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  min-width: 180px;
  transition: border-color var(--transition-fast);
}

.fc-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

/* Slider */
.fc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: linear-gradient(
    to right,
    var(--color-primary) 0%,
    var(--color-primary) calc(var(--val, 100%) * 1%),
    var(--color-border) calc(var(--val, 100%) * 1%),
    var(--color-border) 100%
  );
  outline: none;
  cursor: pointer;
}

.fc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.fc-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.fc-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.fc-slider-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-xs);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* KPI row */
.fc-kpi-row {
  margin-bottom: var(--space-xl);
}

/* Chart card */
.fc-chart-card {
  margin-bottom: var(--space-xl);
}

.fc-chart-wrap {
  position: relative;
  height: 360px;
  margin-top: var(--space-md);
}

.fc-chart-legend {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}

.fc-legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.fc-legend-item::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 3px;
  border-radius: 2px;
}

.fc-legend-item--history::before  { background: rgba(37,99,235,0.7); height: 10px; border-radius: 3px; }
.fc-legend-item--forecast::before { background: rgba(6,182,212,0.9); }
.fc-legend-item--horizon::before  { background: rgba(245,158,11,1); border-radius: 50%; width: 10px; height: 10px; }

/* Table card */
.fc-table-card {
  margin-bottom: var(--space-xl);
}

/* Horizon row highlight */
.fc-row--horizon {
  background: rgba(245, 158, 11, 0.06) !important;
  font-weight: var(--font-weight-medium);
}

.fc-horizon-badge {
  display: inline-block;
  padding: 1px var(--space-sm);
  font-size: var(--text-xs);
  background: rgba(245,158,11,0.15);
  color: #92400e;
  border-radius: var(--radius-full);
  margin-left: var(--space-xs);
  font-weight: var(--font-weight-semibold);
  vertical-align: middle;
}

@media (max-width: 768px) {
  .fc-controls__row { flex-direction: column; }
  .fc-chart-wrap { height: 260px; }
}

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

/* KPI skeleton loader */
.db-kpi-skeleton {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.db-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  display: inline-block;
  animation: db-spin 0.7s linear infinite;
}

@keyframes db-spin {
  to { transform: rotate(360deg); }
}

/* Chart cards */
.db-chart-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.db-chart-card__title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.db-chart-wrap {
  position: relative;
  height: 300px;
}

.db-chart-wrap--doughnut {
  height: 320px;
}

.db-chart-wrap--wt {
  height: 420px;
}

.db-chart-card--full {
  grid-column: 1 / -1;
}

/* Work type cells in data table */
.wt-cell--remote { color: #10b981; }
.wt-cell--hybrid  { color: #f59e0b; }
.wt-cell--onsite  { color: #3b82f6; }

/* Work type row on filter cards */
.fl-card__wt {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border-top: var(--border-width) solid var(--color-border);
  font-size: var(--text-xs);
}
.fl-card__wt-item {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-semibold);
}
.fl-card__wt-item--remote { background: rgba(16,185,129,0.15); color: #10b981; }
.fl-card__wt-item--hybrid  { background: rgba(245,158, 11,0.15); color: #f59e0b; }
.fl-card__wt-item--onsite  { background: rgba(37, 99,235,0.15);  color: #6ea8fe; }

/* Charts responsive */
@media (max-width: 768px) {
  .db-charts-row {
    grid-template-columns: 1fr;
  }
  .db-chart-wrap { height: 260px; }
  .db-chart-wrap--doughnut { height: 280px; }
}

/* Top-5 table header */
.db-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

/* Small outline button variant */
.btn--sm {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-xs);
}

/* ============================================
   DATA PAGE — view toggle (segmented control)
   ============================================ */

.data-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 4px;
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

.data-view-btn {
  padding: var(--space-sm) var(--space-xl);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
  line-height: 1.5;
}

.data-view-btn:hover:not(.data-view-btn--active) {
  color: var(--color-primary);
  background: rgba(37, 99, 235, 0.06);
}

.data-view-btn--active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

/* ============================================
   DATA PAGE — toolbar, table, chips
   ============================================ */

/* ---- Toolbar ---- */
.data-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  padding: var(--space-lg) var(--space-xl);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.data-toolbar__search {
  flex: 1 1 280px;
  position: relative;
}

.data-toolbar__search::before {
  content: '\1F50D';
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--text-sm);
  opacity: 0.45;
  pointer-events: none;
}

.data-input {
  width: 100%;
  padding: var(--space-sm) var(--space-md) var(--space-sm) 2.4rem;
  font-size: var(--text-base);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-bg);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  height: 2.75rem;
}

.data-input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-surface);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.data-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  flex: 1 1 auto;
  justify-content: flex-end;
}

/* ---- Category chips ---- */
.data-chip {
  padding: var(--space-sm) var(--space-xl);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-bg);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.data-chip:hover {
  border-color: var(--color-primary-light);
  color: var(--color-primary);
  background: rgba(37, 99, 235, 0.06);
}

.data-chip--active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

/* ---- Year filter bar ---- */
.data-year-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  padding: var(--space-md) var(--space-xl);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.data-year-bar__label {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  margin-right: var(--space-xs);
  white-space: nowrap;
}

/* ---- Table wrapper ---- */
.data-table-wrap {
  overflow-x: auto;
  padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-lg);
}

.data-source-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--color-bg);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 4px;
  margin-bottom: var(--space-md);
}

.data-source-btn {
  padding: var(--space-xs) var(--space-lg);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
}

.data-source-btn:hover:not(.data-source-btn--active) {
  color: var(--color-primary);
  background: rgba(37, 99, 235, 0.08);
}

.data-source-btn--active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.data-col--hidden {
  display: none !important;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--text-xs);
}

.data-table__th {
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.7rem;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
  user-select: none;
}

.data-table__th:first-child,
.data-table td:first-child {
  padding-left: var(--space-lg);
}

.data-table__th.sortable {
  cursor: pointer;
}

.data-table__th.sortable:hover {
  color: var(--color-primary);
}

.sort-icon::after {
  content: '⇅';
  margin-left: var(--space-xs);
  font-size: var(--text-xs);
  opacity: 0.4;
}

.data-table__th.sort-asc .sort-icon::after {
  content: '↑';
  opacity: 1;
  color: var(--color-primary);
}

.data-table__th.sort-desc .sort-icon::after {
  content: '↓';
  opacity: 1;
  color: var(--color-primary);
}

.data-table td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: var(--border-width) solid var(--color-border);
  vertical-align: middle;
  line-height: var(--line-height-normal);
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.04);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table__loading {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

.data-table__count {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: var(--border-width) solid var(--color-border);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: right;
}

/* Category badge colors inside the table */
.cat-badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.cat-badge--language     { background: rgba(0,200,232,0.12);   color: #67e8f9; }
.cat-badge--framework    { background: rgba(129,140,248,0.12); color: #a5b4fc; }
.cat-badge--cloud-devops { background: rgba(52,211,153,0.12);  color: #6ee7b7; }
.cat-badge--database     { background: rgba(251,191,36,0.12);  color: #fde68a; }
.cat-badge--specialty    { background: rgba(167,139,250,0.12); color: #c4b5fd; }

/* ---- No-results row ---- */
.data-table__empty {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  color: var(--color-text-muted);
  font-style: italic;
  font-size: var(--text-base);
}

/* ---- Sticky skill column ---- */
.data-table .skill-name {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  position: sticky;
  left: 0;
  background: var(--color-surface);
  z-index: 1;
  min-width: 110px;
}
.data-table tbody tr:hover .skill-name {
  background: color-mix(in srgb, var(--color-surface) 96%, var(--color-primary));
}

/* ---- Column group header row ---- */
.data-table__group-row th {
  padding: var(--space-xs) var(--space-md);
  font-size: 0.62rem;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: none;
  background: var(--color-bg);
}
.data-table__group {
  text-align: center;
  color: var(--color-text-muted);
  opacity: 0.6;
}
.data-table__group--adzuna  { color: #60a5fa; opacity: 1; border-bottom: 2px solid rgba(96,165,250,0.35) !important; }
.data-table__group--linkedin { color: #a5b4fc; opacity: 1; border-bottom: 2px solid rgba(165,180,252,0.35) !important; }
.data-table__group--meta    { color: var(--color-text-muted); border-bottom: 2px solid var(--color-border) !important; }

/* ---- Column source tinting ---- */
td[data-col="adzuna"] {
  background: rgba(96, 165, 250, 0.06);
}

td[data-col="linkedin"] {
  background: rgba(165, 180, 252, 0.06);
}

.data-table tbody tr:hover td[data-col="adzuna"] {
  background: rgba(96, 165, 250, 0.12);
}

.data-table tbody tr:hover td[data-col="linkedin"] {
  background: rgba(165, 180, 252, 0.12);
}

.data-table .skill-name[data-col="base"] {
  background: var(--color-surface);
}

.data-table tbody tr:hover .skill-name[data-col="base"] {
  background: color-mix(in srgb, var(--color-surface) 96%, var(--color-primary));
}

/* ---- col widths ---- */
.col-skill    { width: 110px; }
.col-category { width: 110px; }
.col-num      { width: 90px; }
.col-wt       { width: 160px; }
.col-date     { width: 100px; }

/* ---- Work type mini bar ---- */
.wt-bar {
  display: flex;
  height: 6px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--color-border);
  margin-bottom: 4px;
  min-width: 100px;
}
.wt-bar__seg { height: 100%; transition: width 0.3s; }
.wt-bar__seg--remote { background: #34d399; }
.wt-bar__seg--hybrid { background: #fbbf24; }
.wt-bar__seg--onsite { background: #60a5fa; }
.wt-bar__labels { display: flex; gap: 6px; font-size: 0.62rem; font-variant-numeric: tabular-nums; }
.wt-lbl--remote { color: #34d399; }
.wt-lbl--hybrid { color: #fbbf24; }
.wt-lbl--onsite { color: #60a5fa; }
.wt-bar__none { color: var(--color-text-muted); font-size: var(--text-xs); }
td.wt-cell { vertical-align: middle; padding-top: var(--space-sm); padding-bottom: var(--space-sm); }

/* ---- Salary styling ---- */
.data-table .salary {
  font-weight: var(--font-weight-medium);
  color: var(--color-success);
}

/* ---- Job count styling ---- */
.data-table .job-count {
  font-variant-numeric: tabular-nums;
  font-weight: var(--font-weight-medium);
}

@media (max-width: 768px) {
  .data-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-md);
  }

  .data-source-tabs {
    width: 100%;
    justify-content: space-between;
  }

  .data-source-btn {
    flex: 1 1 0;
    text-align: center;
    padding-inline: var(--space-md);
  }

  .data-table-wrap {
    padding: var(--space-md);
  }

  .data-table__th,
  .data-table td {
    padding: var(--space-sm) var(--space-md);
  }
}
