/*──────────────────────────────────────────────────────────
  Brilliant Jobs — Tailwind Input (Phase 1)
  Build: npx tailwindcss -i src/input.css -o styles.css
  
  Phase 1: Tailwind base utilities available + existing CSS
  intact. Class names preserved exactly. Zero visual diff.
  
  Future phases will migrate classes into @layer components
  once content paths include all HTML/JS files.
──────────────────────────────────────────────────────────*/

*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

/*! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com*/

/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box;
  /* 1 */
  border-width: 0;
  /* 2 */
  border-style: solid;
  /* 2 */
  border-color: currentColor;
  /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5;
  /* 1 */
  -webkit-text-size-adjust: 100%;
  /* 2 */
  -moz-tab-size: 4;
  /* 3 */
  -o-tab-size: 4;
     tab-size: 4;
  /* 3 */
  font-family: 'Outfit', -apple-system, sans-serif;
  /* 4 */
  font-feature-settings: normal;
  /* 5 */
  font-variation-settings: normal;
  /* 6 */
  -webkit-tap-highlight-color: transparent;
  /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0;
  /* 1 */
  line-height: inherit;
  /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0;
  /* 1 */
  color: inherit;
  /* 2 */
  border-top-width: 1px;
  /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

a {
  color: inherit;
  text-decoration: inherit;
}

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: 'JetBrains Mono', monospace;
  /* 1 */
  font-feature-settings: normal;
  /* 2 */
  font-variation-settings: normal;
  /* 3 */
  font-size: 1em;
  /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0;
  /* 1 */
  border-color: inherit;
  /* 2 */
  border-collapse: collapse;
  /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  /* 1 */
  font-feature-settings: inherit;
  /* 1 */
  font-variation-settings: inherit;
  /* 1 */
  font-size: 100%;
  /* 1 */
  font-weight: inherit;
  /* 1 */
  line-height: inherit;
  /* 1 */
  letter-spacing: inherit;
  /* 1 */
  color: inherit;
  /* 1 */
  margin: 0;
  /* 2 */
  padding: 0;
  /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button;
  /* 1 */
  background-color: transparent;
  /* 2 */
  background-image: none;
  /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield;
  /* 1 */
  outline-offset: -2px;
  /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button;
  /* 1 */
  font: inherit;
  /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/

dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/

:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  /* 1 */
  vertical-align: middle;
  /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */

[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}

.container {
  width: 100%;
}

@media (min-width: 640px) {
  .container {
    max-width: 640px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}

@media (min-width: 1536px) {
  .container {
    max-width: 1536px;
  }
}

.visible {
  visibility: visible;
}

.collapse {
  visibility: collapse;
}

.block {
  display: block;
}

.inline {
  display: inline;
}

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.table {
  display: table;
}

.grid {
  display: grid;
}

.hidden {
  display: none;
}

.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.border {
  border-width: 1px;
}

.blur {
  --tw-blur: blur(8px);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

/* ── Self-hosted fonts (latin subset, variable) ── */

@font-face {
  font-family: 'Outfit';

  src: url('/fonts/outfit-latin-var.woff2') format('woff2');

  font-weight: 100 900;

  font-style: normal;

  font-display: swap;

  unicode-range: U+0000-00FF, U+0100-024F, U+2000-206F, U+20AC, U+2212, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';

  src: url('/fonts/jetbrains-mono-latin-var.woff2') format('woff2');

  font-weight: 100 800;

  font-style: normal;

  font-display: swap;

  unicode-range: U+0000-00FF, U+0100-024F, U+2000-206F, U+20AC, U+2212, U+FEFF, U+FFFD;
}

/* ── Existing styles (unlayered = never purged) ── */

:root {
  --bg-main: #f5f6fa;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  --bg-input: #f0f1f5;
  --bg-hover: #eef0f6;
  --border: #e2e4ed;
  --border-hover: #cdd0de;
  --text: #1a1d2e;
  --text-dim: #5c6277;
  --text-faint: #9298ae;
  --accent: #3d7eff;
  --accent-hover: #2b6aeb;
  --accent-hsl: 217, 91%, 60%;
  --accent-glow: hsla(var(--accent-hsl), 0.10);
  --green: #22c55e;
  --green-hsl: 142, 71%, 45%;
  --green-dim: hsla(var(--green-hsl), 0.10);
  --warm: #f59e0b;
  --warm-hsl: 38, 92%, 50%;
  --warm-dim: hsla(var(--warm-hsl), 0.10);
  --red: #ef4444;
  --red-hsl: 0, 84%, 60%;
  --red-dim: hsla(var(--red-hsl), 0.08);
  --purple: #8b5cf6;
  --purple-hsl: 258, 90%, 66%;
  --purple-dim: hsla(var(--purple-hsl), 0.10);
  --pink: #ec4899;
  --pink-hsl: 330, 81%, 60%;
  --pink-dim: hsla(var(--pink-hsl), 0.08);
  --indigo: #6366f1;
  --indigo-hsl: 239, 84%, 67%;
  --indigo-dim: hsla(var(--indigo-hsl), 0.08);
  --slate-hsl: 215, 20%, 65%;
  --purple-lt-hsl: 271, 91%, 65%;
  --nav-bg: #1a3a6e;
  --nav-bg-hover: #224b8a;
  --nav-bg-active: rgba(255,255,255,0.12);
  --nav-text: rgba(255,255,255,0.65);
  --nav-text-active: #ffffff;
  --sans: 'Outfit', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --nav-w: 240px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--sans);
  background: var(--bg-main);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  height: 100vh;
  overflow: hidden;
}

.app {
  display: flex;
  min-height: 100vh;
}

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

.nav {
  width: var(--nav-w);
  background: var(--nav-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  bottom: 0;
  z-index: 100;
}

.nav-brand {
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-block-end: 1px solid rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
}

.nav-brand .mark {
  width: 30px;
  height: 30px;
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--nav-bg);
  flex-shrink: 0;
}

.nav-brand-text h1 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.nav-brand-text span {
  font-size: 11px;
  color: var(--nav-text);
  font-weight: 400;
}

/* Sparkle flourish */

.sparkle {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, rgba(255,255,255,0) 70%);
  opacity: 0;
  animation-fill-mode: forwards;
}

.sparkle.s1 {
  width: 4px;
  height: 4px;
  top: 8px;
  inset-inline-start: 18px;
  animation: sparkPop 0.6s 0.3s ease-out forwards;
}

.sparkle.s2 {
  width: 3px;
  height: 3px;
  top: 28px;
  inset-inline-start: 50px;
  animation: sparkPop 0.5s 0.5s ease-out forwards;
}

.sparkle.s3 {
  width: 5px;
  height: 5px;
  top: 12px;
  inset-inline-start: 90px;
  animation: sparkPop 0.7s 0.7s ease-out forwards;
}

.sparkle.s4 {
  width: 3px;
  height: 3px;
  top: 36px;
  inset-inline-start: 130px;
  animation: sparkPop 0.5s 0.4s ease-out forwards;
}

.sparkle.s5 {
  width: 4px;
  height: 4px;
  top: 6px;
  inset-inline-start: 155px;
  animation: sparkPop 0.6s 0.8s ease-out forwards;
}

.sparkle.s6 {
  width: 3px;
  height: 3px;
  top: 22px;
  inset-inline-start: 110px;
  animation: sparkPop 0.5s 0.6s ease-out forwards;
}

.sparkle.s7 {
  width: 6px;
  height: 6px;
  top: 18px;
  inset-inline-start: 68px;
  animation: sparkPop 0.8s 0.35s ease-out forwards;
}

.sparkle.s8 {
  width: 3px;
  height: 3px;
  top: 40px;
  inset-inline-start: 35px;
  animation: sparkPop 0.5s 0.9s ease-out forwards;
}

.sparkle-star {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  animation-fill-mode: forwards;
  color: #fff;
  font-size: 10px;
  line-height: 1;
}

.sparkle-star.st1 {
  top: 4px;
  inset-inline-start: 42px;
  animation: starPop 0.8s 0.25s ease-out forwards;
}

.sparkle-star.st2 {
  top: 32px;
  inset-inline-start: 100px;
  animation: starPop 0.7s 0.55s ease-out forwards;
}

.sparkle-star.st3 {
  top: 10px;
  inset-inline-start: 140px;
  animation: starPop 0.9s 0.75s ease-out forwards;
}

/* Shimmer sweep across the text */

.nav-brand.sparkle-active .nav-brand-text h1 {
  background: linear-gradient(90deg, #fff 0%, #fff 40%, #a7d8ff 50%, #fff 60%, #fff 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerSweep 1.2s 0.2s ease-in-out forwards;
}

@keyframes sparkPop {
  0% {
    opacity: 0;
    transform: scale(0);
  }

  30% {
    opacity: 1;
    transform: scale(1.8);
  }

  60% {
    opacity: 0.8;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(0.3);
  }
}

@keyframes starPop {
  0% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }

  25% {
    opacity: 1;
    transform: scale(1.3) rotate(15deg);
  }

  50% {
    opacity: 0.9;
    transform: scale(1) rotate(-5deg);
  }

  100% {
    opacity: 0;
    transform: scale(0.2) rotate(30deg);
  }
}

@keyframes shimmerSweep {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.nav-menu {
  flex: 1;
  padding: 16px 12px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 12px 14px 6px;
  margin-block-start: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--nav-text);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
  margin-block-end: 2px;
}

.nav-item:hover {
  background: var(--nav-bg-hover);
  color: rgba(255,255,255,0.85);
}

.nav-item.active {
  background: var(--nav-bg-active);
  color: var(--nav-text-active);
  font-weight: 600;
}

.nav-item.tab-flash {
  position: relative;
  overflow: visible;
}

.nav-item.tab-flash span {
  background: linear-gradient(90deg, #fff 0%, #fff 40%, #a7d8ff 50%, #fff 60%, #fff 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerSweep 0.8s ease-in-out forwards;
}

.nav-item.tab-flash .nav-icon {
  animation: tabIconPop 0.4s ease-out;
}

.tab-sparkle {
  position: absolute;
  border-radius: 50%;
  background: #ffd700;
  pointer-events: none;
  opacity: 0;
  animation: sparkPop 0.6s ease-out forwards;
}

.tab-star {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  color: #ffd700;
  font-size: 10px;
  animation: starPop 0.7s ease-out forwards;
}

@keyframes tabIconPop {
  0% {
    transform: scale(1.3);
  }

  50% {
    transform: scale(0.95);
  }

  100% {
    transform: scale(1);
  }
}

.ext-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  margin-inline-start: auto;
  flex-shrink: 0;
  transition: background 0.3s;
}

.ext-status-dot.connected {
  background: var(--green);
}

.ext-status-dot.warning {
  background: #f59e0b;
}

.ext-status-dot.stale {
  background: var(--red);
}

.nav-icon {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

.nav-badge {
  margin-inline-start: auto;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 8px;
}

.nav-footer {
  padding: 16px;
  border-block-start: 1px solid rgba(255,255,255,0.08);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.nav-user-info {
  flex: 1;
  overflow: hidden;
}

.nav-user-email {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-user-plan {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.btn-logout {
  width: 100%;
  margin-block-start: 10px;
  padding: 7px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.5);
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  transition: all 0.15s;
}

.btn-logout:hover {
  border-color: rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.8);
}

/* ======================== MAIN ======================== */

.main {
  flex: 1;
  margin-inline-start: var(--nav-w);
  height: 100vh;
  overflow-y: auto;
}

.page-header {
  padding: 28px 40px 20px;
  border-block-end: 1px solid var(--border);
  background: var(--bg-white);
}

.page-header h2 {
  font-size: clamp(18px, 1.8vw + 0.5rem, 22px);
  font-weight: 700;
  margin-block-end: 2px;
}

.page-header p {
  font-size: 13px;
  color: var(--text-dim);
}

.page-how-link {
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  margin-inline-start: 8px;
  white-space: nowrap;
}

.page-how-link:hover {
  text-decoration: underline;
}

.page-body {
  padding: 28px 40px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

/* ======================== SHARED ======================== */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-block-end: 20px;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  margin-block-end: 4px;
}

.card-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-block-end: 16px;
}

.card-flush {
  padding: 0;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-primary:disabled {
  background: var(--bg-input);
  color: var(--text-faint);
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-dim);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 12px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 15px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}

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

.badge-warm {
  background: var(--warm-dim);
  color: var(--warm);
}

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

.badge-blue {
  background: var(--accent-glow);
  color: var(--accent);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-block-end: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}

.stat-val {
  font-size: clamp(20px, 2.2vw + 0.5rem, 28px);
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: -1px;
  color: var(--text);
}

.stat-label {
  font-size: 11px;
  color: var(--text-faint);
  margin-block-start: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-faint);
}

.empty-state h3 {
  font-size: 16px;
  color: var(--text-dim);
  margin-block-end: 8px;
}

.empty-state p {
  font-size: 13px;
  max-width: 400px;
  margin: 0 auto 20px;
  line-height: 1.5;
}

/* ======================== SETUP ======================== */

.download-box {
  background: var(--bg-white);
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 40px 32px;
  text-align: center;
  margin: 20px 0;
}

.download-box h3 {
  font-size: clamp(15px, 1.2vw + 0.5rem, 18px);
  font-weight: 700;
  margin-block-end: 8px;
}

.download-box p {
  font-size: 13px;
  color: var(--text-dim);
  margin-block-end: 24px;
  max-width: 440px;
  margin-inline-start: auto;
  margin-inline-end: auto;
  line-height: 1.5;
}

.download-status {
  font-size: 12px;
  color: var(--text-faint);
  margin-block-start: 14px;
}

.install-steps {
  counter-reset: step;
}

.install-step {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-block-end: 1px solid var(--border);
}

.install-step:last-child {
  border-block-end: none;
}

.step-num-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-glow);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 14px;
  font-weight: 600;
  margin-block-end: 3px;
}

.step-content p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

.step-content code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg-input);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}

.ext-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-block-end: 20px;
}

.ext-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ext-dot.on {
  background: var(--green);
  box-shadow: 0 0 8px hsla(var(--green-hsl), 0.5);
}

.ext-dot.off {
  background: var(--text-faint);
}

.setup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-faint);
}

.setup-dot.connected {
  background: var(--green);
  box-shadow: 0 0 8px hsla(var(--green-hsl), 0.5);
}

.instance-info {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.8;
}

.instance-info span {
  color: var(--accent);
}

/* ======================== JOBS ======================== */

/* Tag-based query builder — two rows */

.qb-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-block-end: 8px;
}

.qb-row-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-block-end: 8px;
}

.qb-row-pair .qb-row {
  margin-block-end: 0;
}

.qb-row-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 64px;
  min-width: 64px;
  padding-block-start: 13px;
  text-align: end;
  flex-shrink: 0;
}

.qb-row-label.not-label {
  color: #94a3b8;
}

.query-builder {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  cursor: text;
  transition: border-color 0.15s;
}

.query-builder:focus-within {
  border-color: var(--accent);
}

.query-builder .qb-input {
  flex: 1;
  min-width: 120px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  padding: 4px 0;
}

.query-builder .qb-input::-moz-placeholder {
  color: var(--text-faint);
}

.query-builder .qb-input::placeholder {
  color: var(--text-faint);
}

.qb-pill {
  display: inline-flex;
  align-items: center;
  background: var(--accent-glow);
  border: 1px solid hsla(var(--accent-hsl), 0.2);
  border-radius: 8px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  animation: pillIn 0.15s ease;
}

@keyframes pillIn {
  from{
    opacity:0;
    transform:scale(0.9)
  }

  to{
    opacity:1;
    transform:scale(1)
  }
}

.qb-pill-text {
  padding: 4px 8px;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.1s;
}

.qb-pill-text:hover {
  background: hsla(var(--accent-hsl), 0.08);
}

.qb-pill-remove {
  padding: 4px 6px;
  color: hsla(var(--accent-hsl), 0.5);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: all 0.1s;
  border-inline-start: 1px solid hsla(var(--accent-hsl), 0.15);
}

.qb-pill-remove:hover {
  background: var(--red-dim);
  color: var(--red);
}

.qb-pill.or-group {
  background: hsla(var(--purple-hsl), 0.08);
  border-color: hsla(var(--purple-hsl), 0.2);
}

.qb-pill.or-group .qb-pill-text {
  color: var(--purple);
}

.qb-pill.or-group .qb-pill-remove {
  color: hsla(var(--purple-hsl), 0.5);
  border-inline-start-color: hsla(var(--purple-hsl), 0.15);
}

.qb-pill.or-group .or-sep {
  color: hsla(var(--purple-hsl), 0.4);
  padding: 0 1px;
  font-size: 10px;
  font-weight: 700;
}

.qb-val-item {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  background: hsla(var(--purple-hsl), 0.06);
  border-radius: 3px;
  padding: 0 1px 0 2px;
}

.qb-val-item:hover {
  background: hsla(var(--purple-hsl), 0.12);
}

.qb-val-remove {
  font-size: 11px;
  cursor: pointer;
  color: hsla(var(--purple-hsl), 0.35);
  padding: 0 2px;
  line-height: 1;
  font-weight: 600;
  border-radius: 2px;
}

.qb-val-remove:hover {
  color: var(--red);
  background: hsla(var(--red-hsl), 0.1);
}

.not-pill .qb-val-item {
  background: hsla(var(--red-hsl), 0.06);
}

.not-pill .qb-val-remove {
  color: hsla(var(--red-hsl), 0.35);
}

.location-pill .qb-val-item {
  background: hsla(var(--warm-hsl), 0.06);
}

.location-pill .qb-val-remove {
  color: hsla(var(--warm-hsl), 0.35);
}

.qb-pill.salary-pill {
  background: hsla(var(--green-hsl), 0.08);
  border-color: hsla(var(--green-hsl), 0.2);
}

.qb-pill.salary-pill .qb-pill-text {
  color: var(--green);
}

.qb-pill.salary-pill .qb-pill-remove {
  color: hsla(var(--green-hsl), 0.4);
  border-inline-start-color: hsla(var(--green-hsl), 0.15);
}

.qb-pill.type-pill {
  background: hsla(var(--warm-hsl), 0.08);
  border-color: hsla(var(--warm-hsl), 0.2);
}

.qb-pill.type-pill .qb-pill-text {
  color: var(--warm);
}

.qb-pill.type-pill .qb-pill-remove {
  color: hsla(var(--warm-hsl), 0.4);
  border-inline-start-color: hsla(var(--warm-hsl), 0.15);
}

.qb-pill.location-pill {
  background: hsla(var(--warm-hsl), 0.08);
  border-color: hsla(var(--warm-hsl), 0.2);
}

.qb-pill.location-pill .qb-pill-text {
  color: #f59e0b;
}

.qb-pill.location-pill .qb-pill-remove {
  color: hsla(var(--warm-hsl), 0.4);
  border-inline-start-color: hsla(var(--warm-hsl), 0.15);
}

.qb-pill.location-pill .pill-radius {
  font-size: 10px;
  opacity: 0.7;
  margin-inline-start: 4px;
  font-weight: 400;
}

.qb-pill.when-pill {
  background: hsla(var(--purple-lt-hsl), 0.08);
  border-color: hsla(var(--purple-lt-hsl), 0.2);
}

.qb-pill.when-pill .qb-pill-text {
  color: var(--purple);
}

.qb-pill.when-pill .qb-pill-remove {
  color: hsla(var(--purple-lt-hsl), 0.4);
  border-inline-start-color: hsla(var(--purple-lt-hsl), 0.15);
}

.qb-pill.who-pill {
  background: hsla(var(--pink-hsl), 0.08);
  border-color: hsla(var(--pink-hsl), 0.2);
}

.qb-pill.who-pill .qb-pill-text {
  color: var(--pink);
}

.qb-pill.who-pill .qb-pill-remove {
  color: hsla(var(--pink-hsl), 0.4);
  border-inline-start-color: hsla(var(--pink-hsl), 0.15);
}

.qb-pill.collection-pill {
  background: hsla(var(--purple-hsl), 0.08);
  border-color: hsla(var(--purple-hsl), 0.25);
}

.qb-pill.collection-pill .qb-pill-text {
  color: var(--purple);
  cursor: pointer;
}

.qb-pill.collection-pill .qb-pill-text:hover {
  background: hsla(var(--purple-hsl), 0.12);
}

.qb-pill.collection-pill .qb-pill-remove {
  color: hsla(var(--purple-hsl), 0.4);
  border-inline-start-color: hsla(var(--purple-hsl), 0.15);
}

.qb-pill.collection-pill .coll-count {
  font-size: 9px;
  opacity: 0.7;
  margin-inline-start: 2px;
}

.browse-companies-btn {
  position: absolute;
  inset-inline-end: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 4px;
  background: hsla(var(--accent-hsl), 0.06);
  border: none;
  transition: all 0.15s;
  z-index: 2;
  letter-spacing: 0.2px;
  font-family: var(--sans);
}

.browse-companies-btn:hover {
  background: hsla(var(--accent-hsl), 0.14);
  color: var(--accent-hover);
}

/* Company Browser page */

/* Feedback button */

.feedback-btn {
  position: fixed;
  top: 16px;
  inset-inline-end: 20px;
  z-index: 200;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text-faint);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  font-family: var(--sans);
}

.feedback-btn:hover {
  background: var(--bg-hover);
  color: var(--accent);
  border-color: var(--accent);
}

#fb-upload-zone:hover, #fb-upload-zone.dragover {
  border-color: var(--accent);
  background: hsla(var(--accent-hsl), 0.04);
}

.fb-thumb {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.fb-thumb img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.fb-thumb-x {
  position: absolute;
  top: 2px;
  inset-inline-end: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
}

.feedback-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.5);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}

.feedback-overlay.open {
  display: flex;
}

.feedback-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  width: 460px;
  max-width: 92vw;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
  min-height: 640px;
  display: flex;
  flex-direction: column;
}

.feedback-modal h3 {
  font-size: clamp(15px, 1.2vw + 0.5rem, 18px);
  font-weight: 700;
  margin-block-end: 4px;
}

.feedback-modal .fb-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-block-end: 18px;
}

.feedback-modal label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-block-end: 5px;
}

.feedback-modal input, .feedback-modal textarea, .feedback-modal select {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text);
  outline: none;
  box-sizing: border-box;
  margin-block-end: 14px;
}

.feedback-modal input:focus, .feedback-modal textarea:focus, .feedback-modal select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.feedback-modal textarea {
  min-height: 100px;
  resize: vertical;
}

.feedback-modal select {
  -webkit-appearance: auto;
     -moz-appearance: auto;
          appearance: auto;
  cursor: pointer;
}

.feedback-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-block-start: auto;
  padding-block-start: 10px;
}

.feedback-actions button {
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--sans);
  border: none;
}

.fb-cancel {
  background: var(--bg-input);
  color: var(--text-dim);
  border: 1px solid var(--border) !important;
}

.fb-cancel:hover {
  background: var(--bg-hover);
}

.fb-submit {
  background: var(--accent);
  color: #fff;
}

.fb-submit:hover {
  filter: brightness(1.1);
}

.fb-submit:disabled {
  opacity: 0.4;
  cursor: default;
}

.fb-type-toggle {
  display: flex;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-block-end: 14px;
}

.fb-type-btn {
  flex: 1;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: var(--bg-input);
  color: var(--text-dim);
  border: none;
  font-family: var(--sans);
  transition: all 0.15s;
  text-align: center;
}

.fb-type-btn.active {
  background: var(--accent);
  color: #fff;
}

.fb-type-btn.bug.active {
  background: var(--red);
}

.fb-success {
  text-align: center;
  padding: 20px 0;
}

.fb-success .fb-check {
  font-size: 48px;
  margin-block-end: 12px;
}

.fb-success h4 {
  font-size: 16px;
  font-weight: 600;
  margin-block-end: 6px;
}

.fb-success p {
  font-size: 13px;
  color: var(--text-dim);
}

.cb-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-block-end: 16px;
  flex-wrap: wrap;
}

.cb-search {
  flex: 1;
  min-width: 200px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text);
  outline: none;
}

.cb-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.cb-mode-toggle {
  display: flex;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.cb-mode-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: var(--bg-input);
  color: var(--text-dim);
  border: none;
  font-family: var(--sans);
  transition: all 0.15s;
}

.cb-mode-btn.active {
  background: var(--accent);
  color: #fff;
}

.cb-save-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-block-end: 16px;
  padding: 10px 14px;
  border-radius: 8px;
  background: hsla(var(--purple-hsl), 0.06);
  border: 1px solid hsla(var(--purple-hsl), 0.15);
}

.cb-save-bar input {
  flex: 1;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-white);
  font-family: var(--sans);
  font-size: 13px;
}

.cb-save-btn {
  padding: 6px 16px;
  border-radius: 8px;
  background: var(--purple);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  font-family: var(--sans);
}

.cb-save-btn:hover {
  filter: brightness(1.1);
}

.cb-save-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.cb-selected-count {
  font-size: 12px;
  color: var(--purple);
  font-weight: 600;
  white-space: nowrap;
}

.cb-letter-group {
  margin-block-end: 20px;
}

.cb-letter {
  font-size: clamp(15px, 1.2vw + 0.5rem, 18px);
  font-weight: 700;
  color: var(--accent);
  padding: 4px 0 6px;
  border-block-end: 1px solid var(--border);
  margin-block-end: 8px;
  position: sticky;
  top: 0;
  background: var(--bg-main);
  z-index: 2;
}

.cb-company-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.1s;
  font-size: 13px;
}

.cb-company-row:hover {
  background: var(--bg-hover);
}

.cb-company-row .cb-name {
  flex: 1;
  font-weight: 500;
}

.cb-company-row .cb-jobs {
  font-size: 11px;
  color: var(--text-faint);
  white-space: nowrap;
}

.cb-company-row .cb-source-badge {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.cb-toggle {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  transition: all 0.15s;
}

.cb-toggle.included {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.cb-toggle.excluded {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.cb-alpha-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-block-end: 4px;
}

.cb-alpha-link {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.12s;
}

.cb-alpha-link:hover {
  background: var(--accent-glow);
}

.cb-alpha-link.active {
  background: var(--accent);
  color: #fff;
}

.cb-alpha-link.dim {
  color: var(--text-faint);
  opacity: 0.35;
  cursor: default;
}

.cb-alpha-link.dim:hover {
  background: none;
}

.cb-back-btn {
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  font-family: var(--sans);
}

.cb-back-btn:hover {
  background: var(--bg-hover);
}

.cb-list-container {
  max-height: 65vh;
  overflow-y: auto;
  padding-inline-end: 4px;
}

/* Collection edit popup */

.coll-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coll-popup {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 20px;
  max-width: 480px;
  width: 90%;
  max-height: 70vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.coll-popup h3 {
  font-size: 16px;
  margin-block-end: 12px;
}

.coll-popup .coll-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 13px;
}

.coll-popup .coll-item label {
  flex: 1;
  cursor: pointer;
}

.coll-popup-actions {
  display: flex;
  gap: 8px;
  margin-block-start: 14px;
  justify-content: flex-end;
}

.qb-pill.not-pill {
  background: hsla(var(--slate-hsl), 0.08);
  border-color: hsla(var(--slate-hsl), 0.25);
}

.qb-pill.not-pill .qb-pill-text {
  color: #94a3b8;
}

.qb-pill.not-pill .qb-pill-remove {
  color: hsla(var(--slate-hsl), 0.4);
  border-inline-start-color: hsla(var(--slate-hsl), 0.15);
}

.qb-pill.pay-pill {
  background: hsla(var(--green-hsl), 0.08);
  border-color: hsla(var(--green-hsl), 0.2);
}

.qb-pill.pay-pill .qb-pill-text {
  color: var(--green);
}

.qb-pill.pay-pill .qb-pill-remove {
  color: hsla(var(--green-hsl), 0.4);
  border-inline-start-color: hsla(var(--green-hsl), 0.15);
}

/* Collapsible query builder */

.qb-collapse-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.qb-collapse-header:hover {
  color: var(--text);
}

.qb-chevron {
  transition: transform 0.2s;
  flex-shrink: 0;
}

.qb-collapse-header.collapsed .qb-chevron {
  transform: rotate(-90deg);
}

.qb-collapse-body {
  transition: max-height 0.25s ease, opacity 0.2s ease;
  overflow: hidden;
}

.qb-collapse-body.collapsed {
  max-height: 0 !important;
  opacity: 0;
  pointer-events: none;
}

.qb-active-count {
  font-size: 10px;
  font-weight: 700;
  background: var(--accent);
  color: white;
  padding: 1px 7px;
  border-radius: 8px;
  display: none;
}

.sf-collapse-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.sf-collapse-header:hover {
  color: var(--text);
}

.sf-collapse-header.collapsed .qb-chevron {
  transform: rotate(-90deg);
}

.sf-collapse-body {
  transition: max-height 0.25s ease, opacity 0.2s ease;
  overflow: hidden;
}

.sf-collapse-body.collapsed {
  max-height: 0 !important;
  opacity: 0;
  pointer-events: none;
}

.sf-active-count {
  font-size: 10px;
  font-weight: 700;
  background: var(--green);
  color: white;
  padding: 2px 8px;
  border-radius: 8px;
  margin-inline-start: 4px;
}

/* Salary min/max fields */

.qb-salary-row {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.qb-salary-field {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  flex: 1;
  min-height: 44px;
  transition: border-color 0.15s;
}

.qb-salary-field:focus-within {
  border-color: var(--accent);
}

.qb-salary-prefix {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-faint);
  margin-inline-end: 4px;
  flex-shrink: 0;
}

.qb-salary-input {
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text);
  font-family: var(--mono);
  outline: none;
  width: 100%;
}

.qb-salary-input::-moz-placeholder {
  color: var(--text-faint);
  font-family: var(--sans);
  font-size: 13px;
}

.qb-salary-input::placeholder {
  color: var(--text-faint);
  font-family: var(--sans);
  font-size: 13px;
}

.qb-salary-sep {
  color: var(--text-faint);
  font-size: 16px;
  flex-shrink: 0;
}

.sf-item {
  gap: 8px;
}

.sf-item-check {
  flex-shrink: 0;
  margin: 0;
  cursor: pointer;
}

.sf-item-counts {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  background: var(--bg-input);
  border-radius: 8px;
  padding: 4px 8px;
}

.sf-count {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-align: center;
  min-width: 42px;
}

.sf-count-today {
  background: var(--bg-input);
  color: var(--text-dim);
}

.sf-count-week {
  background: var(--bg-input);
  color: var(--text-dim);
}

.sf-count-month {
  background: var(--bg-input);
  color: var(--text-dim);
}

.qb-and {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 2px;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.filter-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-block-end: 8px;
  flex-wrap: wrap;
}

.filter-toolbar .btn {
  padding: 6px 12px;
  font-size: 11px;
}

.filter-count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  margin-inline-start: auto;
}

.save-filter-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.save-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
}

.save-filter-name {
  padding: 5px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 12px;
  outline: none;
  width: 180px;
}

.save-filter-name:focus {
  border-color: var(--accent);
}

.save-filter-name::-moz-placeholder {
  color: var(--text-faint);
}

.save-filter-name::placeholder {
  color: var(--text-faint);
}

.saved-filters-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-block-end: 12px;
  overflow: hidden;
}

.sf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-block-end: 1px solid var(--border);
}

.sf-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sf-search {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  color: var(--text);
  font-family: var(--sans);
  outline: none;
  width: 140px;
}

.sf-search:focus {
  border-color: var(--accent);
}

.sf-search::-moz-placeholder {
  color: var(--text-faint);
}

.sf-search::placeholder {
  color: var(--text-faint);
}

.sf-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 4px 0;
}

.sf-list::-webkit-scrollbar {
  width: 4px;
}

.sf-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.sf-empty {
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
}

.sf-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 13px;
  transition: background 0.1s;
  gap: 6px;
}

.sf-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.sf-num {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.sf-item-info {
  flex: 1;
  min-width: 0;
}

.sf-item-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sf-item-meta {
  font-size: 10px;
  color: var(--text-faint);
  margin-block-start: 1px;
}

.sf-item .sf-del {
  opacity: 0;
  font-size: 11px;
  color: var(--text-faint);
  cursor: pointer;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  border-radius: 4px;
}

.sf-item:hover .sf-del {
  opacity: 1;
}

.sf-item:hover .sf-dup {
  opacity: 0.7;
}

.sf-item:hover .sf-dup:hover {
  opacity: 1;
  color: var(--accent);
}

.sf-item:hover .sf-levels-btn {
  opacity: 0.7;
}

.sf-item .sf-levels-btn:hover {
  opacity: 1;
  color: var(--accent);
}

.sf-item .sf-del:hover {
  color: var(--red);
  background: var(--red-dim);
}

.sf-item-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex-shrink: 1;
  overflow: hidden;
  max-width: 50%;
  background: var(--bg-input);
  border-radius: 8px;
  padding: 4px 8px;
}

.sf-mini-pill {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
  background: hsla(var(--indigo-hsl), 0.08);
  border: 1px solid hsla(var(--indigo-hsl), 0.15);
  color: var(--accent);
}

.sf-mini-pill.location-pill {
  background: hsla(var(--warm-hsl), 0.08);
  border-color: hsla(var(--warm-hsl), 0.15);
  color: #f59e0b;
}

.sf-mini-pill.when-pill {
  background: hsla(var(--purple-lt-hsl), 0.08);
  border-color: hsla(var(--purple-lt-hsl), 0.15);
  color: var(--purple);
}

.sf-mini-pill.who-pill {
  background: hsla(var(--pink-hsl), 0.08);
  border-color: hsla(var(--pink-hsl), 0.15);
  color: var(--pink);
}

.sf-mini-pill.pay-pill {
  background: hsla(var(--green-hsl), 0.08);
  border-color: hsla(var(--green-hsl), 0.15);
  color: var(--green);
}

.sf-mini-pill.no-salary-pill {
  border-style: dashed;
  opacity: 0.7;
  font-style: italic;
}

/* Not-pills: gray interior with colored outlines matching source row */

.sf-mini-pill.not-pill {
  background: hsla(var(--slate-hsl), 0.06);
  color: var(--text-faint);
}

.sf-mini-pill.not-pill.not-what {
  border-color: hsla(var(--indigo-hsl), 0.35);
}

.sf-mini-pill.not-pill.not-where {
  border-color: hsla(var(--warm-hsl), 0.35);
}

.sf-mini-pill.not-pill.not-who {
  border-color: hsla(var(--pink-hsl), 0.35);
}

/* Job Spec Modal */

.job-modal-overlay {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  inset-inline-end: 0;
  bottom: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.6);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.15s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.job-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 92%;
  max-width: 780px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4);
  animation: modalSlideUp 0.2s ease-out;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.job-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 16px;
  border-block-end: 1px solid var(--border);
  flex-shrink: 0;
}

.job-modal-title-wrap {
  flex: 1;
  min-width: 0;
}

.job-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
  text-transform: lowercase;
}

.job-modal-meta {
  font-size: 12px;
  color: var(--text-faint);
  margin-block-start: 4px;
  text-transform: lowercase;
}

.job-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.job-modal-close {
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.1s;
}

.job-modal-close:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.job-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-dim);
}

.job-modal-body h1, .job-modal-body h2, .job-modal-body h3, .job-modal-body h4 {
  color: var(--text);
  margin: 20px 0 8px;
  font-size: 14px;
  font-weight: 700;
}

.job-modal-body h1 {
  font-size: 16px;
}

.job-modal-body h2 {
  font-size: 15px;
}

.job-modal-body ul, .job-modal-body ol {
  padding-inline-start: 20px;
  margin: 8px 0;
}

.job-modal-body li {
  margin-block-end: 4px;
}

.job-modal-body p {
  margin: 8px 0;
}

.job-modal-body a {
  color: var(--accent);
}

.job-modal-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.job-modal-footer {
  padding: 14px 24px;
  border-block-start: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.job-modal-close-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-faint);
  padding: 5px 14px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.1s;
}

.job-modal-close-btn:hover {
  background: var(--bg-hover);
  color: var(--text-dim);
}

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

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

.tuning-level-cb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: background 0.1s;
}

.tuning-level-cb:hover {
  background: var(--bg-hover);
}

.qb-hint {
  font-size: 11px;
  color: var(--text-faint);
  margin-block-end: 12px;
  line-height: 1.6;
}

.qb-hint kbd {
  display: inline-block;
  padding: 1px 5px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
}

.job-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.job-table th {
  text-align: start;
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  padding: 10px 11px;
  border-block-end: 2px solid var(--border);
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  white-space: nowrap;
  transition: color 0.15s;
}

.job-table th:hover {
  color: var(--accent);
}

.job-table th .sort-arrow {
  font-size: 13px;
  margin-inline-start: 4px;
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  color: var(--text-faint);
  font-weight: 700;
  vertical-align: middle;
  transition: all 0.15s;
}

.job-table th:hover .sort-arrow {
  background: rgba(255,255,255,0.12);
  color: var(--text-dim);
}

.job-table th.sorted .sort-arrow {
  background: var(--text);
  color: var(--bg-card);
}

/* Column header text colors match pill colors when sorted */

.job-table th[data-sort="title"].sorted {
  color: var(--accent);
}

.job-table th[data-sort="company"].sorted {
  color: var(--pink);
}

.job-table th[data-sort="location"].sorted {
  color: #f59e0b;
}

.job-table th[data-sort="salary"].sorted {
  color: var(--green);
}

.job-table th[data-sort="days"].sorted {
  color: var(--purple);
}

.job-table th[data-sort="level"].sorted {
  color: #06b6d4;
}

.job-table th[data-sort="ghost"].sorted {
  color: var(--red);
}

.job-table td {
  padding: 10px 12px;
  font-size: 13px;
  border-block-end: 1px solid var(--border);
  color: var(--text-dim);
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-table tr:hover td {
  background: var(--bg-hover);
}

.job-table tr.job-snippet-row {
  display: none;
}

.job-table tr.job-snippet-row td {
  padding: 0 12px 8px 12px;
  border-block-end: 1px solid var(--border);
  background: rgba(255,255,255,0.01);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.job-snippet-text {
  font-size: 11px;
  color: var(--text-faint);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
}

.job-snippet-text .preview-more {
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
}

.show-previews tr.job-snippet-row {
  display: table-row;
}

.show-previews tr.job-data-row td {
  border-block-end: none !important;
  padding-block-end: 2px;
}

.job-table .jt-title {
  font-weight: 600;
  color: var(--text);
  text-transform: lowercase;
  white-space: normal;
  overflow: hidden;
}

.job-title-link {
  cursor: pointer;
  transition: color 0.1s;
}

.job-title-link:hover {
  color: var(--accent) !important;
  text-decoration: underline;
}

.job-table .jt-company {
  text-transform: lowercase;
}

.job-table td.jt-loc {
  text-transform: lowercase;
}

.job-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  margin-inline-end: 5px;
  vertical-align: middle;
  flex-shrink: 0;
}

.job-table .jt-company {
  font-weight: 500;
  color: var(--text);
}

.jt-new-badge {
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  padding: 1px 5px;
  border-radius: 4px;
  margin-inline-start: 5px;
  letter-spacing: 0.3px;
  vertical-align: middle;
  animation: newBadgePulse 2s ease-in-out;
}

@keyframes newBadgePulse {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }

  30% {
    opacity: 1;
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.job-table .jt-salary {
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}

.job-table .jt-days {
  font-family: var(--mono);
  font-size: 12px;
}

.job-table .jt-ghost {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}

/* Sort bar */

.sort-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-block-end: 8px;
  flex-wrap: wrap;
}

.sort-bar-label {
  font-size: 11px;
  color: var(--text-faint);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sort-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sort-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: default;
}

.sort-pill .sort-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font-size: 9px;
  font-weight: 700;
}

.sort-pill .sort-dir {
  cursor: pointer;
  padding: 0 2px;
  font-size: 13px;
  opacity: 0.7;
  transition: opacity 0.1s;
}

.sort-pill .sort-dir:hover {
  opacity: 1;
}

.sort-pill .sort-remove {
  cursor: pointer;
  font-size: 12px;
  opacity: 0.5;
  margin-inline-start: 2px;
  transition: opacity 0.1s;
}

.sort-pill .sort-remove:hover {
  opacity: 1;
  color: var(--red);
}

.level-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.level-table th {
  text-align: start;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 8px;
  border-block-end: 1px solid var(--border);
}

.level-table td {
  padding: 4px 8px;
  border-block-end: 1px solid hsla(var(--slate-hsl), 0.08);
  vertical-align: middle;
}

.level-table tr:hover {
  background: var(--bg-hover);
}

.level-table .level-rank {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  text-align: center;
}

.level-table input {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  font-size: 12px;
  color: var(--text);
  padding: 4px 6px;
  border-radius: 4px;
  font-family: var(--mono);
}

.level-table input:focus {
  border-color: var(--accent);
  background: var(--bg-card);
  outline: none;
}

.level-table input.level-name {
  font-family: inherit;
  font-weight: 600;
}

.level-table .level-del {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-faint);
  cursor: pointer;
  font-size: 13px;
  padding: 3px 8px;
  border-radius: 4px;
  opacity: 1;
  transition: all 0.1s;
}

.level-table tr:hover .level-del {
  border-color: var(--red);
  color: var(--red);
}

.level-table .level-del:hover {
  opacity: 1;
  color: var(--red);
  background: var(--red-dim);
  border-color: var(--red);
}

.level-badge {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  display: inline-block;
}

.sort-add-wrap {
  position: relative;
}

.sort-add-btn {
  background: none;
  border: 1px dashed var(--border);
  color: var(--text-faint);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}

.sort-add-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.sort-dropdown {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  margin-block-start: 4px;
  z-index: 100;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  min-width: 160px;
  overflow: hidden;
}

.sort-opt {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.1s;
}

.sort-opt:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.sort-opt.disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* Hide reason popup */

.hide-reason-popup {
  position: fixed;
  z-index: 1001;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  padding: 12px;
  min-width: 220px;
  animation: modalFadeIn 0.1s ease-out;
}

.hide-reason-popup h4 {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-block-end: 8px;
}

.hide-reason-btn {
  display: block;
  width: 100%;
  text-align: start;
  padding: 8px 10px;
  border: none;
  background: none;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.1s;
}

.hide-reason-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}

/* Collapsible tuning cards */

.tuning-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  margin-block-end: 10px;
}

.tuning-card.collapsed {
  overflow: hidden;
}

.tuning-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  transition: background 0.1s;
}

.tuning-card-header:hover {
  background: rgba(255,255,255,0.02);
}

.tuning-card-chevron {
  color: var(--text-faint);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.tuning-card.collapsed .tuning-card-chevron {
  transform: rotate(-90deg);
}

.tuning-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.tuning-card-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: hsla(var(--accent-hsl), 0.1);
  color: var(--accent);
}

.tuning-card-badge.empty {
  display: none;
}

.tuning-card-sub {
  font-size: 11px;
  color: var(--text-faint);
  padding: 0 18px;
  margin-block-start: -6px;
}

.tuning-card-body {
  padding: 8px 18px 16px;
  transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.2s ease;
  overflow: visible;
}

.tuning-card.collapsed .tuning-card-body {
  max-height: 0 !important;
  opacity: 0;
  padding-block-start: 0;
  padding-block-end: 0;
  overflow: hidden;
}

.tuning-card.collapsed .tuning-card-sub {
  display: none;
}

/* Poor match cards on Tuning page */

.poor-match-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-block-end: 6px;
  font-size: 13px;
  transition: background 0.1s;
}

.poor-match-card:hover {
  background: var(--bg-hover);
}

.poor-match-info {
  flex: 1;
  min-width: 0;
}

.poor-match-title {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poor-match-meta {
  font-size: 11px;
  color: var(--text-faint);
  margin-block-start: 1px;
}

.poor-match-reason {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--red-dim);
  color: var(--red);
  white-space: nowrap;
}

.poor-match-unhide {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  cursor: pointer;
  transition: all 0.1s;
  font-family: var(--sans);
  white-space: nowrap;
}

.poor-match-unhide:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-dim);
}

.suggestion-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.1s;
  margin: 3px;
}

.suggestion-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.suggestion-chip .chip-count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-faint);
}

.hide-job-btn {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 11px;
  padding: 2px 5px;
  border-radius: 4px;
  margin-inline-start: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}

.job-table tr:hover .hide-job-btn {
  opacity: 0.6;
}

.hide-job-btn:hover {
  opacity: 1 !important;
  color: var(--red);
  background: var(--red-dim);
}

.job-action-btn {
  padding: 4px 10px;
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  background: transparent;
  color: var(--accent);
}

.job-action-btn:hover {
  background: hsla(var(--indigo-hsl), 0.1);
}

.job-action-btn.saved-btn {
  border-color: var(--green);
  color: var(--green);
  background: hsla(var(--green-hsl), 0.08);
}

.job-action-btn.saved-btn:hover {
  background: hsla(var(--green-hsl), 0.15);
}

.job-action-btn.hide-btn {
  border-color: var(--border);
  color: var(--text-faint);
}

.job-action-btn.hide-btn:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-dim);
}

.job-action-btn.applied-btn {
  border-color: var(--green);
  color: var(--green);
  background: hsla(var(--green-hsl), 0.08);
  cursor: default;
}

.source-pills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.pill-greenhouse {
  background: #dcfce7;
  color: #166534;
}

.pill-lever {
  background: #ede9fe;
  color: #5b21b6;
}

.pill-workday {
  background: #ccfbf1;
  color: #115e59;
}

.pill-linkedin {
  background: #dbeafe;
  color: #1e40af;
}

.pill-indeed {
  background: #fef3c7;
  color: #92400e;
}

.pill-ashby {
  background: #fce7f3;
  color: #9d174d;
}

.pill-career {
  background: #e5e7eb;
  color: #374151;
}

.apply-btn {
  padding: 5px 14px;
  border: none;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.apply-btn-default {
  background: var(--accent);
  color: #fff;
}

.apply-btn-default:hover {
  background: var(--accent-hover);
}

.apply-btn-linkedin {
  background: #0a66c2;
  color: #fff;
}

.apply-btn-linkedin:hover {
  background: #004182;
}

.save-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-faint);
  transition: color 0.15s;
  padding: 2px;
}

.save-btn:hover {
  color: var(--warm);
}

.save-btn.saved {
  color: var(--warm);
}

/* ======================== PIPELINE ======================== */

.pl-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-block-end: 16px;
}

.pl-filter-select {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text);
  font-family: var(--sans);
  font-size: 12px;
  cursor: pointer;
  min-width: 200px;
}

.pl-filter-select:focus {
  outline: none;
  border-color: var(--accent);
}

.pl-stage-section {
  margin-block-end: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
}

.pl-stage-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.pl-stage-header:hover {
  background: var(--bg-hover);
}

.pl-stage-chevron {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
  flex-shrink: 0;
  color: var(--text-faint);
}

.pl-stage-section.collapsed .pl-stage-chevron {
  transform: rotate(-90deg);
}

.pl-stage-name {
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.pl-stage-count {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text-faint);
}

.pl-stage-match-summary {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-faint);
  margin-inline-start: auto;
  white-space: nowrap;
}

.pl-stage-body {
  overflow-x: auto;
}

.pl-stage-section.collapsed .pl-stage-body {
  max-height: 0 !important;
  opacity: 0;
  overflow: hidden;
}

.pl-table {
  width: 100%;
  border-collapse: collapse;
}

.pl-table th {
  padding: 6px 12px;
  text-align: start;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-faint);
  background: var(--bg-input);
  border-block-end: 1px solid var(--border);
}

.pl-table td {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-dim);
  border-block-end: 1px solid var(--border);
  vertical-align: middle;
}

.pl-table tr:last-child td {
  border-block-end: none;
}

.pl-table tr:hover td {
  background: var(--bg-hover);
}

.pl-table .pl-title {
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pl-table .pl-title:hover {
  color: var(--accent);
}

.pl-table .pl-company {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pl-table .pl-date {
  font-family: var(--mono);
  font-size: 11px;
}

.pl-table .pl-days {
  font-family: var(--mono);
  font-size: 11px;
}

.pl-table .pl-match {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
}

.pl-move-select {
  padding: 3px 6px;
  font-size: 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-input);
  color: var(--text-dim);
  font-family: var(--sans);
  cursor: pointer;
}

.pl-stage-empty {
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
}

/* Resume picker popup */

.resume-picker-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.resume-picker-overlay.open {
  display: flex;
}

.resume-picker {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  width: 380px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
}

.resume-picker h4 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
}

.resume-picker .rp-sub {
  font-size: 12px;
  color: var(--text-faint);
  margin-block-end: 16px;
}

.resume-picker .rp-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-block-end: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.resume-picker .rp-option:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.resume-picker .rp-option.selected {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.resume-picker .rp-radio {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resume-picker .rp-option.selected .rp-radio {
  border-color: var(--accent);
}

.resume-picker .rp-option.selected .rp-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.resume-picker .rp-name {
  font-size: 13px;
  font-weight: 500;
}

.resume-picker .rp-meta {
  font-size: 10px;
  color: var(--text-faint);
}

.resume-picker .rp-actions {
  display: flex;
  gap: 8px;
  margin-block-start: 16px;
  justify-content: flex-end;
}

.resume-picker .rp-skip {
  font-size: 11px;
  color: var(--text-faint);
  cursor: pointer;
  padding: 6px 12px;
}

.resume-picker .rp-skip:hover {
  color: var(--text-dim);
}

.pl-resume-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--purple-dim);
  color: var(--purple);
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}

.pl-filter-badge {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
  white-space: nowrap;
}

/* ======================== GHOST ======================== */

.ghost-table {
  width: 100%;
  border-collapse: collapse;
}

.ghost-table th {
  text-align: start;
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  padding: 10px 12px;
  border-block-end: 1px solid var(--border);
}

.ghost-table td {
  padding: 10px 12px;
  font-size: 13px;
  border-block-end: 1px solid var(--border);
  color: var(--text-dim);
}

.ghost-table tr:hover td {
  background: var(--bg-hover);
}

.ghost-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--bg-input);
  overflow: hidden;
  min-width: 60px;
}

.ghost-bar-fill {
  height: 100%;
  border-radius: 3px;
}

.badge-soon {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 4px;
  background: hsla(var(--warm-hsl), 0.12);
  color: var(--warm);
  vertical-align: middle;
  margin-inline-start: 8px;
}

/* ======================== STATS ======================== */

.top-co-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-block-end: 1px solid var(--border);
}

.top-co-row:last-child {
  border-block-end: none;
}

.top-co-rank {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  width: 24px;
  text-align: end;
}

.top-co-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.top-co-count {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
}

/* ======================== RESUMES ======================== */

.resume-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.resume-row {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

.resume-row > .resume-card {
  flex: 0 0 280px;
  min-width: 240px;
}

.resume-row > .readiness-side-slot {
  flex: 1;
  min-width: 0;
}

.readiness-side {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  height: 100%;
  box-sizing: border-box;
}

@media (max-width: 720px) {
  .resume-row {
    flex-direction: column;
  }

  .resume-row > .resume-card {
    flex: 1 1 auto;
  }
}

.resume-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: border-color 0.15s, box-shadow 0.15s;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.resume-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.resume-card .rc-icon {
  width: 44px;
  height: 56px;
  border-radius: 8px;
  margin-block-end: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.resume-card .rc-icon.pdf {
  background: hsla(var(--red-hsl), 0.1);
  color: #ef4444;
}

.resume-card .rc-icon.doc {
  background: hsla(var(--accent-hsl), 0.1);
  color: #3b82f6;
}

.resume-card .rc-name {
  font-size: 14px;
  font-weight: 600;
  margin-block-end: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resume-card .rc-meta {
  font-size: 11px;
  color: var(--text-faint);
  margin-block-end: 12px;
}

.resume-card .rc-filters-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-block-end: 6px;
}

.resume-card .rc-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-block-end: 12px;
  flex: 1;
}

.resume-card .rc-filter-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.1s;
  white-space: nowrap;
}

.resume-card .rc-filter-pill.active {
  opacity: 1;
}

.resume-card .rc-filter-pill.inactive {
  opacity: 0.3;
}

.resume-card .rc-filter-pill:hover {
  opacity: 0.8;
}

.resume-card .rc-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-block-start: auto;
  padding-block-start: 12px;
  border-block-start: 1px solid var(--border);
}

.rc-actions .rc-btn {
  font-size: 10px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  text-align: center;
}

.rc-btn.rc-rename {
  background: var(--text-dim);
}

.rc-btn.rc-rename:hover {
  background: var(--text);
}

.rc-btn.rc-archive {
  background: var(--warm);
}

.rc-btn.rc-archive:hover {
  background: #d97706;
}

.rc-btn.rc-delete {
  background: var(--red);
}

.rc-btn.rc-delete:hover {
  background: #dc2626;
}

.rc-btn.rc-download {
  background: var(--accent);
}

.rc-btn.rc-download:hover {
  background: #2563eb;
}

.resume-row.is-placeholder .resume-card {
  border-style: dashed;
  border-color: var(--border);
}

.resume-row.is-placeholder .rc-name {
  color: var(--text-dim);
}

.resume-row.is-placeholder .rc-meta {
  color: var(--warm);
  font-style: italic;
}

.company-dropdown {
  display:none;
  position:absolute;
  z-index:100;
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:8px;
  box-shadow:0 8px 24px rgba(0,0,0,0.3);
  max-height:220px;
  overflow-y:auto;
  width:100%;
  inset-inline-start:0;
  top:100%;
  margin-block-start:2px;
}

.company-dropdown.open {
  display:block;
}

.company-opt {
  padding:8px 12px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:12px;
  border-block-end:1px solid hsla(var(--slate-hsl), 0.06);
  color:var(--text-dim);
}

.company-opt:hover, .company-opt:focus {
  background:var(--bg-hover);
  color:var(--text);
  outline:none;
}

.resume-upload-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  margin-block-end: 20px;
}

.resume-upload-zone:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.resume-upload-zone h4 {
  font-size: 15px;
  font-weight: 600;
  margin-block-end: 4px;
}

.resume-upload-zone p {
  font-size: 12px;
  color: var(--text-faint);
}

.resume-match-list {
  margin-block-start: 12px;
}

.resume-match-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-block-end: 1px solid var(--border);
  font-size: 13px;
}

.resume-match-item:last-child {
  border-block-end: none;
}

.resume-match-score {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.match-high {
  background: var(--green-dim);
  color: var(--green);
}

.match-med {
  background: var(--warm-dim);
  color: var(--warm);
}

.match-low {
  background: var(--red-dim);
  color: var(--red);
}

/* ======================== APPLICATIONS ======================== */

.app-flow-tabs {
  display: flex;
  gap: 0;
  border-block-end: 2px solid var(--border);
  margin-block-end: 20px;
}

.app-flow-tab {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-faint);
  cursor: pointer;
  border-block-end: 2px solid transparent;
  margin-block-end: -2px;
  transition: all 0.15s;
}

.app-flow-tab:hover {
  color: var(--text-dim);
}

.app-flow-tab.active {
  color: var(--accent);
  border-block-end-color: var(--accent);
}

.app-flow-panel {
  display: none;
}

.app-flow-panel.active {
  display: block;
}

.app-queue-table {
  width: 100%;
  border-collapse: collapse;
}

.app-queue-table th {
  text-align: start;
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  padding: 10px 11px;
  border-block-end: 2px solid var(--border);
}

.app-queue-table td {
  padding: 10px 12px;
  font-size: 13px;
  border-block-end: 1px solid var(--border);
  color: var(--text-dim);
  vertical-align: middle;
}

.app-queue-table tr:hover td {
  background: var(--bg-hover);
}

.app-mode-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}

.mode-manual {
  background: var(--accent-glow);
  color: var(--accent);
}

.mode-auto {
  background: var(--green-dim);
  color: var(--green);
}

.mode-notify {
  background: var(--purple-dim);
  color: var(--purple);
}

.app-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}

.status-queued {
  background: var(--bg-input);
  color: var(--text-faint);
}

.status-pending {
  background: var(--warm-dim);
  color: var(--warm);
}

.status-sent {
  background: var(--accent-glow);
  color: var(--accent);
}

.status-submitted {
  background: var(--green-dim);
  color: var(--green);
}

.status-failed {
  background: var(--red-dim);
  color: var(--red);
}

.notify-config {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-block-end: 16px;
}

.notify-config-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-block-end: 1px solid var(--border);
  font-size: 13px;
}

.notify-config-row:last-child {
  border-block-end: none;
}

.notify-config-row > label:first-child {
  flex: 1;
  color: var(--text-dim);
}

.notify-config-row .toggle-switch {
  flex: none;
}

.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  inset-inline-end: 0;
  bottom: 0;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 11px;
  transition: all 0.2s;
}

.toggle-slider:before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  inset-inline-start: 2px;
  top: 2px;
  background: var(--text-faint);
  border-radius: 50%;
  transition: all 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent-glow);
  border-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(18px);
  background: var(--accent);
}

.app-rule-card {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-block-end: 10px;
}

.app-rule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-end: 6px;
}

.app-rule-header h4 {
  font-size: 13px;
  font-weight: 600;
}

.app-rule-desc {
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.5;
}

/* ======================== PULSING NAV DOTS ======================== */

@keyframes nav-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 hsla(var(--accent-hsl), 0.4);
  }

  50% {
    box-shadow: 0 0 0 6px hsla(var(--accent-hsl), 0);
  }
}

.ext-status-dot.pulse {
  animation: nav-pulse 2s ease-in-out infinite;
  background: var(--accent) !important;
}

/* ======================== NOTIFICATION PREFS MATRIX ======================== */

.notif-matrix {
  width: 100%;
  border-collapse: collapse;
}

.notif-matrix th {
  text-align: center;
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  padding: 10px 8px;
  border-block-end: 2px solid var(--border);
}

.notif-matrix th:first-child {
  text-align: start;
}

.notif-matrix td {
  padding: 10px 8px;
  font-size: 13px;
  border-block-end: 1px solid var(--border);
  color: var(--text-dim);
  vertical-align: middle;
}

.notif-matrix td:not(:first-child) {
  text-align: center;
}

.notif-matrix tr:hover td {
  background: var(--bg-hover);
}

.notif-matrix .toggle-switch {
  margin: 0 auto;
}

.notif-matrix .freq-select {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-input);
  color: var(--text);
  font-family: var(--sans);
  font-size: 11px;
  cursor: pointer;
}

.notif-matrix .toggle-switch.disabled {
  opacity: 0.3;
  pointer-events: none;
}

.notif-section-label td {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 16px 8px 6px;
  border-block-end: 1px solid var(--border);
  background: none !important;
}

/* ======================== PHONE SETUP ======================== */

.phone-setup-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.phone-country-select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  width: 90px;
}

.phone-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  width: 180px;
}

.otp-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  width: 120px;
  letter-spacing: 4px;
  text-align: center;
}

.phone-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
}

.phone-verified-badge svg {
  width: 14px;
  height: 14px;
}

/* ======================== ESCALATION TIMELINE ======================== */

.escalation-timeline {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 16px 0;
  overflow-x: auto;
}

.esc-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 80px;
  text-align: center;
}

.esc-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.esc-icon.email {
  background: var(--accent-glow);
  color: var(--accent);
}

.esc-icon.wait {
  background: var(--bg-input);
  color: var(--text-faint);
}

.esc-icon.sms {
  background: var(--green-dim);
  color: var(--green);
}

.esc-icon.skip {
  background: var(--red-dim);
  color: var(--red);
}

.esc-label {
  font-size: 11px;
  color: var(--text-faint);
  line-height: 1.3;
}

.esc-connector {
  flex: 1;
  min-width: 24px;
  height: 2px;
  background: var(--border);
}

.escalation-slider-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-block-start: 12px;
}

.escalation-slider-row input[type="range"] {
  flex: 1;
  max-width: 240px;
  accent-color: var(--accent);
}

.escalation-slider-row .esc-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  min-width: 56px;
}

/* ======================== QUIET HOURS ======================== */

.quiet-hours-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.quiet-hours-row input[type="time"] {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
}

.quiet-hours-row span {
  font-size: 12px;
  color: var(--text-faint);
}

.tz-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text);
  font-family: var(--sans);
  font-size: 12px;
  max-width: 260px;
}

/* ======================== FILTER OVERRIDES ======================== */

.override-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  background: var(--accent-glow);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ======================== NOTIFICATION LOG ======================== */

.notif-log-table {
  width: 100%;
  border-collapse: collapse;
}

.notif-log-table th {
  text-align: start;
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  padding: 10px 11px;
  border-block-end: 2px solid var(--border);
}

.notif-log-table td {
  padding: 10px 12px;
  font-size: 13px;
  border-block-end: 1px solid var(--border);
  color: var(--text-dim);
  vertical-align: middle;
}

.notif-log-table tr:hover td {
  background: var(--bg-hover);
}

.notif-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}

.ns-sent {
  background: var(--accent-glow);
  color: var(--accent);
}

.ns-delivered {
  background: var(--accent-glow);
  color: var(--accent);
}

.ns-opened {
  background: var(--purple-dim);
  color: var(--purple);
}

.ns-applied {
  background: var(--green-dim);
  color: var(--green);
}

.ns-passed {
  background: var(--bg-input);
  color: var(--text-faint);
}

.ns-missed {
  background: var(--red-dim);
  color: var(--red);
}

.ns-expired {
  background: var(--warm-dim);
  color: var(--warm);
}

.ns-failed {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid var(--red);
}

.notif-channel-icon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-faint);
}

.notif-channel-icon svg {
  width: 14px;
  height: 14px;
}

.notif-log-filters {
  display: flex;
  gap: 8px;
  margin-block-end: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.notif-log-filters select, .notif-log-filters input {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text);
  font-family: var(--sans);
  font-size: 12px;
}

/* ======================== AUTH GATE ======================== */

.auth-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-main);
}

.auth-gate p {
  color: var(--text-faint);
  font-size: 14px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

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

.page.active .card, .page.active .stat-card, .page.active .download-box {
  animation: fadeIn 0.25s ease forwards;
}

@media (max-width: 768px) {
  .nav {
    width: 60px;
  }

  .nav-brand-text, .nav-item span, .nav-badge, .nav-user-info, .nav-section-label {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 12px;
  }

  .main {
    margin-inline-start: 60px;
    height: 100vh;
    overflow-y: auto;
  }

  .page-body {
    padding: 20px;
  }

  .page-header {
    padding: 20px;
  }

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

/* ======================== (keyword panel removed — readiness lives on Resumes page) ======================== */
