:root {
  --bg: #191724;
  --bg-soft: #1c1a2a;
  --bg-card: #1f1d2e;
  --bg-elev: #26233a;
  --surface: rgba(31, 29, 46, 0.88);
  --surface-solid: #1f1d2e;
  --card-bg: #1f1d2e;
  --border: #2a2740;
  --border-soft: #221f32;
  --text: #e0def4;
  --muted: #908caa;
  --text-dim: #908caa;
  --text-faint: #6e6a86;
  --accent: #ebbcba;
  --accent-pressed: #d49f9d;
  --primary: #ebbcba;
  --primary-glow: rgba(235, 188, 186, 0.25);
  --danger: #eb6f92;
  --danger-pressed: #d35579;
  --success: #95b1ac;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.28);
  --code-bg: #14121e;
  --code-text: #e0def4;
}

/* ===== 8 Distinct Curated Palettes (from DSA) ===== */

/* 1. Cozy (Warm Light) */
[data-theme="cozy"],
[data-theme="light"] {
  --bg: #f3ebdd;
  --bg-soft: #ece1cf;
  --bg-card: #fbf5ea;
  --bg-elev: #f0e6d5;
  --surface: rgba(251, 245, 234, 0.92);
  --surface-solid: #fbf5ea;
  --card-bg: #fbf5ea;
  --border: #e2d4bd;
  --border-soft: #ece1ce;
  --text: #4b3f34;
  --muted: #7c6c59;
  --text-dim: #7c6c59;
  --text-faint: #a7967f;
  --accent: #c06a45;
  --accent-pressed: #a55432;
  --primary: #c06a45;
  --primary-glow: rgba(192, 106, 69, 0.25);
  --danger: #c0574a;
  --danger-pressed: #a8473c;
  --success: #6f9b5f;
  --shadow: 0 16px 42px rgba(120, 84, 52, 0.12);
  --shadow-soft: 0 10px 30px rgba(120, 84, 52, 0.08);
  --code-bg: #ece1cf;
  --code-text: #4b3f34;
}

[data-theme="cozy"] .btn.btn--primary,
[data-theme="light"] .btn.btn--primary {
  color: #ffffff;
}

/* 2. Nord (Cool Slate Dark) */
[data-theme="nord"] {
  --bg: #2e3440;
  --bg-soft: #333b48;
  --bg-card: #3b4252;
  --bg-elev: #434c5e;
  --surface: rgba(59, 66, 82, 0.9);
  --surface-solid: #3b4252;
  --card-bg: #3b4252;
  --border: #434c5e;
  --border-soft: #3b4252;
  --text: #eceff4;
  --muted: #a6b0c0;
  --text-dim: #a6b0c0;
  --text-faint: #7b889b;
  --accent: #88c0d0;
  --accent-pressed: #81a1c1;
  --primary: #88c0d0;
  --primary-glow: rgba(136, 192, 208, 0.25);
  --danger: #bf616a;
  --danger-pressed: #a84952;
  --success: #a3be8c;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  --shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.25);
  --code-bg: #242933;
  --code-text: #eceff4;
}

/* 3. Catppuccin Mocha */
[data-theme="mocha"] {
  --bg: #1e1e2e;
  --bg-soft: #232338;
  --bg-card: #282a3e;
  --bg-elev: #313244;
  --surface: rgba(40, 42, 62, 0.9);
  --surface-solid: #282a3e;
  --card-bg: #282a3e;
  --border: #313244;
  --border-soft: #292b3c;
  --text: #cdd6f4;
  --muted: #a6adc8;
  --text-dim: #a6adc8;
  --text-faint: #7f849c;
  --accent: #cba6f7;
  --accent-pressed: #b48ead;
  --primary: #cba6f7;
  --primary-glow: rgba(203, 166, 247, 0.25);
  --danger: #f38ba8;
  --danger-pressed: #e06c8a;
  --success: #a6e3a1;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  --shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.25);
  --code-bg: #181825;
  --code-text: #cdd6f4;
}

/* 4. Rosé Pine (Default Dark) */
[data-theme="rosepine"],
[data-theme="dark"] {
  --bg: #191724;
  --bg-soft: #1c1a2a;
  --bg-card: #1f1d2e;
  --bg-elev: #26233a;
  --surface: rgba(31, 29, 46, 0.9);
  --surface-solid: #1f1d2e;
  --card-bg: #1f1d2e;
  --border: #2a2740;
  --border-soft: #221f32;
  --text: #e0def4;
  --muted: #908caa;
  --text-dim: #908caa;
  --text-faint: #6e6a86;
  --accent: #ebbcba;
  --accent-pressed: #d49f9d;
  --primary: #ebbcba;
  --primary-glow: rgba(235, 188, 186, 0.25);
  --danger: #eb6f92;
  --danger-pressed: #d35579;
  --success: #95b1ac;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.28);
  --code-bg: #14121e;
  --code-text: #e0def4;
}

/* 5. Everforest */
[data-theme="everforest"] {
  --bg: #2d353b;
  --bg-soft: #333c42;
  --bg-card: #343f44;
  --bg-elev: #3d484d;
  --surface: rgba(52, 63, 68, 0.9);
  --surface-solid: #343f44;
  --card-bg: #343f44;
  --border: #4a555b;
  --border-soft: #3a454b;
  --text: #d3c6aa;
  --muted: #a6b0a0;
  --text-dim: #a6b0a0;
  --text-faint: #859289;
  --accent: #a7c080;
  --accent-pressed: #8fa868;
  --primary: #a7c080;
  --primary-glow: rgba(167, 192, 128, 0.25);
  --danger: #e67e80;
  --danger-pressed: #cc6668;
  --success: #83c092;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  --shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.25);
  --code-bg: #232a2e;
  --code-text: #d3c6aa;
}

/* 6. Gruvbox */
[data-theme="gruvbox"] {
  --bg: #282828;
  --bg-soft: #2f2c2a;
  --bg-card: #32302f;
  --bg-elev: #3c3836;
  --surface: rgba(50, 48, 47, 0.9);
  --surface-solid: #32302f;
  --card-bg: #32302f;
  --border: #45403d;
  --border-soft: #35312e;
  --text: #d4be98;
  --muted: #a89984;
  --text-dim: #a89984;
  --text-faint: #7c6f64;
  --accent: #d8a657;
  --accent-pressed: #bf8f43;
  --primary: #d8a657;
  --primary-glow: rgba(216, 166, 87, 0.25);
  --danger: #ea6962;
  --danger-pressed: #d05049;
  --success: #a9b665;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.28);
  --code-bg: #1d2021;
  --code-text: #d4be98;
}

/* 7. Tokyo Night */
[data-theme="tokyonight"] {
  --bg: #1a1b26;
  --bg-soft: #1f2030;
  --bg-card: #1f2335;
  --bg-elev: #292e42;
  --surface: rgba(31, 35, 53, 0.9);
  --surface-solid: #1f2335;
  --card-bg: #1f2335;
  --border: #2b2f44;
  --border-soft: #23263a;
  --text: #c0caf5;
  --muted: #9aa5ce;
  --text-dim: #9aa5ce;
  --text-faint: #565f89;
  --accent: #7aa2f7;
  --accent-pressed: #6187db;
  --primary: #7aa2f7;
  --primary-glow: rgba(122, 162, 247, 0.25);
  --danger: #f7768e;
  --danger-pressed: #de5d75;
  --success: #9ece6a;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.3);
  --code-bg: #16161e;
  --code-text: #c0caf5;
}

/* 8. Latte (Light) */
[data-theme="latte"] {
  --bg: #eff1f5;
  --bg-soft: #e6e9ef;
  --bg-card: #ffffff;
  --bg-elev: #e6e9ef;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --card-bg: #ffffff;
  --border: #ccd0da;
  --border-soft: #dce0e8;
  --text: #4c4f69;
  --muted: #6c6f85;
  --text-dim: #6c6f85;
  --text-faint: #9ca0b0;
  --accent: #8839ef;
  --accent-pressed: #7226d9;
  --primary: #8839ef;
  --primary-glow: rgba(136, 57, 239, 0.25);
  --danger: #d20f39;
  --danger-pressed: #b50b2f;
  --success: #40a02b;
  --shadow: 0 14px 38px rgba(76, 79, 105, 0.12);
  --shadow-soft: 0 10px 28px rgba(76, 79, 105, 0.08);
  --code-bg: #e6e9ef;
  --code-text: #4c4f69;
}

[data-theme="latte"] .btn.btn--primary {
  color: #ffffff;
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--text-faint, var(--muted, #908caa)) 55%, transparent) transparent;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text-faint, var(--muted, #908caa)) 48%, transparent);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--text-faint, var(--muted, #908caa)) 78%, transparent);
  background-clip: padding-box;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1000px 560px at 15% -8%, color-mix(in srgb, var(--primary, var(--accent)) 8%, transparent), transparent 62%),
    radial-gradient(760px 520px at 100% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 55%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* ============ Unified Vector Icon System ============ */
.app-icon {
  display: inline-block;
  vertical-align: -0.15em;
  width: 1.15em;
  height: 1.15em;
  stroke-width: 1.8;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.app-icon--sm {
  width: 0.95em;
  height: 0.95em;
}

.app-icon--lg {
  width: 1.35em;
  height: 1.35em;
}

.app-icon--filled {
  fill: currentColor;
  stroke: none;
}

.app-icon--accent {
  color: var(--accent);
}

.app-icon--success {
  color: var(--success);
}

.app-icon--danger {
  color: var(--danger);
}

.app-icon--warning {
  color: #f59e0b;
}

.app-icon--info {
  color: #38bdf8;
}

.btn .app-icon,
.tab .app-icon,
.agent-view-tab .app-icon,
.pill .app-icon {
  margin-right: 5px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.92em;
}

.app {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto 16px auto;
  max-width: fit-content;
  padding: 6px 10px 6px 10px;
  gap: 20px;
  background: var(--surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 100px;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
}

.tabbar {
  display: flex;
  gap: 4px;
  justify-content: center;
  align-items: center;
}

.tabbar--scrollable {
  overflow-x: auto;
  scrollbar-width: none;
  justify-content: flex-start;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
}

.tabbar--scrollable::-webkit-scrollbar {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  position: relative;
}

/* ============ DSA-Inspired Logo & Multi-Theme Selector ============ */
.tn-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 4px;
  position: relative;
}

.tn-logo-wrap {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.tn-logo {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary, var(--accent)), var(--accent));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary, var(--accent)) 25%, transparent), 0 2px 6px var(--primary-glow, rgba(0, 0, 0, 0.2));
  flex-shrink: 0;
  display: inline-block;
  user-select: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tn-logo-btn {
  border: none;
  padding: 6px;
  margin: -6px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: inherit;
  transition: background 0.15s ease;
}

.tn-logo-btn:hover .tn-logo,
.tn-logo-btn.open .tn-logo {
  transform: scale(1.25);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, var(--accent)) 45%, transparent), 0 3px 10px var(--primary-glow, rgba(0, 0, 0, 0.3));
}

.tn-theme-pop {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  z-index: 999;
  min-width: 224px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 7px;
  animation: tn-pop 0.14s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(20px);
}

@keyframes tn-pop {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.97);
  }

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

.tn-theme-head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
  padding: 6px 9px 8px;
}

.tn-theme-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 9px;
  font-family: inherit;
  transition: all 0.12s ease;
}

.tn-theme-opt:hover {
  background: var(--bg-elev, var(--bg-soft));
  color: var(--text);
}

.tn-theme-opt.active {
  color: var(--text);
  background: color-mix(in srgb, var(--primary, var(--accent)) 15%, transparent);
  font-weight: 600;
}

.tn-theme-sw {
  display: inline-flex;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.tn-theme-sw i {
  width: 14px;
  height: 20px;
  display: block;
}

.tn-theme-name {
  flex: 1;
  min-width: 0;
}

.tn-theme-check {
  color: var(--primary, var(--accent));
  font-weight: 800;
  font-size: 14px;
}

.topbar__right {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}

.topbar-icon-btn {
  padding: 6px;
  border-radius: 50%;
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
}

.topbar-icon-btn:hover {
  background: var(--bg-elev, var(--bg-soft));
  color: var(--text);
}

.topbar-icon-btn--danger:hover {
  background: rgba(209, 67, 67, 0.1) !important;
  color: var(--danger) !important;
}

.tab {
  appearance: none;
  background: none;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 150ms ease;
}

.tab:hover {
  color: var(--text);
  background: var(--bg-elev, var(--bg-soft));
}

.tab--active {
  color: var(--text);
  background: color-mix(in srgb, var(--primary, var(--accent)) 14%, transparent);
}

.page {
  display: none;
  height: 100%;
}

.page--active {
  display: block;
}

.subpage {
  display: none;
}

.subpage--active {
  display: block;
}

.split-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: calc(80vh - 120px);
}

.split-top {
  flex-shrink: 0;
}

.split-bottom {
  flex: 1;
  min-height: 0;
}

.split-bottom.card--log {
  display: flex;
  flex-direction: column;
}

.schedule-section {
  padding: 10px 12px;
  margin-top: 2px;
  background: rgba(10, 132, 255, 0.03);
  border-radius: 10px;
  border: 1px dashed rgba(10, 132, 255, 0.12);
}

.schedule-section .row+.row {
  margin-top: 8px;
}

.env-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(10, 132, 255, 0.8);
  background: rgba(10, 132, 255, 0.08);
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.region-picker {
  padding: 3px 6px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  border: 1.5px solid rgba(10, 132, 255, 0.25);
  background: rgba(10, 132, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  min-width: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  padding-right: 18px;
}

.region-picker:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.12);
}


.brand__dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #0a84ff, #5ac8fa);
  box-shadow: 0 10px 18px rgba(10, 132, 255, 0.22);
}

.brand__title {
  font-weight: 680;
  letter-spacing: -0.02em;
  font-size: 16px;
}

.brand__subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.main {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 18px 18px 42px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* LaTeX IDE Full-Screen Studio Workspace */
.latex-studio-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100000;
  background: var(--bg);
  display: none;
  align-items: stretch;
  justify-content: stretch;
  opacity: 0;
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.latex-studio-backdrop.is-open {
  display: flex !important;
  opacity: 1 !important;
}

/* Modals with backdrop blur inside Resume Studio */
#studioCreateBranchModal,
#studioCreateCheckpointModal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 100002 !important;
  background: rgba(10, 8, 20, 0.78) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

#studioCreateBranchModal.is-open,
#studioCreateCheckpointModal.is-open {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.latex-studio-window {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: absolute;
  inset: 0;
  margin: 0 !important;
}

/* Ensure fullscreen edge-to-edge layout across all modes */
.latex-studio-window.mode--floating,
.latex-studio-window.mode--fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  transform: none !important;
}

/* Line Numbers Gutter */
.studio-gutter {
  width: 48px;
  min-width: 48px;
  background: var(--bg-soft);
  color: var(--text-faint);
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
  padding: 14px 10px 14px 6px;
  box-sizing: border-box;
  user-select: none;
  border-right: 1px solid var(--border-soft);
  overflow: hidden;
  white-space: pre;
}

/* Hide floating vertical dock so it never obstructs resume preview */
.studio-vertical-dock {
  display: none !important;
}

.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.grid>* {
  flex: 1 1 320px;
}

.grid--two>* {
  flex: 1 1 450px;
}

.card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  backdrop-filter: blur(18px);
}

.card__title {
  font-weight: 680;
  letter-spacing: -0.02em;
  font-size: 14px;
  color: var(--text);
}

.card__subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.card__body {
  padding: 14px 16px 16px;
}

.row {
  display: flex;
  gap: 12px;
  align-items: end;
}

.row+.row {
  margin-top: 12px;
}

.row--actions {
  align-items: center;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.field--full {
  flex: 1 1 100%;
}

.field__label {
  font-size: 12px;
  color: var(--muted);
}

.input {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: box-shadow 140ms ease, border-color 140ms ease;
}

.input--sm {
  width: 180px;
  padding: 8px 10px;
  font-size: 12px;
  border-radius: 10px;
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

.toggle {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: var(--text);
  user-select: none;
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, border-color 120ms ease;
}

.btn:hover {
  background: var(--bg-elev, var(--bg-soft));
  border-color: color-mix(in srgb, var(--primary, var(--accent)) 40%, transparent);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn--ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}

.btn--ghost:hover {
  background: var(--bg-elev, var(--bg-soft));
  color: var(--text);
}

.btn--sm {
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 10px;
}

.btn--primary {
  border-color: var(--primary, var(--accent));
  background: linear-gradient(180deg, var(--primary, var(--accent)), var(--accent-pressed, var(--accent)));
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn--primary:hover {
  filter: brightness(1.08);
}

.btn--primary:active {
  filter: brightness(0.95);
}

.btn--danger {
  border-color: var(--danger);
  background: linear-gradient(180deg, var(--danger), var(--danger-pressed, var(--danger)));
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(209, 67, 67, 0.25);
}

.btn--danger:active {
  filter: brightness(0.95);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
  background: var(--surface-solid);
  color: var(--text);
}

.pill--muted {
  color: var(--muted);
}

.pill--ok {
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 30%, transparent);
}

.pill--bad {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 30%, transparent);
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 14px 0;
}

.schline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.schline+.schline {
  margin-top: 6px;
}

.schline__text {
  flex: 1;
  min-width: 0;
}

.note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.note__muted {
  margin-top: 6px;
  opacity: 0.92;
}

.note__actions {
  margin-top: 10px;
}

.card--log {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.agent-dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 1020px) {
  .agent-dash-grid {
    grid-template-columns: 1fr;
  }
}

.agent-dash-grid>.card {
  height: auto;
  min-height: 480px;
  display: flex;
  flex-direction: column;
}

.agent-dash-grid .card--log .log {
  flex: 1 1 auto;
  min-height: 340px;
  height: 100%;
}

.log {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  padding: 14px 16px 18px;
  white-space: pre-wrap;
  overflow: auto;
  flex: 1;
  line-height: 1.45;
  background: var(--code-bg);
  color: var(--code-text);
}

.log__line {
  padding: 2px 0;
}

.log__meta {
  color: var(--muted);
}

@media (max-width: 1020px) {
  .grid {
    grid-template-columns: 1fr;
  }

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

.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  display: flex;
  z-index: 9999;
}

.login-split-left {
  flex: 1;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 10%;
  color: #f8fafc;
  position: relative;
  overflow: hidden;
}

.login-split-left::before {
  content: "";
  position: absolute;
  top: -20%;
  left: -10%;
  right: -10%;
  bottom: -20%;
  background: radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 40%);
  z-index: 0;
}

.login-split-left-content {
  position: relative;
  z-index: 1;
}

.login-split-left h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin: 0 0 1rem 0;
  line-height: 1.1;
  background: linear-gradient(135deg, #818cf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
}

.login-split-left p {
  font-size: 1.25rem;
  line-height: 1.6;
  color: #94a3b8;
  max-width: 500px;
  margin: 0 0 2.5rem 0;
}

.login-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.login-features li {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 1.1rem;
  color: #cbd5e1;
  margin-bottom: 1.2rem;
  font-weight: 500;
}

.login-split-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 2rem;
}

@media (max-width: 900px) {
  .login-overlay {
    flex-direction: column;
  }

  .login-split-left {
    display: none;
  }
}

.login-card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.login-card h2 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-card p {
  color: var(--muted);
  margin: 0 0 1.75rem;
  font-size: 0.9rem;
}

.login-card .form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
  margin-bottom: 1rem;
}

.login-card .form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.login-card .form-group input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-card .form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.15);
}



@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.text-amber-500 {
  color: #f59e0b !important;
}

.text-emerald-500 {
  color: #10b981 !important;
}

.text-red-500 {
  color: #ef4444 !important;
}

.text-muted {
  color: var(--muted) !important;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

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

.animate-fade-in-down {
  animation: fadeInDown 0.2s ease-out forwards;
}

.drive-sync-popup {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 12px;
  width: 320px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  padding: 16px;
  color: var(--text);
  font-family: inherit;
}

/* ==========================================================================
   Agent Components (Imported from agent.css)
   ========================================================================== */

/* Decision items */
.decision-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  transition: var(--transition);
}

.decision-item:hover {
  background: var(--surface);
  border-color: var(--accent);
}

.decision-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.decision-badge.apply {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.decision-badge.skip {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.decision-badge.review {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

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

.decision-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--text);
}

.decision-company {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.decision-reasoning {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.decision-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.score-value {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.score-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.score-high .score-value {
  color: var(--success);
}

.score-mid .score-value {
  color: #fcd34d;
}

.score-low .score-value {
  color: var(--danger);
}

/* Queue items */
.queue-item {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  transition: var(--transition);
}

.queue-item:hover {
  border-color: #fcd34d;
  background: var(--surface);
}

.queue-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.queue-title {
  font-weight: 600;
  font-size: 15px;
}

.queue-actions {
  display: flex;
  gap: 8px;
}

.btn-sm {
  padding: 6px 16px;
  font-size: 12px;
  border-radius: 6px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-approve {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-approve:hover {
  background: rgba(16, 185, 129, 0.3);
}

.btn-reject {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-reject:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* Applied items */
.applied-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--border);
}

.applied-item:last-child {
  border-bottom: none;
}

.applied-emoji {
  font-size: 20px;
}

.applied-info {
  flex: 1;
}

.applied-title {
  font-weight: 600;
  font-size: 14px;
}

.applied-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.applied-score {
  font-size: 14px;
  font-weight: 700;
  color: var(--success);
}

/* Performance safeguards: keep the dashboard smooth on older GPUs and remote desktops. */
body {
  background-attachment: scroll;
}

.login-overlay {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(0, 0, 0, 0.78);
}

.card--danger-zone {
  background: rgba(209, 67, 67, 0.05);
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

.topbar {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}


/* ========================================================= */
/*                   MOBILE RESPONSIVENESS                   */
/* ========================================================= */
@media (max-width: 768px) {
  .topbar {
    max-width: 100%;
    margin: 10px;
    padding: 8px 12px;
    flex-wrap: wrap;
    border-radius: 20px;
    gap: 12px;
  }

  .tabbar {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .tabbar .btn {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .main-content {
    padding: 10px;
  }

  .card {
    margin: 0 0 16px 0 !important;
  }

  .card__header {
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px;
  }

  .topbar__right,
  .card__header>div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  #statsGrid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Removed aggressive row stacking */

  .card--log {
    height: 300px !important;
  }

  .bot-subpage-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .bot-mode-selector,
  .bot-view-switcher {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }

  .bot-mode-btn,
  .bot-view-tab {
    flex: 1;
    justify-content: center;
  }

  /* Tables horizontally scroll automatically due to parent overflow-x: auto */
  table {
    min-width: 600px;
  }

  /* Settings Grid collapse */
  .card__body>div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* Outreach controls */
  #page-outreach>div:first-child>div[style*="background: var(--bg-alt)"] {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  #page-outreach>div:first-child>div[style*="background: var(--bg-alt)"]>div:first-child {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #page-outreach>div:first-child>div[style*="background: var(--bg-alt)"]>div:last-child {
    margin-left: 0 !important;
    justify-content: space-between !important;
  }

  /* Ensure inputs take full width if they are side-by-side on desktop */
  /* Removed global input width */

  #outreach-search {
    width: 100% !important;
  }
}

/* Product polish: compact applier controls so live logs own the page. */
#page-agents .split-layout {
  gap: 10px;
  height: calc(100vh - 150px);
}

#page-agents .agent-control-card .card__header {
  align-items: center;
  padding: 9px 12px;
}

#page-agents .agent-control-card .card__subtitle {
  display: none;
}

#page-agents .agent-control-card .card__body {
  padding: 8px 12px 10px;
}

#page-agents .agent-control-card .card__body>.row {
  margin: 0;
  gap: 8px;
}

#page-agents .agent-control-card .divider {
  display: none;
}

#page-agents .agent-control-card .input {
  min-height: 30px !important;
  border-radius: 9px;
}

#page-agents .compact-schedule {
  margin-top: 10px;
  padding: 8px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 12px;
}

#page-agents .compact-schedule>summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
}

#page-agents .compact-schedule>summary:hover {
  color: var(--text);
}

#page-agents .compact-schedule[open]>summary {
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.sch-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 6px;
  gap: 8px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sch-row-item:hover {
  background: var(--bg-elev, var(--bg-soft));
  border-color: color-mix(in srgb, var(--primary, var(--accent)) 40%, transparent);
}

#page-agents .split-bottom.card--log {
  min-height: 420px;
}

/* AI Agent Page Layout & Log Box Scrolling */
#page-agent .split-layout {
  display: flex;
  flex-direction: row;
  gap: 16px;
  height: auto !important;
  min-height: calc(100vh - 220px);
  align-items: stretch;
}

@media (max-width: 960px) {
  #page-agent .split-layout {
    flex-direction: column !important;
  }
}

#log-agent {
  height: 350px !important;
  min-height: 260px !important;
  max-height: 520px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  background: var(--code-bg) !important;
  color: var(--code-text) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  padding: 12px 14px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
  scroll-behavior: smooth !important;
}

#log-agent .log__line,
#log-agent .feed-line {
  padding: 3px 0;
  word-break: break-word;
  border-bottom: 1px solid var(--border);
}

/* ==========================================================================
   Agent Live Browser Viewport
   ========================================================================== */

.live-view-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  cursor: pointer;
}

.live-view-toggle-btn:hover {
  background: var(--bg-hover, rgba(255, 255, 255, 0.06));
  border-color: var(--primary, var(--accent));
}

.agent-live-view-panel {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
  border-radius: var(--radius-md, 10px);
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.25);
  transition: max-height 0.3s ease, opacity 0.25s ease, margin 0.3s ease;
}

.agent-live-view-panel--hidden {
  display: none !important;
}

.live-view-browser-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--surface, rgba(255, 255, 255, 0.03));
  border-bottom: 1px solid var(--border);
  gap: 10px;
}

.live-view-traffic-lights {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tv-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.tv-red {
  background: #ef4444;
  opacity: 0.85;
}

.tv-yellow {
  background: #f59e0b;
  opacity: 0.85;
}

.tv-green {
  background: #10b981;
  opacity: 0.85;
}

.live-view-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: var(--bg-body, rgba(0, 0, 0, 0.2));
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 11.5px;
  color: var(--text-muted);
  max-width: 60%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.live-status-dot.active {
  background: var(--success, #10b981);
  box-shadow: 0 0 8px var(--success, #10b981);
  animation: live-dot-pulse 2s infinite;
}

@keyframes live-dot-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.live-view-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.live-view-time {
  font-size: 11px;
  color: var(--text-muted);
  padding: 2px 6px;
}

.live-view-action-btn {
  padding: 3px 6px !important;
  line-height: 1 !important;
}

.live-view-viewport {
  position: relative;
  width: 100%;
  min-height: 180px;
  height: 220px;
  background: var(--code-bg, #0b0f19);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.live-view-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050811;
  display: none;
  transition: transform 0.2s ease;
  z-index: 1;
}

.live-view-viewport:hover .live-view-img {
  transform: scale(1.01);
}

.live-view-overlay-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  z-index: 2;
}

.live-rec-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  animation: live-dot-pulse-red 1.5s infinite;
}

@keyframes live-dot-pulse-red {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }

  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 5px rgba(239, 68, 68, 0);
  }

  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.live-view-standby {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  text-align: center;
  gap: 8px;
  width: 100%;
  height: 100%;
}

.live-radar-scanner {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
  background: var(--surface, rgba(255, 255, 255, 0.02));
}

.radar-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed var(--border);
}

.circle-1 {
  width: 38px;
  height: 38px;
}

.circle-2 {
  width: 20px;
  height: 20px;
}

.radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 270deg, var(--primary, rgba(59, 130, 246, 0.3)) 360deg);
  animation: radar-spin 3s linear infinite;
}

@keyframes radar-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.radar-icon {
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
  stroke-width: 1.5;
  fill: none;
  position: relative;
  z-index: 1;
}

.standby-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.standby-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.4;
}

#page-agent .agent-tab-content {
  max-height: calc(100vh - 280px);
  min-height: 450px;
  overflow-y: auto;
}

.agent-tab {
  background: transparent !important;
  border: none !important;
  padding: 12px 18px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--text-muted, #94a3b8) !important;
  cursor: pointer !important;
  border-bottom: 2px solid transparent !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: color 0.15s ease, border-color 0.15s ease !important;
}

.agent-tab:hover {
  color: var(--text, #f8fafc) !important;
}

.agent-tab.active,
.agent-tab.tab--active {
  color: var(--text, #f8fafc) !important;
  border-bottom: 2px solid var(--accent, #6366f1) !important;
}

/* ============ Bot Subpage Navigation & View Hierarchy ============ */
.bot-subpage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* Tool Selector: e.g. Profile Updater vs Job Applier */
.bot-mode-selector {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.1));
}

.bot-mode-btn {
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 180ms ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  user-select: none;
}

.bot-mode-btn:hover {
  color: var(--text);
  background: var(--bg-elev, var(--bg-soft, rgba(255, 255, 255, 0.05)));
}

.bot-mode-btn--active,
.bot-mode-btn--active:hover {
  color: #ffffff;
  background: var(--accent, #6366f1);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent, #6366f1) 40%, transparent);
}

.bot-mode-btn--active .pill--success {
  background-color: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Platform Context Badge for single-tool platforms (LinkedIn, Indeed, Reed) */
.bot-platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  padding: 6px 14px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.bot-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success, #10b981);
  box-shadow: 0 0 6px var(--success, #10b981);
}

/* View Switcher: Controls & Logs vs Applied Jobs */
.bot-view-switcher,
.bot-view-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  margin-bottom: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  margin-left: auto;
}

.bot-view-tab {
  appearance: none;
  background: none;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 6px 13px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 150ms ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.bot-view-tab:hover {
  color: var(--text);
  background: var(--bg-elev, var(--bg-soft));
}

.bot-view-tab--active,
.bot-view-tab--active:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--primary, var(--accent)) 16%, transparent);
  border-color: color-mix(in srgb, var(--primary, var(--accent)) 30%, transparent);
  font-weight: 600;
}

.bot-applications-panel {
  width: 100%;
}

#botApplicationsPanel .pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
}

/* ============ Agent page views ============ */
.agent-view-nav,
.agent-view-tabs {
  display: flex;
  gap: 4px;
  justify-content: center;
  align-items: center;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 16px auto;
}

.agent-view-tab {
  appearance: none;
  background: none;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 150ms ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.agent-view-tab:hover {
  color: var(--text);
  background: var(--bg-elev, var(--bg-soft));
}

.agent-view-tab--active,
.agent-view-tab--active:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--primary, var(--accent)) 14%, transparent);
}

/* ============ World map & Schedules (Unified Layout) ============ */
#agentSubpageMap.worldmap-page {
  position: relative;
  width: 100%;
  height: auto;
  min-height: calc(100vh - 180px);
  padding: 0 !important;
  background: transparent;
  margin: 0 auto;
}

.agent-map-schedules-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 14px;
  align-items: stretch;
  width: 100%;
}

@media (max-width: 1180px) {
  .agent-map-schedules-grid {
    grid-template-columns: 1fr;
  }
}

.agent-map-col {
  position: relative;
  width: 100%;
  height: clamp(520px, calc(100vh - 190px), 760px);
  min-height: 520px;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Seamless canvas-integrated map without enclosing box borders */
#worldMap.worldmap-canvas {
  position: absolute;
  top: -110px;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: calc(100% + 130px);
  transform: none;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: hidden;
}

.agent-schedules-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: clamp(520px, calc(100vh - 190px), 760px);
  min-height: 520px;
}

.agent-sched-card {
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius, 12px);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.agent-sched-card .card__body {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 10px;
}

.agent-config-card {
  flex-shrink: 0;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius, 12px);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

/* Polished floating zoom controls positioned at bottom-right */
.jvm-zoom-btn {
  position: absolute !important;
  left: auto !important;
  right: 24px !important;
  border-radius: 8px !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  width: 32px !important;
  height: 32px !important;
  line-height: 30px !important;
  text-align: center !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  backdrop-filter: blur(12px) !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: var(--shadow) !important;
  z-index: 5 !important;
}

.jvm-zoom-btn:hover {
  background: var(--primary, var(--accent)) !important;
  color: #fff !important;
  border-color: var(--primary, var(--accent)) !important;
}

.jvm-zoom-btn.jvm-zoomin {
  top: auto !important;
  bottom: 64px !important;
}

.jvm-zoom-btn.jvm-zoomout {
  top: auto !important;
  bottom: 24px !important;
}

.jvm-tooltip {
  border-radius: var(--radius-sm, 8px) !important;
  background-color: var(--surface-solid, #1f1d2e) !important;
  color: var(--text, #e0def4) !important;
  border: 1px solid var(--border, #2a2740) !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  box-shadow: var(--shadow) !important;
  padding: 6px 10px !important;
  backdrop-filter: blur(12px) !important;
}

/* Floating action bar overlaid at the bottom of the map. */
.worldmap-bar {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(94%, 900px);
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  z-index: 5;
  flex-wrap: wrap;
  color: var(--text);
}

.worldmap-bar #mapSelected {
  flex: 1 1 auto;
  min-width: 160px;
}

.worldmap-bar .wm-hint {
  color: var(--muted);
  font-size: 13px;
}

/* Right-side schedule list on the World map. */
.worldmap-sched-panel {
  position: absolute;
  top: 24px;
  right: 24px;
  width: min(300px, 32vw);
  max-height: calc(100% - 120px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  z-index: 6;
  padding: 12px 14px;
}

.wm-sched-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.wm-sched-panel-title {
  font-weight: 700;
  color: var(--text);
}

.wm-sched-panel-count {
  font-size: 12px;
  color: var(--primary, var(--accent));
  font-weight: 600;
}

.wm-sched-panel-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wm-sched-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--surface-solid);
}

.wm-sched-item-name {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.wm-sched-item-times {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wm-sched-time {
  background: var(--primary, var(--accent));
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  border-radius: 999px;
  padding: 2px 9px;
}

.wm-sched-none {
  color: var(--muted);
  font-size: 12px;
}

.worldmap-bar .wm-bar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.worldmap-bar #mapTargetCount {
  width: 60px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
}

.wm-chips {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.wm-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--success, #22c55e);
  color: #fff;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
}

.wm-chip-x {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

.agent-country-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(100, 160, 120, 0.12);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 12px;
}

.wm-banner-title {
  font-weight: 600;
  color: var(--text, #e5e7eb);
}

.wm-banner-hint {
  color: #93a4c3;
  font-size: 13px;
  flex-basis: 100%;
  margin-top: 2px;
}

.wm-banner-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-basis: 100%;
}

.wm-sched {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wm-banner-actions #agentCountryClear {
  margin-left: auto;
}

@keyframes wmBannerFlash {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  }

  100% {
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
  }
}

.wm-banner-flash {
  animation: wmBannerFlash 0.9s ease-out 1;
}

/* Outreach funnel */
.funnel-step {
  flex: 1 1 0;
  min-width: 84px;
  text-align: center;
  padding: 14px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-alt, rgba(120, 120, 120, 0.06));
}

.funnel-step .funnel-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--text, #e5e7eb);
  line-height: 1.1;
}

.funnel-step .funnel-lbl {
  font-size: 11px;
  color: var(--text-muted, #9aa4b2);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.funnel-step--muted {
  opacity: 0.7;
}

.funnel-arrow {
  align-self: center;
  color: var(--text-muted, #9aa4b2);
  font-size: 16px;
  flex: 0 0 auto;
}

.lead-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid transparent;
  margin-left: 4px;
  white-space: nowrap;
}

.lead-badge--open {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.3);
}

.lead-badge--reply {
  background: rgba(34, 197, 94, 0.14);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.35);
}

.lead-badge--follow {
  background: rgba(168, 85, 247, 0.12);
  color: #a855f7;
  border-color: rgba(168, 85, 247, 0.3);
}

/* Gmail Outreach 1-Click OAuth Card */
.gmail-outreach-card {
  position: relative;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px 28px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gmail-badge-needed {
  position: absolute;
  top: -12px;
  left: 28px;
  background: var(--bg-elev, var(--bg-soft));
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.gmail-badge-connected {
  position: absolute;
  top: -12px;
  left: 28px;
  background: color-mix(in srgb, var(--success) 14%, transparent);
  color: var(--success);
  border: 1px solid color-mix(in srgb, var(--success) 30%, transparent);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.gmail-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 6px;
  margin-bottom: 20px;
}

.gmail-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(120, 120, 120, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gmail-card-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.gmail-card-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.gmail-feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.gmail-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.gmail-feature-check {
  color: #10b981;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.2;
}

.gmail-action-btn {
  width: 100%;
  background: #5eead4;
  color: #042f2e;
  border: none;
  border-radius: 999px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(94, 234, 212, 0.4);
}

.gmail-action-btn:hover {
  background: #2dd4bf;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(45, 212, 191, 0.5);
}

.gmail-action-btn:active {
  transform: translateY(0);
}

.gmail-card-footer {
  text-align: center;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--muted);
}

/* Settings Sub-Tab Navigation Bar */
/* Settings cards must fit their content without pushing controls outside. */
.settings-page-heading {
  display: none !important;
}

.settings-heading-actions,
.settings-connection-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.settings-accounts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  grid-template-areas: "gmail portals" "drive portals";
  gap: 20px;
  align-items: start;
}

.settings-account-card {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(120, 120, 120, 0.05);
}

.settings-account-card--gmail {
  grid-area: gmail;
}

.settings-account-card--drive {
  grid-area: drive;
}

.settings-account-card--portals {
  grid-area: portals;
}

.settings-account-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.settings-connection-box {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.settings-connection-state {
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}

.settings-connection-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.settings-connection-identity>div {
  min-width: 0;
}

#settings-gmail-email {
  overflow-wrap: anywhere;
  line-height: 1.5;
  margin-top: 3px;
}

#page-settings .input {
  width: 100%;
  min-width: 0;
}

#panel-accounts .row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 16px;
}

.settings-portal-test {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 22px;
}

.settings-portal-test span {
  overflow-wrap: anywhere;
  min-width: 0;
}

.settings-account-card .btn {
  min-height: 36px;
  max-width: 100%;
}

.settings-account-card h3 svg {
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .settings-accounts-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "gmail" "portals" "drive";
  }
}

@media (max-width: 480px) {
  .settings-account-card {
    padding: 18px;
  }

  .settings-page-heading>div {
    min-width: 0;
  }
}

.settings-subtabs-container {
  margin-bottom: 20px;
}

.settings-subtabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  padding: 6px;
  border-radius: 999px;
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: var(--shadow-soft);
}

.settings-subtabs::-webkit-scrollbar {
  display: none;
}

.settings-subtab-btn {
  background: transparent;
  border: 1px solid transparent;
  outline: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-subtab-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.settings-subtab-btn.active {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
}

/* Light Theme Overrides for Settings Subtabs */
[data-theme="cozy"] .settings-subtab-btn.active,
[data-theme="light"] .settings-subtab-btn.active,
[data-theme="latte"] .settings-subtab-btn.active {
  background: var(--bg-card, #ffffff) !important;
  color: var(--text, #4b3f34) !important;
  border-color: var(--border, #e2d4bd) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="cozy"] .settings-subtab-btn:hover:not(.active),
[data-theme="light"] .settings-subtab-btn:hover:not(.active),
[data-theme="latte"] .settings-subtab-btn:hover:not(.active) {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text, #4b3f34);
}

.settings-subtab-btn--sub {
  color: var(--accent);
}

.settings-subtab-btn--sub.active {
  background: linear-gradient(135deg, rgba(235, 188, 186, 0.25), rgba(16, 185, 129, 0.2)) !important;
  border-color: rgba(235, 188, 186, 0.4) !important;
  color: #ffffff !important;
}

[data-theme="cozy"] .settings-subtab-btn--sub.active,
[data-theme="light"] .settings-subtab-btn--sub.active,
[data-theme="latte"] .settings-subtab-btn--sub.active {
  color: var(--accent, #c06a45) !important;
  background: var(--bg-card, #ffffff) !important;
  border-color: var(--accent, #c06a45) !important;
}

.settings-subtab-btn--admin {
  color: var(--danger);
}

.settings-subtab-btn--admin.active {
  background: linear-gradient(135deg, rgba(235, 111, 146, 0.25), rgba(235, 111, 146, 0.1)) !important;
  border-color: rgba(235, 111, 146, 0.4) !important;
  color: #ffffff !important;
}

[data-theme="cozy"] .settings-subtab-btn--admin.active,
[data-theme="light"] .settings-subtab-btn--admin.active,
[data-theme="latte"] .settings-subtab-btn--admin.active {
  color: var(--danger, #c0574a) !important;
  background: var(--bg-card, #ffffff) !important;
  border-color: var(--danger, #c0574a) !important;
}

.settings-panel {
  display: none;
  animation: fadeIn 0.2s ease;
}

.settings-panel.active {
  display: block;
}

/* Admin Subpage Navigation */
.admin-subtabs-container {
  margin-bottom: 22px;
}

.admin-subtabs {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 6px;
  border-radius: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: var(--shadow-soft);
}

.admin-subtabs::-webkit-scrollbar {
  display: none;
}

.admin-subtab-btn {
  background: transparent;
  border: 1px solid transparent;
  outline: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 18px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-subtab-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.admin-subtab-btn.active {
  background: rgba(99, 102, 241, 0.18) !important;
  color: #a5b4fc !important;
  border-color: rgba(99, 102, 241, 0.4) !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.18) !important;
}

.admin-subpage {
  display: none;
  animation: fadeIn 0.2s ease;
}

.admin-subpage.active {
  display: block;
}

/* Subscription Panel Premium Design System (Compact Sleek Scale) */
.sub-hero-card {
  background: linear-gradient(145deg, rgba(31, 29, 46, 0.85), rgba(22, 20, 34, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  margin-bottom: 14px;
}

.sub-hero-card::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, rgba(235, 188, 186, 0.04) 50%, transparent 70%);
  pointer-events: none;
}

.sub-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  position: relative;
  z-index: 2;
}

.sub-tier-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}

.sub-tier-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0;
}

.sub-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.sub-stat-tile {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 14px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.sub-stat-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.12);
}

.sub-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
}

.sub-stat-val {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

/* Feature Matrix Cards */
.sub-matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 0;
}

.sub-matrix-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.sub-matrix-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

.sub-matrix-card.is-active {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.05), rgba(255, 255, 255, 0.015));
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.08);
}

.sub-matrix-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  flex-shrink: 0;
}

.sub-matrix-card-icon svg {
  width: 16px;
  height: 16px;
}

.sub-matrix-card.is-active .sub-matrix-card-icon {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.sub-matrix-bullets {
  list-style: none;
  padding: 0;
  margin: 8px 0 10px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sub-matrix-bullets li {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.sub-matrix-bullets li svg {
  color: #95b1ac;
  flex-shrink: 0;
  width: 11px;
  height: 11px;
}

/* Light Theme Overrides for Subscription & Billing Panel */
[data-theme="cozy"] .sub-hero-card,
[data-theme="light"] .sub-hero-card {
  background: linear-gradient(145deg, #fbf5ea, #f5ebd9);
  border: 1px solid var(--border, #e2d4bd);
  box-shadow: 0 8px 24px rgba(120, 84, 52, 0.08);
}

[data-theme="cozy"] .sub-hero-card::before,
[data-theme="light"] .sub-hero-card::before {
  background: radial-gradient(circle, rgba(192, 106, 69, 0.12) 0%, rgba(111, 155, 95, 0.06) 50%, transparent 70%);
}

[data-theme="latte"] .sub-hero-card {
  background: linear-gradient(145deg, #ffffff, #f4f5f8);
  border: 1px solid var(--border, #ccd0da);
  box-shadow: 0 8px 24px rgba(76, 79, 105, 0.08);
}

[data-theme="latte"] .sub-hero-card::before {
  background: radial-gradient(circle, rgba(136, 57, 239, 0.12) 0%, rgba(64, 160, 43, 0.06) 50%, transparent 70%);
}

/* Stat Tiles inside Sub Hero Card */
[data-theme="cozy"] .sub-stat-tile,
[data-theme="light"] .sub-stat-tile {
  background: var(--bg-elev, #f0e6d5);
  border: 1px solid var(--border, #e2d4bd);
  box-shadow: 0 1px 3px rgba(120, 84, 52, 0.04);
}

[data-theme="cozy"] .sub-stat-tile:hover,
[data-theme="light"] .sub-stat-tile:hover {
  background: var(--bg-card, #fbf5ea);
  border-color: var(--accent, #c06a45);
}

[data-theme="cozy"] .sub-stat-label,
[data-theme="light"] .sub-stat-label {
  color: var(--muted, #7c6c59);
}

[data-theme="cozy"] .sub-stat-val,
[data-theme="light"] .sub-stat-val {
  color: var(--text, #4b3f34);
}

[data-theme="latte"] .sub-stat-tile {
  background: #f4f5f8;
  border: 1px solid #ccd0da;
  box-shadow: 0 1px 3px rgba(76, 79, 105, 0.04);
}

[data-theme="latte"] .sub-stat-tile:hover {
  background: #ffffff;
  border-color: var(--accent, #8839ef);
}

[data-theme="latte"] .sub-stat-label {
  color: var(--muted, #6c6f85);
}

[data-theme="latte"] .sub-stat-val {
  color: var(--text, #4c4f69);
}

[data-theme="cozy"] #userSubRenewalInfo,
[data-theme="light"] #userSubRenewalInfo {
  color: #2e7d32 !important;
}

[data-theme="latte"] #userSubRenewalInfo {
  color: #40a02b !important;
}

/* Feature Access Matrix Cards in Light Themes */
[data-theme="cozy"] .sub-matrix-card,
[data-theme="light"] .sub-matrix-card {
  background: var(--bg-card, #fbf5ea);
  border: 1px solid var(--border, #e2d4bd);
  box-shadow: 0 2px 8px rgba(120, 84, 52, 0.04);
}

[data-theme="cozy"] .sub-matrix-card:hover,
[data-theme="light"] .sub-matrix-card:hover {
  border-color: var(--accent, #c06a45);
  background: #fffdf9;
}

[data-theme="cozy"] .sub-matrix-card.is-active,
[data-theme="light"] .sub-matrix-card.is-active {
  border-color: rgba(111, 155, 95, 0.45);
  background: linear-gradient(160deg, rgba(111, 155, 95, 0.1), rgba(251, 245, 234, 0.95));
  box-shadow: 0 4px 18px rgba(111, 155, 95, 0.12);
}

[data-theme="cozy"] .sub-matrix-card-icon,
[data-theme="light"] .sub-matrix-card-icon {
  background: var(--bg-elev, #f0e6d5);
  color: var(--accent, #c06a45);
}

[data-theme="cozy"] .sub-matrix-bullets li,
[data-theme="light"] .sub-matrix-bullets li {
  color: var(--muted, #7c6c59);
}

[data-theme="cozy"] .sub-matrix-bullets li svg,
[data-theme="light"] .sub-matrix-bullets li svg {
  color: var(--accent, #c06a45);
}

[data-theme="latte"] .sub-matrix-card {
  background: #ffffff;
  border: 1px solid #ccd0da;
  box-shadow: 0 2px 8px rgba(76, 79, 105, 0.04);
}

[data-theme="latte"] .sub-matrix-card:hover {
  border-color: var(--accent, #8839ef);
  background: #ffffff;
}

[data-theme="latte"] .sub-matrix-card.is-active {
  border-color: rgba(64, 160, 43, 0.45);
  background: linear-gradient(160deg, rgba(64, 160, 43, 0.08), #ffffff);
  box-shadow: 0 4px 18px rgba(64, 160, 43, 0.12);
}

[data-theme="latte"] .sub-matrix-card-icon {
  background: #e6e9ef;
  color: #8839ef;
}

[data-theme="latte"] .sub-matrix-bullets li {
  color: var(--muted, #6c6f85);
}

[data-theme="latte"] .sub-matrix-bullets li svg {
  color: var(--accent, #8839ef);
}

/* Light Theme Pills */
.pill--active {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  font-weight: 700;
}

[data-theme="cozy"] .pill--active,
[data-theme="light"] .pill--active {
  color: #2e7d32;
  background: rgba(111, 155, 95, 0.15);
  border-color: rgba(111, 155, 95, 0.4);
}

[data-theme="latte"] .pill--active {
  color: #40a02b;
  background: rgba(64, 160, 43, 0.15);
  border-color: rgba(64, 160, 43, 0.4);
}

.pill--warning {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  font-weight: 700;
}

[data-theme="cozy"] .pill--warning,
[data-theme="light"] .pill--warning {
  color: #b45309;
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
}

[data-theme="latte"] .pill--warning {
  color: #df8e1d;
  background: rgba(223, 142, 29, 0.15);
  border-color: rgba(223, 142, 29, 0.4);
}

/* Premium Modal Overlay in Light Themes */
[data-theme="cozy"] #premiumOverlay .card,
[data-theme="light"] #premiumOverlay .card {
  background: #fbf5ea !important;
  border-color: var(--border, #e2d4bd) !important;
  box-shadow: 0 25px 60px rgba(120, 84, 52, 0.25) !important;
}

[data-theme="latte"] #premiumOverlay .card {
  background: #ffffff !important;
  border-color: var(--border, #ccd0da) !important;
  box-shadow: 0 25px 60px rgba(76, 79, 105, 0.2) !important;
}

/* Admin notices in light theme */
[data-theme="cozy"] #admUsersPromoActiveNotice,
[data-theme="light"] #admUsersPromoActiveNotice,
[data-theme="latte"] #admUsersPromoActiveNotice {
  color: var(--text) !important;
  background: rgba(99, 102, 241, 0.08) !important;
  border-color: rgba(99, 102, 241, 0.25) !important;
}

/* Resume Physical Paper Sheet Preview */
/* Template Mode Switcher */
.template-mode-toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 16px 0;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.template-mode-toggle {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.template-mode-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.template-mode-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.template-mode-btn.active {
  background: #ebbcba;
  color: #191724;
  box-shadow: 0 2px 8px rgba(235, 188, 186, 0.25);
}

[data-theme="cozy"] .template-mode-btn.active {
  background: #2b5c8f;
  color: #ffffff;
}

/* Standalone Realistic Paper Sheet */
.resume-paper-sheet {
  background: #ffffff;
  border-radius: 6px;
  border: none;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45), 0 1px 4px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  margin: 12px 0;
}

.resume-paper-empty {
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 32px 20px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.01);
  text-align: center;
}

/* Feature Grid Cards (e.g. Auto-reply checklist cards in screenshot) */
.settings-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.settings-feature-card {
  background: rgba(120, 120, 120, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-feature-card:hover {
  border-color: var(--accent);
  background: rgba(120, 120, 120, 0.08);
}

.settings-feature-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--text);
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
}

.settings-feature-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.settings-feature-card-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* ==========================================================================
   JOBS SEARCH PAGE STYLES (MATCHING REFERENCE DESIGN)
   ========================================================================== */

.search-page-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 8px 16px 48px 16px;
}

.search-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.search-header-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.search-page-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0;
  color: var(--text);
}

/* ─── Info Icon & Popup ──────────────────────────────────────────── */
.info-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--border, rgba(148, 163, 184, 0.35));
  background: var(--bg-elev, rgba(148, 163, 184, 0.08));
  color: var(--muted, var(--text-secondary, #94a3b8));
  cursor: pointer;
  padding: 0;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.18s, color 0.18s, background 0.18s, transform 0.15s;
  vertical-align: middle;
}

.info-icon-btn:hover {
  border-color: var(--accent, #818cf8);
  color: var(--accent, #818cf8);
  background: var(--primary-glow, rgba(99, 102, 241, 0.12));
  transform: scale(1.12);
}

.info-icon-btn.info-active {
  border-color: var(--accent, #818cf8);
  color: var(--accent, #818cf8);
  background: var(--primary-glow, rgba(99, 102, 241, 0.18));
}

.info-popup {
  position: absolute;
  top: 36px;
  left: 0;
  z-index: 9999;
  width: 320px;
  background: var(--bg-elev, var(--bg-elevated, var(--bg-card, #1f1d2e)));
  border: 1px solid var(--border, var(--border-subtle, rgba(120, 120, 120, 0.25)));
  border-radius: var(--radius, 14px);
  box-shadow: var(--shadow, 0 16px 40px rgba(0, 0, 0, 0.4));
  padding: 16px;
  display: none;
  animation: infoPopupIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 13px;
  color: var(--text, var(--text-primary, #e2e8f0));
}

.info-popup.info-popup--visible {
  display: block;
}

@keyframes infoPopupIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }

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

.info-popup-arrow {
  position: absolute;
  top: -6px;
  left: 16px;
  width: 10px;
  height: 10px;
  background: var(--bg-elev, var(--bg-elevated, var(--bg-card, #1f1d2e)));
  border-left: 1px solid var(--border, var(--border-subtle, rgba(120, 120, 120, 0.25)));
  border-top: 1px solid var(--border, var(--border-subtle, rgba(120, 120, 120, 0.25)));
  transform: rotate(45deg);
}

.info-popup-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text, var(--text-primary, #e2e8f0));
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft, var(--border, rgba(255, 255, 255, 0.08)));
}

.info-popup-header svg {
  color: var(--accent, var(--primary, currentColor));
}

.info-popup-section {
  margin-bottom: 12px;
}

.info-popup-section:last-of-type {
  margin-bottom: 0;
}

.info-popup-section-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, var(--text-secondary, #94a3b8));
  margin-bottom: 7px;
}

.info-popup-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-popup-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text, var(--text-primary, #cbd5e1));
  font-size: 12.5px;
  line-height: 1.4;
}

.info-source-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.info-badge-blue {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.info-badge-green {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.28);
}

.info-badge-orange {
  background: rgba(249, 115, 22, 0.15);
  color: #fdba74;
  border: 1px solid rgba(249, 115, 22, 0.28);
}

.info-badge-purple {
  background: rgba(139, 92, 246, 0.18);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.info-badge-teal {
  background: rgba(20, 184, 166, 0.15);
  color: #5eead4;
  border: 1px solid rgba(20, 184, 166, 0.28);
}

.info-badge-red {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.28);
}

/* Light Theme badge text contrast */
[data-theme="cozy"] .info-badge-blue,
[data-theme="light"] .info-badge-blue,
[data-theme="latte"] .info-badge-blue {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.25);
}

[data-theme="cozy"] .info-badge-green,
[data-theme="light"] .info-badge-green,
[data-theme="latte"] .info-badge-green {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
  border-color: rgba(34, 197, 94, 0.25);
}

[data-theme="cozy"] .info-badge-orange,
[data-theme="light"] .info-badge-orange,
[data-theme="latte"] .info-badge-orange {
  background: rgba(249, 115, 22, 0.12);
  color: #c2410c;
  border-color: rgba(249, 115, 22, 0.25);
}

[data-theme="cozy"] .info-badge-purple,
[data-theme="light"] .info-badge-purple,
[data-theme="latte"] .info-badge-purple {
  background: rgba(139, 92, 246, 0.12);
  color: #6d28d9;
  border-color: rgba(139, 92, 246, 0.25);
}

[data-theme="cozy"] .info-badge-teal,
[data-theme="light"] .info-badge-teal,
[data-theme="latte"] .info-badge-teal {
  background: rgba(20, 184, 166, 0.12);
  color: #0f766e;
  border-color: rgba(20, 184, 166, 0.25);
}

[data-theme="cozy"] .info-badge-red,
[data-theme="light"] .info-badge-red,
[data-theme="latte"] .info-badge-red {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.25);
}

.info-popup-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft, var(--border, rgba(255, 255, 255, 0.08)));
  font-size: 11.5px;
  color: var(--text-faint, var(--text-muted, var(--muted, #64748b)));
  font-style: italic;
}

/* Make parent containers allow overflow for the popup */
.search-header-left {
  position: relative;
  overflow: visible;
}

.controls-card h2 {
  position: relative;
  overflow: visible;
}

.search-category-tabs {
  display: inline-flex;
  gap: 4px;
  background: rgba(120, 120, 120, 0.08);
  padding: 4px;
  border-radius: 100px;
  border: 1px solid var(--border);
}

.search-cat-tab {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 100px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-cat-tab:hover {
  color: var(--text);
}

.search-cat-tab.active {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.search-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-stats-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.search-filter-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-filter-pill-btn:hover {
  border-color: var(--accent);
}

.search-filter-pill-btn.active {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent);
}

.search-filter-badge {
  background: #0284c7;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 100px;
}

.search-filters-panel {
  background: var(--surface-solid, rgba(120, 120, 120, 0.05));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  animation: fadeIn 0.2s ease;
}

.search-filters-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
}

.search-filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 150px;
  flex: 1;
}

.search-filter-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-filter-select {
  padding: 7px 10px;
  font-size: 12.5px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  width: 100%;
}

.search-filter-actions {
  flex: 0 0 auto;
  min-width: auto;
}

.search-view-mode-group {
  display: inline-flex;
  border-radius: 100px;
  padding: 3px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.search-mode-btn {
  padding: 5px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 100px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-mode-btn.active {
  background: var(--primary, var(--accent));
  color: #ffffff;
}

.saved-counter-badge {
  background: rgba(255, 255, 255, 0.25);
  font-size: 11px;
  padding: 0 5px;
  border-radius: 10px;
}

.search-mode-btn:not(.active) .saved-counter-badge {
  background: var(--bg-elev, rgba(120, 120, 120, 0.2));
  color: var(--text);
}

/* Controls Bar */
.search-controls-bar {
  display: flex;
  gap: 12px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 14px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px -6px rgba(0, 0, 0, 0.05);
}

.search-input-wrap,
.search-location-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-input-icon {
  position: absolute;
  left: 12px;
  color: var(--muted);
  pointer-events: none;
}

.search-input-field {
  width: 100%;
  padding: 10px 12px 10px 40px;
  border: 1px solid transparent;
  background: rgba(120, 120, 120, 0.06);
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  transition: all 0.2s ease;
}

.search-input-field:focus {
  background: var(--surface-solid);
  border-color: var(--primary, var(--accent));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, var(--accent)) 20%, transparent);
}

.search-submit-btn {
  padding: 0 24px;
  height: 42px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 10px;
}

/* 2-Column Main Layout */
.jobs-main-layout {
  display: grid;
  grid-template-columns: 410px 1fr;
  gap: 20px;
  align-items: flex-start;
}

@media (max-width: 960px) {
  .jobs-main-layout {
    grid-template-columns: 1fr;
  }
}

/* Left Pane: Job Cards List */
.jobs-list-pane {
  max-height: calc(100vh - 215px);
  overflow-y: auto;
  padding-right: 6px;
}

.jobs-cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.job-card {
  background: var(--surface-solid);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.job-card:hover {
  border-color: color-mix(in srgb, var(--primary, var(--accent)) 45%, var(--border));
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.job-card.selected {
  border-color: var(--primary, var(--accent)) !important;
  box-shadow: 0 0 0 1px var(--primary, var(--accent)), var(--shadow-soft);
  background: var(--surface-solid);
}

.job-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.job-card-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary, var(--accent));
  background: color-mix(in srgb, var(--primary, var(--accent)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary, var(--accent)) 25%, transparent);
  padding: 3px 8px;
  border-radius: 6px;
}

.job-bookmark-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.job-bookmark-btn:hover {
  color: var(--text);
  background: rgba(120, 120, 120, 0.1);
}

.job-bookmark-btn.saved {
  color: #f59e0b;
}

.job-card-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.job-company-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.job-card-titles {
  flex: 1;
  min-width: 0;
}

.job-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-card-company {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
  font-weight: 500;
}

.job-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.job-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.job-card-skills {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skills-label {
  font-weight: 600;
  color: var(--text);
  margin-right: 4px;
}

.job-card-footer {
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.similar-jobs-toggle {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 0;
}

.similar-jobs-toggle:hover {
  color: var(--accent);
}

/* Right Pane: Job Details View */
.job-detail-pane {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
}

.job-detail-top-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary, var(--accent));
  background: color-mix(in srgb, var(--primary, var(--accent)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary, var(--accent)) 25%, transparent);
  padding: 3px 10px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 16px;
}

.job-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.job-detail-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.job-detail-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}

.job-detail-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  line-height: 1.25;
}

.job-detail-company {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 4px;
}

.job-detail-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-action-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.icon-action-btn:hover {
  color: var(--text);
  border-color: var(--text);
}

.icon-action-btn.saved {
  color: #f59e0b;
  border-color: #f59e0b;
}

/* CTA Row with RUN AGENT */
.job-detail-cta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.btn-run-agent {
  background: linear-gradient(180deg, var(--primary, var(--accent)), var(--accent-pressed, var(--accent)));
  color: #ffffff;
  padding: 12px 28px;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-run-agent:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn-run-agent:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-run-agent.applied {
  background: #10b981 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3) !important;
  cursor: default;
}

.job-run-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.job-run-pill.applied {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
}

.job-run-pill.running {
  color: var(--primary, var(--accent));
  background: color-mix(in srgb, var(--primary, var(--accent)) 12%, transparent);
}

.btn-external-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-external-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.agent-status-banner {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.4;
}

.agent-status-banner.running {
  background: color-mix(in srgb, var(--primary, var(--accent)) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary, var(--accent)) 25%, transparent);
  color: var(--text);
}

.agent-status-banner.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #10b981;
}

.agent-status-banner.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

/* Attributes Row */
.job-attributes-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
  padding: 14px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.attr-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.attr-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Detail Sections */
.job-detail-section {
  margin-bottom: 22px;
}

.detail-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px 0;
}

.skills-tags-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
}

.skill-tag.must-have {
  background: color-mix(in srgb, var(--primary, var(--accent)) 12%, transparent);
  color: var(--primary, var(--accent));
  border: 1px solid color-mix(in srgb, var(--primary, var(--accent)) 25%, transparent);
}

.skill-tag.good-to-have {
  background: color-mix(in srgb, var(--success) 12%, transparent);
  color: var(--success);
  border: 1px solid color-mix(in srgb, var(--success) 25%, transparent);
}

.detail-section-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.description-text p {
  margin: 0 0 8px 0;
}

.description-text li {
  margin-left: 18px;
  margin-bottom: 4px;
}

.jobs-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--text);
}

/* Search Agent Live Scanner Box */
.search-agent-live-scanner {
  background: var(--surface-solid);
  border: 1.5px solid color-mix(in srgb, var(--primary, var(--accent)) 35%, var(--border));
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--primary, var(--accent)) 20%, transparent);
  animation: fadeIn 0.3s ease-in-out;
}

.scanner-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.scanner-icon-pulse {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary, var(--accent)) 16%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.scanner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary, var(--accent));
  animation: scannerPulse 1.5s infinite;
}

@keyframes scannerPulse {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary, var(--accent)) 70%, transparent);
  }

  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 8px transparent;
  }

  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 transparent;
  }
}

.scanner-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13.5px;
}

.scanner-title strong {
  color: var(--text);
  font-size: 14px;
}

.scanner-title span {
  color: var(--muted);
  font-size: 12.5px;
}

.scanner-progress-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-elev, rgba(120, 120, 120, 0.15));
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 14px;
}

.scanner-progress-fill {
  width: 35%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary, var(--accent)), var(--success, #10b981));
  border-radius: 4px;
  animation: scannerSlide 1.2s infinite ease-in-out;
}

@keyframes scannerSlide {
  0% {
    transform: translateX(-100%);
    width: 30%;
  }

  50% {
    width: 60%;
  }

  100% {
    transform: translateX(300%);
    width: 30%;
  }
}

.scanner-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scanner-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  transition: all 0.2s;
}

.scanner-step.active {
  color: var(--primary, var(--accent));
  font-weight: 600;
}

.scanner-step svg {
  flex-shrink: 0;
}





/* ═══════════════════════════════════════════════════════
   SEARCH PAGE  -  Sub-tabs & Agent Runs Sub-page
   ═══════════════════════════════════════════════════════ */

/* Sub-tab bar that appears below the search controls */
.search-subtab-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0 0 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.search-subtab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted, #94a3b8);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
  position: relative;
  bottom: -1px;
}

.search-subtab-btn:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--primary, var(--accent)) 8%, transparent);
}

.search-subtab-btn.active {
  color: var(--primary, var(--accent));
  border-bottom-color: var(--primary, var(--accent));
  background: color-mix(in srgb, var(--primary, var(--accent)) 8%, transparent);
}

/* Badge on Agent Runs tab button */
.agent-runs-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: var(--primary, var(--accent));
  border-radius: 999px;
}

/* Sub-page containers */
.search-subpage {
  display: none;
}

.search-subpage.search-subpage--active {
  display: block !important;
}

/* ── Agent Runs Page ─────────────────────────────────── */
.agent-runs-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 400px;
}

.agent-runs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.agent-runs-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.agent-runs-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin: 3px 0 0 0;
}

.agent-runs-stat-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted, #94a3b8);
  background: rgba(120, 120, 120, 0.1);
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* List */
.agent-runs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.agent-runs-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 60px 20px;
  color: var(--muted);
  text-align: center;
}

.agent-runs-empty p {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.agent-runs-empty span {
  font-size: 12px;
  color: var(--muted);
  max-width: 320px;
}

.agent-runs-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px;
  color: var(--muted);
  font-size: 13px;
}

/* Individual Run Card */
.run-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: var(--card-bg, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: background 0.2s, border-color 0.2s, opacity 0.25s, transform 0.25s;
}

.run-card:hover {
  background: color-mix(in srgb, var(--primary, var(--accent)) 6%, transparent);
  border-color: color-mix(in srgb, var(--primary, var(--accent)) 25%, var(--border));
}

.run-card.is-running-card {
  border-color: var(--primary, var(--accent));
  background: color-mix(in srgb, var(--primary, var(--accent)) 5%, transparent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--primary, var(--accent)) 10%, transparent);
}

.run-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.run-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.run-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.run-card-info {
  min-width: 0;
}

.run-card-role {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.run-card-company {
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
}

.run-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.run-card-time {
  font-size: 11px;
  color: var(--muted);
  white-space: pre-line;
}

.run-card-by {
  font-size: 11px;
  color: var(--muted);
}

.run-card-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Progress bar inside run card */
.run-card-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 2px;
}

.run-card-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.run-card-step-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  padding-top: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.run-step-msg {
  color: #a5b4fc;
  font-size: 11.5px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-logs-toggle-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.run-logs-toggle-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.run-card-logs {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  line-height: 1.6;
  color: #94a3b8;
  max-height: 240px;
  overflow-y: auto;
}

.run-log-line {
  word-break: break-all;
}

.run-failure-screenshot {
  margin: 2px 0 0;
  overflow: hidden;
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 10px;
  background: rgba(127, 29, 29, 0.08);
}

.run-failure-screenshot figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  color: #fca5a5;
  font-size: 11.5px;
  font-weight: 600;
  border-bottom: 1px solid rgba(239, 68, 68, 0.18);
}

.run-failure-screenshot figcaption a {
  color: #c4b5fd;
  font-weight: 500;
  text-decoration: none;
}

.run-failure-screenshot-link {
  display: block;
  padding: 10px;
  background: rgba(2, 6, 23, 0.55);
}

.run-failure-screenshot img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  object-position: top center;
  border-radius: 7px;
  background: #fff;
  cursor: zoom-in;
}

.decision-info .run-failure-screenshot {
  margin-top: 10px;
}

/* Status badges */
.run-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.run-status--queued {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.run-status--running {
  background: color-mix(in srgb, var(--primary, var(--accent)) 14%, transparent);
  color: var(--primary, var(--accent));
  border: 1px solid color-mix(in srgb, var(--primary, var(--accent)) 30%, transparent);
}

.run-status--done {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.run-status--failed {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

/* Animated spinner inside status badge for queued/running */
.run-spinner {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.run-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.run-card-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--primary, var(--accent));
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--primary, var(--accent)) 30%, transparent);
  border-radius: 6px;
  transition: background 0.18s;
  white-space: nowrap;
}

.run-card-link-btn:hover {
  background: color-mix(in srgb, var(--primary, var(--accent)) 12%, transparent);
}

.run-card-del-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.18s, background 0.18s;
}

.run-card-del-btn:hover {
  color: var(--danger, #ef4444);
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
}

/* ── Applied History Table & Pagination ───────────────────────── */
.apps-table-container {
  overflow-x: auto;
  min-height: 200px;
}

.apps-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.apps-table thead tr {
  border-bottom: 2px solid var(--border);
  background: var(--bg);
}

.apps-table th {
  padding: 12px 16px;
  font-weight: 600;
  color: var(--muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.apps-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.apps-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.apps-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.01);
  font-size: 13px;
}

.apps-pagination-info {
  color: var(--muted);
  font-size: 12.5px;
}

.apps-pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.apps-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.apps-page-btn:hover:not(:disabled) {
  background: var(--accent, #6366f1);
  color: #fff;
  border-color: var(--accent, #6366f1);
}

.apps-page-btn.active {
  background: var(--accent, #6366f1);
  color: #fff;
  border-color: var(--accent, #6366f1);
}

.apps-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Scraper 2-Column Layout ───────────────────────── */
/* ================================================================
   OUTREACH / SCRAPER PAGE  -  editorial layout
   ================================================================ */

/* ===== masthead ===== */
.or-masthead {
  padding: 32px 28px 24px;
  border-bottom: 1px solid var(--border);
}

.or-kicker {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin: 0 0 8px;
  text-transform: lowercase;
}

.or-masthead-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
  line-height: 1.2;
}

.or-masthead-desc {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  max-width: 540px;
  line-height: 1.6;
}

/* ===== power row (Cold Emailing Control Center) ===== */
.or-powerrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* pulse dot */
.or-pulse {
  position: relative;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.or-pulse-core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--muted);
  transition: background 0.3s;
}

.or-pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--muted);
  opacity: 0;
}

.or-pulse.or-pulse--on .or-pulse-core {
  background: var(--success);
}

.or-pulse.or-pulse--on .or-pulse-ring {
  border-color: var(--success);
  opacity: 0.6;
  animation: or-pulseout 2.2s ease-out infinite;
}

@keyframes or-pulseout {
  0% {
    transform: scale(0.5);
    opacity: 0.6;
  }

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

.or-powertext {
  flex: 1;
  min-width: 240px;
}

.or-pt-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.or-pt-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.6;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* structured summary chips */
.or-badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  line-height: 1.3;
}

.or-badge-chip strong {
  color: var(--text);
  font-weight: 600;
}

.or-badge-chip--inc strong {
  color: var(--accent);
}

.or-badge-chip--exc strong {
  color: var(--danger);
}

.or-badge-chip--safe {
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 30%, transparent);
  background: color-mix(in srgb, var(--success) 10%, transparent);
}

/* switch button */
.or-switchbtn {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--primary, var(--accent)) 0%, var(--accent-pressed, var(--accent)) 100%);
  border: 1px solid var(--border);
  color: #ffffff;
  padding: 9px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 8px;
  box-shadow: 0 4px 12px var(--primary-glow);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.or-switchbtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--primary-glow);
  filter: brightness(1.08);
}

.or-switchbtn--stop {
  background: linear-gradient(135deg, var(--danger) 0%, var(--danger-pressed) 100%);
  border-color: var(--danger);
  box-shadow: 0 4px 12px rgba(209, 67, 67, 0.3);
}

.or-switchbtn--stop:hover {
  box-shadow: 0 6px 18px rgba(209, 67, 67, 0.45);
}

/* stat block */
.or-stat {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  text-align: center;
  min-width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.or-stat-n {
  font-size: 18px;
  color: var(--text);
  font-weight: 700;
}

.or-stat-l {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-top: 1px;
}

.or-stat-sched {
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  transition: all 0.15s ease;
  min-width: 110px;
}

.or-stat-sched:hover {
  background: var(--bg-elev, var(--bg-soft));
  border-color: var(--accent);
}

.or-sch-chip {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: opacity 0.15s;
}

.or-sch-chip:hover {
  opacity: 0.85;
}

/* ===== body: rail + feed ===== */
.or-body {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

@media (max-width: 960px) {
  .or-body {
    grid-template-columns: 1fr;
  }
}

/* left rail */
.or-rail {
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* rail groups (collapsible cards) */
.or-railgroup {
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.or-rg-header {
  cursor: pointer;
  user-select: none;
  padding: 14px 18px;
  width: 100%;
  box-sizing: border-box;
  transition: background 0.15s ease;
}

.or-rg-header:hover {
  background: var(--bg-soft);
}

.or-rg-title {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
}

.or-rg-sub {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

.or-rg-chev {
  color: var(--muted);
  font-size: 12px;
  transition: transform 0.2s ease;
  display: inline-block;
}

.or-rg-chev--open {
  transform: rotate(180deg);
}

.or-rg-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.or-rg-body--open {
  max-height: 1200px;
}

.or-rg-body-in {
  padding: 0 18px 16px;
}

/* key-value inputs */
.or-kv {
  margin-bottom: 12px;
}

.or-kv:last-child {
  margin-bottom: 0;
}

.or-kv label {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 5px;
}

.or-kv input[type="text"],
.or-kv input[type="number"],
.or-kv input[type="time"] {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.or-kv input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent);
}

.or-kv2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* flag rows (toggle items) */
.or-flag {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.or-flag:first-child {
  border-top: none;
}

.or-flag-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.or-flag-desc {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  max-width: 220px;
  line-height: 1.45;
}

/* toggle switch (modern iOS style) */
.or-toggle {
  position: relative;
  width: 32px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.or-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.or-tslider {
  position: absolute;
  inset: 0;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s ease;
  border-radius: 12px;
}

.or-tslider::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  left: 2px;
  top: 2px;
  background: var(--muted);
  transition: transform 0.2s ease, background 0.2s ease;
  border-radius: 50%;
}

.or-toggle input:checked+.or-tslider {
  background: var(--accent);
  border-color: var(--accent);
}

.or-toggle input:checked+.or-tslider::before {
  transform: translateX(14px);
  background: #ffffff;
}

/* small buttons */
.or-small-btn {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  border-radius: 6px;
  white-space: nowrap;
}

.or-small-btn:hover {
  background: var(--bg-elev, var(--bg-soft));
  border-color: var(--accent);
}

.or-small-btn--danger {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 30%, transparent);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}

.or-small-btn--danger:hover {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 20%, transparent);
}

/* ===== right feed ===== */
.or-feed {
  padding: 20px 24px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}

.or-feedhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.or-feedhead h2 {
  font-size: 14.5px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.or-feedcnt {
  font-size: 11.5px;
  color: var(--muted);
}

/* funnel in feed */
.or-funnel {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 640px) {
  .or-funnel {
    grid-template-columns: repeat(2, 1fr);
  }
}

.or-funnel-arrow {
  display: none !important;
}

.or-funnel .funnel-chip {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.or-funnel .funnel-chip:hover {
  background: var(--bg-elev, var(--bg-soft));
  border-color: var(--accent);
  transform: translateY(-1px);
}

.or-funnel .funnel-chip-num {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.or-funnel .funnel-chip-label {
  font-size: 9.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* action bar */
.or-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.or-search-input {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  padding: 7px 12px;
  width: 220px;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.or-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent);
}

.or-search-input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.or-filter-select {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
}

/* entry cards (Clean elevated cards) */
.or-entry {
  display: grid;
  grid-template-columns: 20px 75px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 10px;
  align-items: start;
  transition: all 0.15s ease;
}

.or-entry:hover {
  background: var(--bg-elev, var(--bg-soft));
  border-color: var(--accent);
  box-shadow: var(--shadow-soft);
}

.or-entry.or-entry--selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.or-entry-check {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 2px;
}

.lead-select-checkbox {
  cursor: pointer;
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
}

.or-entry-ts {
  font-size: 11px;
  color: var(--muted);
  font-family: monospace;
  line-height: 1.4;
  padding-top: 2px;
}

.or-entry-main {
  min-width: 0;
}

.or-entry-who {
  font-size: 13.5px;
  font-weight: 600;
  margin: 0 0 1px;
  color: var(--text);
}

.or-entry-from {
  font-size: 11.5px;
  color: var(--muted);
  margin: 0 0 6px;
}

.or-entry-from b {
  color: var(--text);
  font-weight: 600;
}

.or-entry-snippet {
  font-size: 12px;
  color: var(--text);
  line-height: 1.55;
  margin: 6px 0;
  padding: 8px 12px;
  background: var(--bg-soft);
  border-radius: 6px;
  border-left: 3px solid var(--accent);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.15s ease;
}

.or-entry-snippet.or-entry-snippet--expanded {
  -webkit-line-clamp: unset !important;
  display: block !important;
  white-space: normal !important;
  max-height: none !important;
  overflow: visible !important;
}

.or-entry-email {
  font-family: monospace;
  font-size: 11.5px;
  color: var(--primary, var(--accent));
  margin-top: 4px;
}

.or-entry-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* side column */
.or-entry-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  padding-top: 2px;
}

.or-status {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.or-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.or-status--sent {
  color: #4ade80;
}

.or-status--sent .or-status-dot {
  background: #4ade80;
}

.or-status--pending {
  color: #fbbf24;
}

.or-status--pending .or-status-dot {
  background: #fbbf24;
}

.or-status--skip {
  color: #f87171;
}

.or-status--skip .or-status-dot {
  background: #f87171;
}

.or-mailbtn {
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  border-radius: 6px;
}

.or-mailbtn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
  color: var(--text);
}

.or-mailbtn--danger {
  color: #f87171;
}

.or-mailbtn--danger:hover {
  border-color: #f87171;
  color: #f87171;
}

/* empty state */
.or-empty-state {
  padding: 36px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* log section in feed */
.or-log-section {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.or-log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* pagination for outreach stream */
.or-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  flex-wrap: wrap;
  gap: 12px;
}

.or-pagination-info {
  font-size: 11.5px;
  color: var(--text-muted);
}

.or-pagination-info strong {
  color: var(--text);
  font-weight: 600;
}

.or-pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.or-page-btn {
  font-size: 11.5px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
}

.or-page-btn:hover:not(:disabled) {
  border-color: var(--text);
  color: var(--text);
}

.or-page-btn.active {
  border-color: #e3a33e;
  color: #e3a33e;
  background: rgba(227, 163, 62, 0.1);
  font-weight: 600;
}

.or-page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ── Production / Headless-only Environment Controls ── */
body.env-headless-only .headless-control,
body.env-headless-only .control-group:has(#headlessCheck),
body.env-headless-only .toggle:has(#headlessCheck),
body.env-headless-only .toggle:has(input[id^="headless-"]),
body.env-headless-only .toggle:has(input[id^="sch-headless-"]),
body.env-headless-only .or-trow:has(#headless-lead_scraper),
body.env-headless-only .sch-headless-row {
  display: none !important;
}

/* ── Nested Settings Messaging Subtabs ── */
.settings-msg-subtabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.settings-msg-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.settings-msg-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: color-mix(in srgb, var(--primary, var(--accent)) 35%, transparent);
}

.settings-msg-tab.active {
  color: #fff;
  background: var(--primary, var(--accent));
  border-color: var(--primary, var(--accent));
  font-weight: 600;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--primary, var(--accent)) 35%, transparent);
}

.settings-msg-panel {
  display: none;
}

.settings-msg-panel.active {
  display: block;
}

/* ─── Global Toast Notifications ────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 420px;
}

.toast-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius-sm, 9px);
  background: var(--bg-elev, var(--bg-card, #1f1d2e));
  color: var(--text, #e2e8f0);
  border: 1px solid var(--border, rgba(120, 120, 120, 0.25));
  box-shadow: var(--shadow, 0 16px 40px rgba(0, 0, 0, 0.45));
  font-size: 13px;
  font-weight: 500;
  pointer-events: auto;
  animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast-item--ok {
  border-left: 4px solid var(--success, #10b981);
}

.toast-item--info {
  border-left: 4px solid var(--accent, #818cf8);
}

.toast-item--bad {
  border-left: 4px solid var(--danger, #ef4444);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.95);
  }

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

.save-schedule-btn.btn--saved-success {
  background: var(--success, #10b981) !important;
  border-color: var(--success, #10b981) !important;
  color: #ffffff !important;
}




/* Referral campaigns & subpages */
.referral-subnav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  margin: 0 0 16px;
}

.referral-subnav-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  outline: none;
}

.referral-subnav-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.referral-subnav-btn.active {
  background: var(--primary, #6366f1);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.referral-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.referral-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #cbd5e1);
}

.referral-form .input,
.referral-form textarea {
  padding: 7px 10px;
  font-size: 13px;
  border-radius: 8px;
  min-height: 36px;
}

.referral-form textarea {
  min-height: 60px;
  resize: vertical;
  line-height: 1.45;
}

.referral-form label small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}

.referral-wide {
  grid-column: 1 / -1;
}

.referral-form-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.referral-form-actions .btn {
  padding: 7px 16px;
  font-size: 13px;
  min-height: 36px;
  border-radius: 8px;
}

/* Referral People Table */
.referral-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface, #18181b);
}

.referral-people-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.referral-people-table th {
  padding: 10px 14px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #94a3b8);
  background: var(--bg-elev, #27272a);
  border-bottom: 1px solid var(--border);
}

.referral-people-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.referral-table-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.referral-table-row:hover {
  background: var(--bg-hover, rgba(255, 255, 255, 0.04));
}

.referral-table-row.referral-row-expanded {
  background: var(--bg-hover, rgba(255, 255, 255, 0.03));
}

.referral-person-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #f8fafc);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.referral-person-company {
  color: var(--muted, #94a3b8);
  font-weight: 500;
}

.referral-person-headline {
  font-size: 12px;
  color: var(--muted, #94a3b8);
  margin-top: 2px;
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.referral-linkedin-link {
  color: var(--primary, #38bdf8);
  font-weight: 500;
  font-size: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(56, 189, 248, 0.08);
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  transition: all 0.15s ease;
}

.referral-linkedin-link:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.4);
}

.referral-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--bg-elev, #27272a);
  border: 1px solid var(--border);
  color: var(--text, #f8fafc);
}

.referral-status-badge.status-request_sent,
.referral-status-badge.status-invited {
  background: rgba(234, 179, 8, 0.12);
  color: #facc15;
  border-color: rgba(234, 179, 8, 0.3);
}

.referral-status-badge.status-accepted,
.referral-status-badge.status-connected {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.3);
}

.referral-status-badge.status-messaged,
.referral-status-badge.status-followup,
.referral-status-badge.status-conversation,
.referral-status-badge.status-discussion {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

.referral-status-badge.status-agreed,
.referral-status-badge.status-referred {
  background: rgba(168, 85, 247, 0.14);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.35);
}

.referral-status-badge.status-declined,
.referral-status-badge.status-closed {
  background: rgba(100, 116, 139, 0.14);
  color: #94a3b8;
  border-color: rgba(100, 116, 139, 0.25);
}

.referral-status-badge.status-employment_unverified,
.referral-status-badge.status-needs_you {
  background: rgba(244, 63, 94, 0.12);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.3);
}

.referral-activity-time {
  font-size: 12px;
  color: var(--muted, #94a3b8);
  white-space: nowrap;
}

.referral-cell-actions {
  white-space: nowrap;
}

.referral-expand-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted, #94a3b8);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 12px;
  cursor: pointer;
  margin-left: 6px;
  transition: all 0.15s ease;
}

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

.btn--xs {
  padding: 3px 8px;
  font-size: 11.5px;
  min-height: 26px;
  border-radius: 6px;
}

.btn--danger-hover:hover {
  color: var(--danger, #f87171) !important;
  border-color: rgba(248, 113, 113, 0.35) !important;
}

.referral-detail-row td {
  background: rgba(0, 0, 0, 0.2);
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.referral-detail-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.referral-detail-section h4 {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted, #94a3b8);
  margin: 0 0 6px 0;
}

.referral-message {
  padding: 9px 13px;
  margin: 4px 0;
  border-radius: 8px;
  background: var(--bg-elev, #27272a);
  border: 1px solid var(--border);
  white-space: pre-wrap;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text, #e2e8f0);
}

#referralsBadge:not(:empty) {
  border-radius: 10px;
  padding: 1px 5px;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
}

@media (max-width: 700px) {
  .referral-form {
    grid-template-columns: 1fr;
  }
}

.referral-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.referral-people-filters {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin: 10px 0 14px;
  flex-wrap: wrap;
}

.referral-people-filters label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
}

.referral-people-filters .input {
  padding: 6px 10px;
  font-size: 13px;
  min-height: 34px;
}

#referralsCampaignsView label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 10px 0 14px;
}

#referralsCampaignsView label .input {
  width: 100%;
}

#referralsCampaigns a {
  color: var(--primary, var(--accent));
  text-underline-offset: 3px;
}

#referralsCampaigns details {
  margin-top: 10px;
}

/* Campaign card & library */
#referralsStatus:empty {
  display: none;
}

.referral-campaign-card {
  margin: 10px 0;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.referral-campaign-heading,
.referral-campaign-footer,
.referral-review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.referral-campaign-heading h3 {
  margin: 3px 0 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.referral-review-header h2 {
  margin: 4px 0 0;
  font-size: 18px;
  line-height: 1.3;
}

.referral-eyebrow {
  color: var(--primary, var(--accent));
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
}

.referral-campaign-state {
  border-radius: 14px;
  padding: 4px 10px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  background: color-mix(in srgb, var(--primary, var(--accent)) 12%, transparent);
  color: var(--text);
}

.referral-campaign-state.active {
  background: rgba(70, 180, 130, 0.15);
  color: #80d9ac;
}

.referral-next-step {
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0;
}

.referral-campaign-stats {
  display: flex;
  gap: 20px;
  padding: 8px 0;
  margin-bottom: 6px;
}

.referral-campaign-stats>div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.referral-campaign-stats strong {
  font-size: 16px;
  font-weight: 700;
}

.referral-campaign-stats span {
  font-size: 11px;
  color: var(--muted);
}

.referral-campaign-footer {
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}

.referral-card-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.referral-card-actions .btn {
  padding: 4px 10px;
  font-size: 12px;
  min-height: 28px;
  border-radius: 6px;
}

/* Run timing countdown pill box */
.referral-run-timing {
  margin: 8px 0 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary, var(--accent));
  border-radius: 8px;
  background: var(--bg);
}

.referral-run-timing strong {
  font-size: 12px;
}

.referral-run-timing p {
  margin: 4px 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.referral-run-timing small {
  color: var(--muted);
  font-size: 11px;
}

.referral-timing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.referral-timing-title {
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.referral-timing-title.running {
  color: #6ee7b7;
  font-weight: 700;
}

.referral-timing-title.queued {
  color: #fde047;
  font-weight: 700;
}

.referral-timing-title.active {
  color: var(--text);
  font-weight: 600;
}

.referral-timing-title.paused {
  color: var(--muted);
}

.referral-timing-desc {
  font-size: 12px;
  color: var(--text);
  opacity: 0.85;
  margin: 3px 0 !important;
}

.referral-timing-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.referral-timing-warn {
  color: #f87171 !important;
  font-size: 11px !important;
  margin-top: 6px !important;
  background: rgba(239, 68, 68, 0.1);
  padding: 6px 10px;
  border-radius: 6px;
}

/* Schedule banner & expectations */
.referral-schedule-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(168, 85, 247, 0.08) 100%);
  border: 1px solid rgba(99, 102, 241, 0.22);
  margin-bottom: 14px;
}

.referral-schedule-icon {
  font-size: 16px;
  line-height: 1.2;
}

.referral-schedule-banner strong {
  font-size: 12px;
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}

.referral-schedule-banner p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.referral-expectations {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.referral-expectations h3 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  color: var(--muted);
}

.referral-steps-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 900px) {
  .referral-steps-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

.referral-step-card {
  padding: 10px;
  border-radius: 8px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.referral-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary, #6366f1);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.referral-step-card strong {
  font-size: 12px;
  color: var(--text);
}

.referral-step-card p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
  margin: 0;
}

/* Campaign review dialog / card */
.referral-review-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  background: var(--surface);
  margin-top: 10px;
}

.referral-job-link {
  display: inline-block;
  color: var(--primary, var(--accent));
  font-size: 12px;
  margin-top: 8px;
}

.referral-review-lead {
  max-width: 780px;
  color: var(--muted);
  line-height: 1.5;
  margin: 12px 0;
  font-size: 13px;
}

.referral-review-steps {
  display: flex;
  gap: 16px;
  list-style: none;
  counter-reset: review;
  margin: 0 0 18px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.referral-review-steps li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  counter-increment: review;
}

.referral-review-steps li::before {
  content: counter(review);
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11px;
}

.referral-review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.referral-review-grid h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.referral-review-grid p {
  font-size: 13px;
  line-height: 1.5;
}

.referral-review-fields label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0 6px;
  font-size: 12px;
  font-weight: 600;
}

.referral-review-fields .input {
  width: 100%;
}

.referral-review-fields textarea {
  resize: vertical;
  font: inherit;
  line-height: 1.5;
  font-size: 13px;
}

#referralReviewLimit {
  max-width: 100px;
}

.referral-review-fields small,
.referral-review-preview small {
  display: block;
  font-size: 11px;
  line-height: 1.5;
}

.referral-review-preview {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  background: var(--bg);
}

.referral-review-preview h4 {
  font-size: 11px;
  color: var(--muted);
  margin: 14px 0 6px;
}

.referral-preview-message {
  border-left: 2px solid var(--primary, var(--accent));
  padding: 8px 12px;
  margin: 0 0 10px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-size: 12px;
}

.referral-review-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.referral-review-actions p {
  margin: 4px 0 0;
  font-size: 11px;
}

.referral-review-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.referral-review-buttons .btn {
  min-height: 36px;
  font-size: 13px;
}

.referral-review-feedback {
  grid-column: 1 / -1;
  margin: 0;
}

.referral-review-feedback:empty {
  display: none;
}

.referral-setup-notice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 14px;
  font-size: 12px;
}

.referral-inline-error {
  border-left: 3px solid var(--danger);
  padding: 8px 12px;
  color: var(--text);
  font-size: 12px;
}

.referral-more-actions {
  margin-top: 14px;
  font-size: 11px;
  color: var(--muted);
}

.referral-more-actions summary {
  cursor: pointer;
}

#referralReview {
  scroll-margin-top: 95px;
}

@media (max-width: 760px) {
  .referral-review-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .referral-review-card,
  .referral-campaign-card {
    padding: 14px;
  }

  .referral-review-header,
  .referral-campaign-heading,
  .referral-campaign-footer,
  .referral-review-actions {
    flex-direction: column;
    gap: 10px;
  }

  .referral-review-steps {
    flex-direction: column;
    gap: 8px;
  }

  .referral-review-buttons {
    width: 100%;
  }

  .referral-review-buttons .btn {
    flex: 1;
  }

  .referral-campaign-stats {
    gap: 14px;
    flex-wrap: wrap;
  }
}

/* ==========================================================================
   Candidate Pricing UI Components (Parity with Landing Page)
   ========================================================================== */
.pricing-presets {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.preset-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface, #1e1b2d);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  color: var(--muted, #908caa);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: none;
}

.preset-btn svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  stroke: currentColor;
}

.preset-btn:hover {
  background: var(--bg-elev, rgba(38, 35, 58, 0.8));
  color: var(--text, #e0def4);
  border-color: var(--border-soft, rgba(255, 255, 255, 0.2));
}

.preset-btn.active {
  background: var(--bg-elev, rgba(38, 35, 58, 0.95));
  color: var(--accent, #ebbcba);
  border-color: var(--accent, #ebbcba);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  font-weight: 700;
}

.currency-select-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--muted);
}

.currency-dropdown {
  background: var(--surface-solid, rgba(30, 27, 45, 0.9));
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 10px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  outline: none;
  cursor: pointer;
}

.feature-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .feature-picker-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .feature-picker-grid {
    grid-template-columns: 1fr;
  }
}

.feature-select-card {
  position: relative;
  background: var(--surface-solid, rgba(30, 27, 45, 0.8));
  border: 1px solid var(--border);
  border-radius: var(--radius, 12px);
  padding: 16px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  user-select: none;
}

.feature-select-card:hover {
  border-color: var(--border-soft, rgba(255, 255, 255, 0.2));
  transform: translateY(-2px);
}

.feature-select-card.active {
  border-color: var(--accent);
  background: var(--bg-elev, rgba(38, 35, 58, 0.9));
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.feature-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.feature-select-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.feature-select-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--bg-soft, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border-soft, rgba(255, 255, 255, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.feature-select-icon svg {
  display: block;
  stroke: currentColor;
}

.feature-check-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-soft, rgba(255, 255, 255, 0.05));
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.feature-check-indicator svg {
  display: none;
  stroke: #191724;
}

.feature-select-card.active .feature-check-indicator {
  background: var(--success, #4ade80);
  border-color: var(--success, #4ade80);
}

.feature-select-card.active .feature-check-indicator svg {
  display: block;
}

.feature-select-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.feature-select-desc {
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
  margin-bottom: 12px;
  min-height: 46px;
  flex-grow: 1;
}

.feature-select-price {
  border-top: 1px solid var(--border-soft, rgba(255, 255, 255, 0.08));
  padding-top: 10px;
  display: flex;
  flex-direction: column;
}

.feat-rate {
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
}

.feat-unit {
  font-size: 10.5px;
  color: var(--muted);
  margin-left: 2px;
}

.feat-subtext {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 2px;
}

.card-interactive-glow {
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.card-interactive-glow:hover {
  box-shadow: 0 0 20px rgba(235, 188, 186, 0.12);
}

.unified-pricing-card {
  background: var(--surface);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius, 14px);
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  margin-bottom: 24px;
}

.unified-card-topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 44px;
}

.bundle-summary-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.bundle-discount-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(149, 177, 172, 0.15);
  border: 1px solid rgba(149, 177, 172, 0.35);
  color: var(--success, #4ade80);
  font-size: 12px;
  font-weight: 700;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.2s ease;
}

.bundle-discount-badge .sparkle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--success, #4ade80);
}

.bundle-discount-badge .sparkle svg {
  display: block;
  stroke: currentColor;
}

.bundle-selected-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.cadence-toggle-wrap {
  display: inline-flex;
  align-items: center;
  background: var(--bg-body, #191724);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.cadence-btn {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.cadence-btn:hover {
  color: var(--text);
}

.cadence-btn.active {
  background: var(--surface-solid, rgba(38, 35, 58, 0.95));
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  font-weight: 700;
}

.save-pill {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(149, 177, 172, 0.2);
  color: #95b1ac;
  border: 1px solid rgba(149, 177, 172, 0.4);
}

.unified-checkout-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 56px;
}

.bundle-term-note {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
  min-height: 36px;
  display: flex;
  align-items: center;
}

.bundle-summary-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bundle-price-wrap {
  text-align: right;
  width: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.bundle-original-price {
  font-size: 12px;
  color: var(--muted);
  text-decoration: line-through;
  height: 16px;
  line-height: 16px;
  margin-bottom: 1px;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.bundle-final-price {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
  transition: color 0.2s ease;
}

.bundle-monthly-equiv {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  height: 16px;
  line-height: 16px;
}

.btn-checkout-bundle {
  padding: 12px 24px;
  font-size: 13.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 9px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  cursor: pointer;
  letter-spacing: 0.1px;
}

.btn-checkout-bundle:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%) !important;
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.65), 0 0 12px rgba(52, 211, 153, 0.5) !important;
  transform: translateY(-1.5px) scale(1.02);
  color: #ffffff !important;
}

.btn-checkout-bundle:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4) !important;
}

.btn-checkout-bundle svg {
  stroke: #ffffff !important;
  stroke-width: 2.8px;
  transition: transform 0.2s ease;
}

.btn-checkout-bundle:hover svg {
  transform: translateX(3px);
}

.unified-card-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), var(--border), transparent);
  margin: 2px 0;
}

.pricing-decay-chart-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.decay-chart-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: flex-start;
  gap: 20px;
  min-height: 64px;
}

.decay-chart-title-wrap {
  min-width: 0;
}

.decay-chart-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(235, 188, 186, 0.12);
  border: 1px solid rgba(235, 188, 186, 0.28);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
  transition: all 0.2s ease;
}

.decay-chart-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2px 0;
}

.decay-chart-desc {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
  min-height: 32px;
}

.decay-chart-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
}

.decay-stat-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--bg-elev, rgba(38, 35, 58, 0.8));
  border: 1px solid var(--border);
  text-align: center;
  width: 145px;
  height: 52px;
  box-sizing: border-box;
  justify-content: center;
}

.decay-stat-box.highlight {
  border-color: rgba(235, 188, 186, 0.4);
  background: rgba(235, 188, 186, 0.08);
}

.decay-stat-label {
  font-size: 9.5px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.decay-stat-val {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}

.decay-chart-stage {
  position: relative;
  width: 100%;
  height: 230px;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 10%, rgba(235, 188, 186, 0.09) 0%, rgba(17, 15, 25, 0.5) 100%);
  border: 1px solid var(--border-soft, rgba(255, 255, 255, 0.1));
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.decay-svg {
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
}

.decay-grid-line {
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 1;
}

.decay-floor-path {
  stroke: rgba(149, 177, 172, 0.6);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.decay-area-polygon {
  pointer-events: none;
}

.decay-curve-line {
  pointer-events: none;
  filter: drop-shadow(0 3px 6px rgba(235, 188, 186, 0.3));
}

.decay-node-group {
  cursor: pointer;
}

.decay-node-group .decay-pill-wrap {
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.decay-node-group.badge-hidden .decay-pill-wrap {
  opacity: 0;
  pointer-events: none;
}

.decay-node-group.badge-hidden:hover .decay-pill-wrap {
  opacity: 1;
  pointer-events: auto;
}

.decay-node-ring {
  fill: #191724;
  stroke: var(--accent);
  stroke-width: 2px;
  transition: r 0.2s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.2s ease, stroke-width 0.2s ease;
}

.decay-node-ring.is-floor {
  stroke: #95b1ac;
}

.decay-node-dot {
  fill: var(--accent);
  transition: fill 0.2s ease, r 0.2s ease;
}

.decay-node-dot.is-floor {
  fill: #95b1ac;
}

.decay-pill-bg {
  fill: rgba(38, 35, 58, 0.95);
  stroke: rgba(196, 167, 231, 0.65);
  stroke-width: 1px;
  transition: stroke 0.2s ease, fill 0.2s ease;
}

.decay-pill-bg.is-floor {
  fill: rgba(25, 36, 33, 0.95);
  stroke: rgba(149, 177, 172, 0.7);
}

.decay-pill-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  fill: #e0def4;
  letter-spacing: -0.2px;
  pointer-events: none;
}

.decay-pill-text.is-floor {
  fill: #95b1ac;
}

.decay-x-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  fill: #908caa;
  transition: fill 0.2s ease, font-weight 0.2s ease;
  pointer-events: none;
}

.decay-x-label.is-floor {
  fill: #95b1ac;
  font-weight: 700;
}

.decay-node-group:hover .decay-node-ring {
  r: 8.5;
  stroke-width: 3px;
  stroke: #ffffff;
}

.decay-node-group:hover .decay-node-ring.is-floor {
  stroke: #a6e3a1;
}

.decay-node-group:hover .decay-node-dot {
  fill: #ffffff;
  r: 3.8;
}

.decay-node-group:hover .decay-pill-bg {
  fill: rgba(38, 35, 58, 0.98);
  stroke: var(--accent);
  stroke-width: 1.5px;
}

.decay-node-group:hover .decay-pill-bg.is-floor {
  stroke: #a6e3a1;
}

.decay-node-group:hover .decay-pill-text {
  fill: #ffffff;
  font-weight: 800;
}

.decay-node-group:hover .decay-x-label {
  fill: #ffffff;
  font-weight: 700;
}

.decay-chart-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 8px;
}

.decay-floor-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floor-line-sample {
  width: 18px;
  height: 2px;
  background: #95b1ac;
  display: inline-block;
}

.decay-total-savings {
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

/* ==========================================================================
   Premium Upgrade Modal - Frosted Glass Backdrop & Proportional Sizing
   ========================================================================== */
#premiumOverlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(12, 10, 20, 0.62) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  z-index: 10000 !important;
  display: none;
  align-items: flex-start !important;
  justify-content: center !important;
  overflow-y: auto !important;
  padding: 24px 16px !important;
}

#premiumOverlay>.card {
  max-width: 940px !important;
  width: 100% !important;
  padding: 1.35rem 1.65rem !important;
  background: rgba(25, 23, 36, 0.96) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 16px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
  position: relative !important;
  margin: auto !important;
}

#premiumOverlay .feature-picker-grid {
  gap: 10px !important;
  margin-bottom: 12px !important;
}

#premiumOverlay .feature-select-card {
  padding: 10px 12px !important;
  border-radius: 10px !important;
}

#premiumOverlay .feature-select-header {
  margin-bottom: 6px !important;
}

#premiumOverlay .feature-select-icon {
  width: 26px !important;
  height: 26px !important;
  border-radius: 6px !important;
}

#premiumOverlay .feature-select-icon svg {
  width: 14px !important;
  height: 14px !important;
}

#premiumOverlay .feature-check-indicator {
  width: 18px !important;
  height: 18px !important;
}

#premiumOverlay .feature-check-indicator svg {
  width: 10px !important;
  height: 10px !important;
}

#premiumOverlay .feature-select-title {
  font-size: 12px !important;
  font-weight: 700 !important;
  margin-bottom: 3px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#premiumOverlay .feature-select-desc {
  font-size: 10.5px !important;
  line-height: 1.35 !important;
  min-height: 38px !important;
  margin-bottom: 6px !important;
}

#premiumOverlay .feat-rate {
  font-size: 14px !important;
  font-weight: 800 !important;
}

#premiumOverlay .feat-unit {
  font-size: 10.5px !important;
}

#premiumOverlay .feat-subtext {
  font-size: 9.5px !important;
}

#premiumOverlay .unified-pricing-card {
  padding: 12px 16px !important;
  border-radius: 12px !important;
  gap: 10px !important;
}

#premiumOverlay .bundle-final-price {
  font-size: 1.6rem !important;
}

#premiumOverlay .decay-chart-stage {
  height: 155px !important;
}

#premiumOverlay .decay-chart-header {
  min-height: 48px !important;
  gap: 12px !important;
}

#premiumOverlay .decay-chart-heading {
  font-size: 1.05rem !important;
}

#premiumOverlay .decay-chart-desc {
  font-size: 10.5px !important;
}

#premiumOverlay .decay-stat-val {
  font-size: 13px !important;
}

#premiumOverlay .decay-stat-label {
  font-size: 9px !important;
}

#premiumOverlay .decay-chart-footer {
  font-size: 10.5px !important;
  margin-top: 4px !important;
}

/* ==========================================================================
   Credential Setup & Guard Overlay Components
   ========================================================================== */

.cred-guard-box {
  background: linear-gradient(135deg, rgba(30, 27, 46, 0.95), rgba(20, 17, 34, 0.98));
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 24px rgba(245, 158, 11, 0.08);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
  animation: credGuardFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.cred-guard-box--outreach {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 24px rgba(99, 102, 241, 0.1);
}

.cred-guard-header {
  margin-bottom: 12px;
}

.cred-guard-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  margin-bottom: 6px;
}

.cred-guard-box--outreach .cred-guard-badge {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.3);
}

.cred-guard-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
  animation: pulseDot 1.8s infinite;
}

.cred-guard-box--outreach .cred-guard-dot {
  background: #818cf8;
  box-shadow: 0 0 8px #818cf8;
}

@keyframes pulseDot {

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

  50% {
    opacity: 0.4;
    transform: scale(0.85);
  }
}

.cred-guard-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #f8fafc);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cred-guard-desc {
  font-size: 11.5px;
  color: var(--muted, #94a3b8);
  line-height: 1.45;
  margin: 0;
}

.cred-guard-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

@media (max-width: 640px) {
  .cred-guard-inputs {
    grid-template-columns: 1fr;
  }
}

.cred-guard-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim, #cbd5e1);
  margin-bottom: 4px;
}

.pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pw-wrap .input {
  padding-right: 34px !important;
  width: 100%;
}

.btn-pw-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--muted, #94a3b8);
  font-size: 13px;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.btn-pw-eye:hover {
  color: var(--text, #ffffff);
}

.cred-guard-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cred-guard-status {
  font-size: 11.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.connected-account-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
}

.connected-account-chip:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}

.connected-account-chip .chip-edit {
  font-size: 10px;
  color: #6ee7b7;
  text-decoration: underline;
  opacity: 0.85;
}

.cred-guard-1click-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.cred-guard-1click-title {
  color: var(--text, #f8fafc);
}

.cred-guard-1click-desc {
  color: var(--muted, #94a3b8);
}

/* ==========================================================================
   Credential Setup & Guard Overlay Light Theme Overrides (cozy, light, latte)
   ========================================================================== */

/* 1. Cozy & Warm Light Themes */
[data-theme="cozy"] .cred-guard-box,
[data-theme="light"] .cred-guard-box {
  background: linear-gradient(135deg, rgba(255, 252, 246, 0.98), rgba(247, 237, 222, 0.96));
  border: 1px solid rgba(217, 119, 6, 0.35);
  box-shadow: 0 4px 20px rgba(120, 84, 52, 0.09), 0 1px 3px rgba(120, 84, 52, 0.05);
}

[data-theme="cozy"] .cred-guard-box--outreach,
[data-theme="light"] .cred-guard-box--outreach {
  background: linear-gradient(135deg, rgba(255, 253, 250, 0.98), rgba(244, 241, 253, 0.95));
  border-color: rgba(99, 102, 241, 0.32);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.08), 0 1px 3px rgba(120, 84, 52, 0.05);
}

[data-theme="cozy"] .cred-guard-badge,
[data-theme="light"] .cred-guard-badge {
  background: rgba(217, 119, 6, 0.12);
  color: #92400e;
  border-color: rgba(217, 119, 6, 0.28);
}

[data-theme="cozy"] .cred-guard-dot,
[data-theme="light"] .cred-guard-dot {
  background: #d97706;
  box-shadow: 0 0 6px rgba(217, 119, 6, 0.6);
}

[data-theme="cozy"] .cred-guard-box--outreach .cred-guard-badge,
[data-theme="light"] .cred-guard-box--outreach .cred-guard-badge {
  background: rgba(99, 102, 241, 0.12);
  color: #4338ca;
  border-color: rgba(99, 102, 241, 0.28);
}

[data-theme="cozy"] .cred-guard-box--outreach .cred-guard-dot,
[data-theme="light"] .cred-guard-box--outreach .cred-guard-dot {
  background: #6366f1;
  box-shadow: 0 0 6px rgba(99, 102, 241, 0.5);
}

[data-theme="cozy"] .cred-guard-title,
[data-theme="light"] .cred-guard-title {
  color: #382c21 !important;
}

[data-theme="cozy"] .cred-guard-desc,
[data-theme="light"] .cred-guard-desc {
  color: #6c5d4d !important;
}

[data-theme="cozy"] .cred-guard-field label,
[data-theme="light"] .cred-guard-field label {
  color: #382c21 !important;
}

[data-theme="cozy"] .cred-guard-inputs .input,
[data-theme="light"] .cred-guard-inputs .input {
  background: #ffffff !important;
  border: 1px solid #dccfba !important;
  color: #382c21 !important;
  box-shadow: 0 1px 2px rgba(120, 84, 52, 0.05);
}

[data-theme="cozy"] .cred-guard-inputs .input:focus,
[data-theme="light"] .cred-guard-inputs .input:focus {
  border-color: var(--accent, #c06a45) !important;
  box-shadow: 0 0 0 3px rgba(192, 106, 69, 0.2) !important;
}

[data-theme="cozy"] .cred-guard-box .btn-pw-eye,
[data-theme="light"] .cred-guard-box .btn-pw-eye {
  color: #8c7c68;
}

[data-theme="cozy"] .cred-guard-box .btn-pw-eye:hover,
[data-theme="light"] .cred-guard-box .btn-pw-eye:hover {
  color: #382c21;
}

[data-theme="cozy"] .cred-guard-footer .btn--ghost,
[data-theme="light"] .cred-guard-footer .btn--ghost {
  background: var(--bg-elev, #f0e6d5);
  border: 1px solid var(--border, #e2d4bd);
  color: #382c21 !important;
}

[data-theme="cozy"] .cred-guard-footer .btn--ghost:hover,
[data-theme="light"] .cred-guard-footer .btn--ghost:hover {
  background: #e6dac6;
  border-color: #cbbea7;
  color: #382c21 !important;
}

[data-theme="cozy"] .cred-guard-1click-card,
[data-theme="light"] .cred-guard-1click-card {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(99, 102, 241, 0.22) !important;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.05);
}

[data-theme="cozy"] .cred-guard-1click-title,
[data-theme="light"] .cred-guard-1click-title {
  color: #382c21 !important;
}

[data-theme="cozy"] .cred-guard-1click-desc,
[data-theme="light"] .cred-guard-1click-desc {
  color: #6c5d4d !important;
}

[data-theme="cozy"] .cred-guard-details,
[data-theme="light"] .cred-guard-details {
  color: #6c5d4d !important;
}

[data-theme="cozy"] .cred-guard-details summary,
[data-theme="light"] .cred-guard-details summary {
  color: #6c5d4d;
}

[data-theme="cozy"] .cred-guard-details summary:hover,
[data-theme="light"] .cred-guard-details summary:hover {
  color: #382c21 !important;
}

[data-theme="cozy"] .connected-account-chip,
[data-theme="light"] .connected-account-chip {
  background: rgba(111, 155, 95, 0.15);
  color: #3f6832;
  border-color: rgba(111, 155, 95, 0.35);
}

[data-theme="cozy"] .connected-account-chip:hover,
[data-theme="light"] .connected-account-chip:hover {
  background: rgba(111, 155, 95, 0.24);
  border-color: rgba(111, 155, 95, 0.5);
}

[data-theme="cozy"] .connected-account-chip .chip-edit,
[data-theme="light"] .connected-account-chip .chip-edit {
  color: #2e4d25;
}


/* 2. Latte (Cool Catppuccin Light) */
[data-theme="latte"] .cred-guard-box {
  background: linear-gradient(135deg, #ffffff, #f7f8fb);
  border: 1px solid rgba(223, 142, 29, 0.35);
  box-shadow: 0 4px 20px rgba(76, 79, 105, 0.08), 0 1px 3px rgba(76, 79, 105, 0.04);
}

[data-theme="latte"] .cred-guard-box--outreach {
  background: linear-gradient(135deg, #ffffff, #f6f4fd);
  border-color: rgba(136, 57, 239, 0.32);
  box-shadow: 0 4px 20px rgba(136, 57, 239, 0.08), 0 1px 3px rgba(76, 79, 105, 0.04);
}

[data-theme="latte"] .cred-guard-badge {
  background: rgba(223, 142, 29, 0.12);
  color: #964200;
  border-color: rgba(223, 142, 29, 0.28);
}

[data-theme="latte"] .cred-guard-dot {
  background: #df8e1d;
  box-shadow: 0 0 6px rgba(223, 142, 29, 0.6);
}

[data-theme="latte"] .cred-guard-box--outreach .cred-guard-badge {
  background: rgba(136, 57, 239, 0.12);
  color: #7226d9;
  border-color: rgba(136, 57, 239, 0.28);
}

[data-theme="latte"] .cred-guard-box--outreach .cred-guard-dot {
  background: #8839ef;
  box-shadow: 0 0 6px rgba(136, 57, 239, 0.5);
}

[data-theme="latte"] .cred-guard-title {
  color: #303446 !important;
}

[data-theme="latte"] .cred-guard-desc {
  color: #5c5f77 !important;
}

[data-theme="latte"] .cred-guard-field label {
  color: #303446 !important;
}

[data-theme="latte"] .cred-guard-inputs .input {
  background: #ffffff !important;
  border: 1px solid var(--border, #ccd0da) !important;
  color: #303446 !important;
  box-shadow: 0 1px 2px rgba(76, 79, 105, 0.05);
}

[data-theme="latte"] .cred-guard-inputs .input:focus {
  border-color: var(--accent, #8839ef) !important;
  box-shadow: 0 0 0 3px rgba(136, 57, 239, 0.2) !important;
}

[data-theme="latte"] .cred-guard-box .btn-pw-eye {
  color: #8c8fa1;
}

[data-theme="latte"] .cred-guard-box .btn-pw-eye:hover {
  color: #303446;
}

[data-theme="latte"] .cred-guard-footer .btn--ghost {
  background: var(--bg-elev, #e6e9ef);
  border: 1px solid var(--border, #ccd0da);
  color: #303446 !important;
}

[data-theme="latte"] .cred-guard-footer .btn--ghost:hover {
  background: #dce0e8;
  border-color: #bcc0cc;
  color: #303446 !important;
}

[data-theme="latte"] .cred-guard-1click-card {
  background: #ffffff !important;
  border: 1px solid rgba(136, 57, 239, 0.22) !important;
  box-shadow: 0 2px 8px rgba(136, 57, 239, 0.05);
}

[data-theme="latte"] .cred-guard-1click-title {
  color: #303446 !important;
}

[data-theme="latte"] .cred-guard-1click-desc {
  color: #5c5f77 !important;
}

[data-theme="latte"] .cred-guard-details {
  color: #5c5f77 !important;
}

[data-theme="latte"] .cred-guard-details summary {
  color: #5c5f77;
}

[data-theme="latte"] .cred-guard-details summary:hover {
  color: #303446 !important;
}

[data-theme="latte"] .connected-account-chip {
  background: rgba(64, 160, 43, 0.14);
  color: #2b771b;
  border-color: rgba(64, 160, 43, 0.35);
}

[data-theme="latte"] .connected-account-chip:hover {
  background: rgba(64, 160, 43, 0.22);
  border-color: rgba(64, 160, 43, 0.5);
}

[data-theme="latte"] .connected-account-chip .chip-edit {
  color: #1e5613;
}


/* ============================================================
   ADMIN AUTO-PRO PROMOTION CAMPAIGN STYLES
   ============================================================ */
.promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.promo-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.promo-badge--active {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.promo-badge--active .promo-badge-dot {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: promo-pulse 1.6s infinite ease-in-out;
}

.promo-badge--scheduled {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.promo-badge--scheduled .promo-badge-dot {
  background: #3b82f6;
}

.promo-badge--exhausted {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.promo-badge--exhausted .promo-badge-dot {
  background: #a855f7;
}

.promo-badge--expired {
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.4);
}

.promo-badge--expired .promo-badge-dot {
  background: #f97316;
}

.promo-badge--disabled {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.promo-badge--disabled .promo-badge-dot {
  background: #64748b;
}

@keyframes promo-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }

  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.promo-metric-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.promo-metric-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.promo-metric-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 6px;
}

.promo-metric-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.promo-metric-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}

.promo-progress-track {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.promo-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #a855f7 100%);
  border-radius: 9999px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   VIP Promotional First-Time Pro Welcome & Walkthrough Modal
   ========================================================================== */

.promo-welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 10005;
  background: rgba(9, 7, 18, 0.82);
  -webkit-backdrop-filter: blur(16px) saturate(190%);
  backdrop-filter: blur(16px) saturate(190%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.promo-welcome-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.promo-modal-card {
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(175deg, rgba(31, 27, 46, 0.98) 0%, rgba(20, 18, 30, 0.99) 100%);
  border: 1px solid rgba(235, 188, 186, 0.3);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 50px rgba(235, 188, 186, 0.15);
  border-radius: 22px;
  padding: 2.2rem 2.4rem;
  position: relative;
  color: var(--text);
  transform: translateY(24px) scale(0.95);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.promo-welcome-overlay.active .promo-modal-card {
  transform: translateY(0) scale(1);
}

.promo-modal-glow-bar {
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #f59e0b, #ebbcba, #a855f7, transparent);
  filter: blur(1px);
  border-radius: 999px;
}

.promo-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all 0.2s ease;
  z-index: 10;
}

.promo-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text);
  transform: scale(1.08);
}

.promo-modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.promo-crown-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 12px;
}

.promo-crown-badge {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b 0%, #ec4899 50%, #8b5cf6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.45);
  animation: promo-crown-float 3.6s ease-in-out infinite;
}

@keyframes promo-crown-float {

  0%,
  100% {
    transform: translateY(0) scale(1) rotate(0deg);
  }

  50% {
    transform: translateY(-8px) scale(1.05) rotate(2deg);
  }
}

.promo-sparkle {
  position: absolute;
  pointer-events: none;
}

.promo-sparkle.sparkle-1 {
  top: -4px;
  right: -12px;
  font-size: 20px;
  animation: promo-sparkle-pulse 2.2s ease-in-out infinite;
}

.promo-sparkle.sparkle-2 {
  bottom: 0px;
  left: -14px;
  font-size: 18px;
  animation: promo-sparkle-pulse 2.7s ease-in-out infinite 0.7s;
}

@keyframes promo-sparkle-pulse {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.85) rotate(-5deg);
  }

  50% {
    opacity: 1;
    transform: scale(1.25) rotate(10deg);
  }
}

.promo-vip-pill {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 3px 14px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.promo-modal-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0 0 8px 0;
  background: linear-gradient(135deg, #ffffff 0%, #ebbcba 65%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.promo-modal-subtitle {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 630px;
  margin: 0 auto;
  line-height: 1.55;
}

.promo-highlight-badge {
  display: inline-block;
  font-weight: 800;
  font-size: 0.85rem;
  color: #34d399;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 1px 9px;
  border-radius: 6px;
  letter-spacing: 0.4px;
}

.promo-walkthrough-section {
  margin: 18px 0 16px 0;
  text-align: left;
}

.promo-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.promo-section-label span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-dim, #908caa);
}

.promo-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
  margin-bottom: 16px;
}

@media (max-width: 660px) {
  .promo-features-grid {
    grid-template-columns: 1fr;
  }

  .promo-modal-card {
    padding: 1.5rem 1.25rem;
  }
}

.promo-feat-card {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(38, 35, 58, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.promo-feat-card:hover {
  background: rgba(46, 42, 70, 0.9);
  border-color: rgba(235, 188, 186, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.promo-feat-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.promo-feat-body {
  flex: 1;
  min-width: 0;
}

.promo-feat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}

.promo-feat-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.promo-unlocked-badge {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #34d399;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 1px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}

.promo-feat-desc {
  font-size: 11.5px;
  color: var(--muted);
  margin: 0 0 5px 0;
  line-height: 1.38;
}

.promo-feat-action {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--accent);
  opacity: 0.85;
  transition: opacity 0.2s;
}

.promo-feat-card:hover .promo-feat-action {
  opacity: 1;
  text-decoration: underline;
}

.promo-steps-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(18, 16, 28, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 12px 18px;
  margin-bottom: 20px;
}

@media (max-width: 580px) {
  .promo-steps-container {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .promo-step-connector {
    display: none;
  }
}

.promo-step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.promo-step-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #191724;
  font-size: 12.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.promo-step-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.promo-step-info strong {
  font-size: 12px;
  color: var(--text);
  font-weight: 700;
}

.promo-step-info span {
  font-size: 10.5px;
  color: var(--muted);
}

.promo-step-connector {
  height: 1px;
  flex: 0.25;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 10px;
}

.promo-modal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.promo-btn-primary {
  background: linear-gradient(135deg, #ebbcba 0%, #e0a3a0 100%);
  color: #191724;
  font-size: 13.5px;
  font-weight: 700;
  border: none;
  border-radius: 11px;
  padding: 11px 26px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 6px 18px rgba(235, 188, 186, 0.32);
}

.promo-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(235, 188, 186, 0.45);
  filter: brightness(1.05);
}

.promo-btn-secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  font-weight: 600;
  border-radius: 11px;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.promo-btn-secondary:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   AI Resume Tailoring Studio (Beta) Styles
   ========================================================================== */

.resume-studio-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 20px;
  align-items: flex-start;
}

@media (max-width: 1040px) {
  .resume-studio-layout {
    grid-template-columns: 1fr;
  }
}

.resume-studio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.studio-sample-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.studio-sample-btn:hover {
  background: rgba(235, 188, 186, 0.12);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.studio-kw-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: #34d399;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.studio-tab-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 7px;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.studio-tab-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}

.studio-tab-btn.active {
  background: var(--accent);
  color: #191724;
  border-color: var(--accent);
  font-weight: 700;
}

.studio-saved-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
  transition: background 0.2s;
}

.studio-saved-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.badge-beta-nav {
  font-size: 8.5px;
  font-weight: 800;
  background: rgba(235, 188, 186, 0.18);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   Interactive LaTeX Studio & PDF Print Styles
   ========================================================================== */
@media print {
  body * {
    visibility: hidden;
  }

  #latexStudioPreviewFrame,
  #studioPaperFrame,
  #resumePdfFrame {
    visibility: visible;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border: none;
  }
}

.latex-studio-snippet-btn {
  font-size: 10.5px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-weight: 600;
  padding: 2px 7px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.latex-studio-snippet-btn:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* ==========================================================================
   Resume Studio: 2-Pillar Information Architecture & Variants Hub
   ========================================================================== */
.resume-studio-header-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 14px;
}

.badge-studio-engine {
  font-size: 10px;
  font-weight: 800;
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #34d399;
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.5px;
}

/* Modern Segmented Navigation Bar */
.resume-studio-segmented-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  overflow-x: auto;
}

.studio-seg-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.studio-seg-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.15);
}

.studio-seg-tab.studio-seg-tab--active {
  background: linear-gradient(135deg, rgba(235, 188, 186, 0.18) 0%, rgba(235, 188, 186, 0.08) 100%);
  color: var(--accent);
  border-color: rgba(235, 188, 186, 0.45);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Glowing Status Dot */
.glowing-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399, 0 0 18px rgba(52, 211, 153, 0.5);
  display: inline-block;
  animation: pulse-glow-emerald 2s infinite ease-in-out;
}

@keyframes pulse-glow-emerald {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  }

  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 7px rgba(52, 211, 153, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
  }
}

/* Variants Gallery Grid */
.studio-variants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.variant-card {
  background: rgba(23, 21, 38, 0.75);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}

.variant-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.variant-card--active {
  border-color: rgba(52, 211, 153, 0.55);
  background: linear-gradient(135deg, rgba(23, 21, 38, 0.95) 0%, rgba(14, 25, 24, 0.6) 100%);
  box-shadow: 0 8px 24px rgba(52, 211, 153, 0.12);
}

.variant-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.variant-card__name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
}

.variant-card__meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.variant-card__snippet {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 11px;
  line-height: 1.4;
  color: #a6adc8;
  background: rgba(12, 10, 21, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 8px 10px;
  margin: 12px 0;
  max-height: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: pre;
}

.variant-card__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Add Variant Card */
.variant-add-card {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.015);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--muted);
  padding: 20px;
  text-align: center;
}

.variant-add-card:hover {
  border-color: var(--accent);
  background: rgba(235, 188, 186, 0.05);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ================= RESUME STUDIO V2 (CLEAN HUMAN-CENTRIC UI) ================= */

.resume-studio-header {
  margin-bottom: 20px;
}

.resume-studio-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 16px;
}

.resume-studio-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.3px;
}

.resume-studio-autoapply-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.resume-studio-autoapply-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.1px;
}

.resume-studio-subtitle {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}

/* Sub-Tab Bar matching Image 1 & 2 */
.resume-studio-subtabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 22px;
}

.studio-clean-tab {
  background: none;
  border: none;
  padding: 8px 4px 12px 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  transition: color 0.15s ease;
}

.studio-clean-tab:hover {
  color: #ffffff;
}

.studio-clean-tab.active {
  color: #ffffff;
  font-weight: 700;
}

.studio-clean-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: #3b82f6;
  /* Blue indicator as in Image 1 */
  border-radius: 2px;
}

/* ==========================================================================
   RESUME STUDIO V3 (2-PANE WORKSPACE MATCHING USER SPEC)
   ========================================================================== */

body:has(#panel-resume-studio.active) .main {
  padding-bottom: 0 !important;
}

#panel-resume-studio.active {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 215px);
  max-height: calc(100vh - 215px);
  overflow: hidden;
  box-sizing: border-box;
}

/* Standalone Resume Studio Full-Height Expansion */
body:has(#resumesMainWrapper) #panel-resume-studio.active,
#resumesMainWrapper #panel-resume-studio.active {
  height: 100% !important;
  max-height: 100% !important;
  flex: 1 1 0% !important;
}

body:has(#resumesMainWrapper) .studio-workbench-app,
#resumesMainWrapper .studio-workbench-app {
  height: 100% !important;
  max-height: 100% !important;
  flex: 1 1 0% !important;
  min-height: 0 !important;
}

.studio-v3-container {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 16px;
  width: 100%;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}

@media (max-width: 860px) {
  #panel-resume-studio.active {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .studio-v3-container {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
}

.studio-banner-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.studio-banner-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.studio-banner-subtitle {
  font-size: 11.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.studio-banner-resumename {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.studio-banner-desc {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.studio-mode-toggle {
  display: inline-flex;
  background: #141822;
  padding: 3px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  gap: 3px;
}

.studio-mode-btn {
  background: transparent;
  border: none;
  outline: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.studio-mode-btn:hover {
  color: #ffffff;
}

.studio-mode-btn.active {
  background: #5b82e6;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 6px rgba(91, 130, 230, 0.35);
}

/* ==========================================================================
   Resume Workbench 3-Column Studio (Design Reference: Resume workbench.html)
   ========================================================================== */

:root {
  --wb-bg: #0c0e14;
  --wb-pn: #14171f;
  --wb-pn2: #1b1f2a;
  --wb-ln: #292e3c;
  --wb-tx: #eceff6;
  --wb-mu: #8e97ad;
  --wb-ac: #7c8cff;
  --wb-hl: #6b5a00;
  --wb-hlt: #ffe98a;
  --wb-ok: #3ed9a2;
  --wb-bad: #ff7a70;
  --wb-paper: #ffffff;
}

/* Light Themes Scoped Workbench Variables */
[data-theme="cozy"],
[data-theme="light"] {
  --wb-bg: #ece1cf;
  --wb-pn: #fbf5ea;
  --wb-pn2: #f0e6d5;
  --wb-ln: #e2d4bd;
  --wb-tx: #4b3f34;
  --wb-mu: #7c6c59;
  --wb-ac: #c06a45;
  --wb-hl: #ffe98a;
  --wb-hlt: #5c4700;
  --wb-ok: #2e7d32;
  --wb-bad: #c0574a;
  --wb-paper: #ffffff;
}

[data-theme="latte"] {
  --wb-bg: #e6e9ef;
  --wb-pn: #ffffff;
  --wb-pn2: #f4f5f8;
  --wb-ln: #ccd0da;
  --wb-tx: #4c4f69;
  --wb-mu: #6c6f85;
  --wb-ac: #8839ef;
  --wb-hl: #ffe98a;
  --wb-hlt: #5c4700;
  --wb-ok: #40a02b;
  --wb-bad: #d20f39;
  --wb-paper: #ffffff;
}

.studio-workbench-app {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 340px;
  height: calc(100vh - 225px);
  min-height: 520px;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  transition: grid-template-columns 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.studio-workbench-app.side-collapsed {
  grid-template-columns: 270px minmax(0, 1fr) 48px;
}

.studio-workbench-app.left-collapsed {
  grid-template-columns: 48px minmax(0, 1fr) 340px;
}

.studio-workbench-app.left-collapsed.side-collapsed {
  grid-template-columns: 48px minmax(0, 1fr) 48px;
}

/* Left sidebar expanded vs rail */
.studio-wb-left-expanded,
.studio-wb-side-expanded {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.studio-wb-side-expanded {
  overflow-y: auto;
}

.studio-wb-left-rail,
.studio-wb-side-rail {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 6px;
  flex: 1;
}

.studio-workbench-app.left-collapsed .studio-wb-left-expanded {
  display: none !important;
}

.studio-workbench-app.left-collapsed .studio-wb-left-rail {
  display: flex !important;
}

.studio-workbench-app.side-collapsed .studio-wb-side-expanded {
  display: none !important;
}

.studio-workbench-app.side-collapsed .studio-wb-side-rail {
  display: flex !important;
}

/* Rail Buttons & Toggles */
.studio-wb-rail-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--wb-tx, #eceff6);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  padding: 0;
}

.studio-wb-rail-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  transform: translateY(-1px);
}

.studio-wb-rail-btn svg {
  display: block;
  flex-shrink: 0;
  transition: transform 0.15s ease, color 0.15s ease;
}

.studio-wb-rail-btn:hover svg {
  transform: scale(1.06);
}

.studio-wb-rail-btn.active-dot-btn {
  border-color: rgba(62, 217, 162, 0.35);
  background: rgba(62, 217, 162, 0.08);
}

.studio-wb-rail-btn .studio-wb-dot {
  width: 10px;
  height: 10px;
}

.studio-wb-rail-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #f59e0b;
  color: #0b0d13;
  font-size: 10px;
  font-weight: 800;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.studio-wb-rail-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--wb-mu, #8e97ad);
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  flex-shrink: 0;
}

.studio-wb-rail-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--wb-tx, #eceff6);
}

.studio-wb-col {
  background: var(--wb-pn);
  border: 1px solid var(--wb-ln);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

.studio-wb-pad {
  padding: 16px;
}

.studio-wb-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.studio-wb-grow {
  flex: 1 1 auto;
  min-width: 0;
}

.studio-wb-col h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--wb-tx);
  letter-spacing: -0.2px;
}

.studio-wb-col h3 {
  margin: 0;
  font-size: 12.5px;
  color: var(--wb-mu);
  font-weight: 500;
  line-height: 1.4;
}

.studio-wb-btn {
  border: 1px solid var(--wb-ln);
  background: var(--wb-pn2);
  border-radius: 9px;
  padding: 6px 11px;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--wb-tx);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.studio-wb-btn:hover {
  border-color: var(--wb-ac);
  color: #ffffff;
}

.studio-wb-btn.pri {
  background: var(--wb-ac);
  border-color: var(--wb-ac);
  color: #ffffff;
}

.studio-wb-btn.pri:hover {
  background: #6366f1;
  border-color: #6366f1;
}

.studio-wb-btn.bad {
  color: var(--wb-bad);
  background: transparent;
  border: 1px solid transparent;
}

.studio-wb-btn.bad:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
}

.studio-wb-btn[disabled] {
  opacity: 0.5;
  cursor: default;
}

.studio-wb-input,
.studio-wb-textarea {
  width: 100%;
  background: var(--wb-pn2);
  border: 1px solid var(--wb-ln);
  color: var(--wb-tx);
  border-radius: 9px;
  padding: 8px 11px;
  font-family: inherit;
  font-size: 12.5px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s;
}

.studio-wb-input:focus,
.studio-wb-textarea:focus {
  border-color: var(--wb-ac);
}

.studio-wb-textarea {
  resize: vertical;
  line-height: 1.45;
}

/* Tree in left column */
.studio-wb-tree {
  flex: 1 1 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 10px 12px;
  min-height: 0;
}

.studio-wb-n {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  border-radius: 10px;
  padding: 7px 8px;
  position: relative;
  cursor: pointer;
  user-select: none;
  color: var(--wb-tx);
  transition: background 0.12s;
  box-sizing: border-box;
}

.studio-wb-n:hover {
  background: var(--wb-pn2);
}

.studio-wb-n .studio-wb-node-del {
  display: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  color: var(--wb-mu, #8b92a5);
  background: transparent;
  border: none;
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.studio-wb-n:hover .studio-wb-node-del {
  display: inline-flex;
}

.studio-wb-n .studio-wb-node-del:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.18);
}

.studio-wb-n.sel {
  background: var(--wb-pn2);
  box-shadow: inset 3px 0 0 var(--wb-ac);
}

.studio-wb-n .t {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: inherit;
  line-height: 1.25;
}

.studio-wb-n.sel .t {
  font-weight: 700;
  color: #ffffff;
}

.studio-wb-n .m {
  font-size: 11.5px;
  color: var(--wb-mu);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.studio-wb-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--wb-ac);
  background: transparent;
  flex: none;
  transition: all 0.15s ease;
  position: relative;
  z-index: 2;
}

.studio-wb-dot.on {
  background: var(--wb-ok);
  border-color: var(--wb-ok);
  box-shadow: 0 0 7px rgba(62, 217, 162, 0.55);
}

.studio-wb-n[data-depth="0"]:not(:first-child) {
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.studio-wb-n.is-base-node .t {
  font-weight: 650;
  color: #c7d2fe;
}

.studio-wb-n.is-base-node .studio-wb-dot {
  border-color: #818cf8;
  background: rgba(129, 140, 248, 0.15);
}

.studio-wb-n[data-depth="1"]::before,
.studio-wb-n[data-depth="2"]::before,
.studio-wb-n[data-depth="3"]::before,
.studio-wb-n[data-depth="4"]::before {
  content: "";
  position: absolute;
  left: calc(var(--node-indent, 24px) - 11px);
  top: 0;
  bottom: 50%;
  width: 10px;
  border-left: 1.5px solid rgba(124, 140, 255, 0.3);
  border-bottom: 1.5px solid rgba(124, 140, 255, 0.3);
  border-bottom-left-radius: 5px;
  pointer-events: none;
  z-index: 1;
}

.studio-wb-d {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
}

.studio-wb-d b {
  color: var(--wb-ok);
  font-weight: 500;
}

.studio-wb-d i {
  color: var(--wb-bad);
  font-style: normal;
}

.studio-wb-tag {
  font-size: 10px;
  border-radius: 99px;
  padding: 1px 7px;
  background: rgba(62, 217, 162, 0.18);
  color: var(--wb-ok);
  font-weight: 600;
}

/* Center Column */
.studio-wb-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  border-bottom: 1px solid var(--wb-ln);
  flex-shrink: 0;
  background: var(--wb-pn);
  min-height: 48px;
  gap: 12px;
}

.studio-wb-bar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
}

.studio-wb-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Mini Mode Toggle: Edit Mode vs Compile Mode */
.studio-wb-mode-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(18, 22, 34, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  padding: 2.5px;
  gap: 2.5px;
  flex-shrink: 0;
  user-select: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.studio-wb-mode-btn {
  background: transparent;
  border: 0;
  color: var(--wb-mu, #94a3b8);
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.35;
  white-space: nowrap;
}

.studio-wb-mode-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.studio-wb-mode-btn.on {
  background: var(--wb-ac, #7c8cff) !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4), 0 0 8px rgba(124, 140, 255, 0.4);
}

.studio-wb-tip-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.25);
  color: #fbbf24;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.studio-wb-tip-pill:hover {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.45);
}

.studio-wb-tip-dot {
  font-size: 8px;
  color: #fbbf24;
}

.studio-wb-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--wb-tx, #eceff6);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 17px;
  font-weight: 700;
  padding: 0;
}

.studio-wb-more-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* Super Options Dropdown Menu */
.studio-wb-super-menu,
#studioMoreDropdown.studio-wb-super-menu {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  bottom: auto !important;
  right: 0 !important;
  left: auto !important;
  width: 250px !important;
  height: auto !important;
  background: #151822 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 12px !important;
  padding: 6px 4px !important;
  display: none;
  flex-direction: column !important;
  gap: 2px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
  z-index: 99999 !important;
}

.studio-wb-super-menu.is-open {
  display: flex !important;
}

.studio-menu-group-label {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.6px;
  color: var(--wb-mu, #8e97ad);
  padding: 6px 10px 3px;
  text-transform: uppercase;
}

.studio-menu-tabs-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.studio-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 6px;
}

.studio-wb-super-menu .studio-more-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 7px;
  background: none;
  border: 0;
  color: var(--wb-tx, #eceff6);
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.12s ease;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

.studio-wb-super-menu .studio-more-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.studio-wb-super-menu .studio-more-item.on {
  background: rgba(124, 140, 255, 0.15);
  color: #c7d2fe;
  font-weight: 600;
}

.studio-wb-super-menu .studio-more-item.on .menu-check {
  display: inline-block;
  color: var(--wb-ac, #7c8cff);
  font-weight: 800;
  margin-left: auto;
}

.studio-wb-super-menu .menu-check {
  display: none;
}

.studio-wb-super-menu .menu-icon {
  font-size: 13.5px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.studio-wb-super-menu .menu-label {
  flex: 1;
}

.studio-wb-super-menu .studio-more-item--danger {
  color: #f87171;
}

.studio-wb-super-menu .studio-more-item--danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.studio-wb-ttl {
  font: 600 17px 'Source Serif 4', Georgia, serif;
  border: 0;
  background: none;
  padding: 4px 6px;
  margin-left: -6px;
  min-width: 140px;
  flex: 1 1 auto;
  color: var(--wb-tx);
  outline: none;
  border-radius: 6px;
}

.studio-wb-ttl:hover,
.studio-wb-ttl:focus {
  background: var(--wb-pn2);
}

.studio-wb-seg {
  display: flex;
  background: var(--wb-pn2);
  border-radius: 9px;
  padding: 3px;
  border: 1px solid var(--wb-ln);
  gap: 2px;
}

.studio-wb-seg button {
  border: 0;
  background: none;
  padding: 4px 12px;
  border-radius: 7px;
  color: var(--wb-mu);
  font-weight: 500;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.12s;
}

.studio-wb-seg button.on {
  background: var(--wb-pn);
  color: var(--wb-tx);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.studio-wb-work {
  flex: 1 1 0;
  overflow: hidden;
  padding: 0;
  background: var(--wb-bg);
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.studio-wb-paper-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  overflow-x: auto;
  padding: 16px 20px 80px 20px;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--accent) 50%, transparent) transparent;
}

.studio-wb-paper-viewport::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.studio-wb-paper-viewport::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--bg-card, #fbf5ea) 50%, transparent);
  border-radius: 999px;
  margin: 6px 0;
}

.studio-wb-paper-viewport::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 45%, rgba(140, 120, 100, 0.4));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.studio-wb-paper-viewport::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.studio-wb-zoom-bar {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  background: rgba(18, 22, 34, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  padding: 2.5px 6px;
  margin: 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
  user-select: none;
  flex-shrink: 0;
}

.studio-wb-zoom-btn {
  background: transparent;
  border: 0;
  color: var(--wb-mu, #8e97ad);
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
  white-space: nowrap;
}

.studio-wb-zoom-btn:hover {
  color: var(--wb-tx, #eceff6);
  background: rgba(255, 255, 255, 0.08);
}

.studio-wb-zoom-btn.active {
  color: #ffffff !important;
  background: var(--wb-ac, #7c8cff) !important;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.studio-wb-zoom-divider {
  width: 1px;
  height: 14px;
  background: var(--wb-ln, rgba(255, 255, 255, 0.12));
  margin: 0 3px;
  display: inline-block;
  flex-shrink: 0;
}

.studio-wb-zoom-val {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono, monospace);
  color: var(--wb-tx, #eceff6);
  min-width: 36px;
  text-align: center;
  display: inline-block;
  user-select: none;
  line-height: 1;
}

.studio-wb-zoom-val {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--wb-tx, #eceff6);
  min-width: 42px;
  text-align: center;
}

.studio-wb-paper-wrapper {
  position: relative;
  display: block;
  margin: 0 auto;
  flex-shrink: 0;
  box-sizing: border-box;
}

.studio-wb-paper-scaler {
  width: 794px;
  min-height: 1123px;
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  box-sizing: border-box;
}

/* True Canonical A4 Resume Paper Sheet: 210mm x 297mm (794px x 1123px at 96 DPI) */
.studio-wb-paper-sheet {
  background: #ffffff;
  color: #000000;
  width: 794px;
  min-height: 1123px;
  height: auto;
  max-width: 794px;
  margin: 0 auto;
  padding: 34px 42px 38px 42px;
  border-radius: 3px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.studio-wb-paper-sheet iframe {
  width: 794px;
  min-height: 1123px;
  border: 0;
  background: #ffffff;
  display: block;
}

/* Multi-page Resume Page Breaks */
.studio-wb-page-divider {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1.5px dashed rgba(124, 140, 255, 0.5);
  pointer-events: none;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  padding-right: 14px;
}

.studio-wb-page-divider .page-pill {
  position: relative;
  top: -10px;
  background: #2563eb;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 700;
  height: 18px;
  line-height: 18px;
  padding: 0 10px;
  border-radius: 9px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media print {
  .studio-wb-page-divider {
    display: none !important;
  }
}

/* Split View: Side-by-Side LaTeX Editor and Live Preview */
.studio-wb-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  align-items: stretch;
}

.studio-wb-split-editor {
  display: flex;
  flex-direction: column;
  background: #0d1117;
  border: 1px solid var(--wb-ln);
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  min-height: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.studio-wb-editor-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #161b22;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.studio-wb-editor-title {
  font-size: 12px;
  font-weight: 600;
  color: #c9d1d9;
  display: flex;
  align-items: center;
  gap: 6px;
}

.studio-wb-editor-textarea {
  flex: 1 1 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #090d13;
  color: #c3e88d;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  border: 0;
  padding: 14px 16px;
  resize: none;
  box-sizing: border-box;
  outline: none;
  white-space: pre;
  overflow: auto;
}

.studio-wb-split-preview {
  display: flex;
  flex-direction: column;
  background: var(--wb-bg);
  border-radius: 12px;
  overflow-y: auto;
  overflow-x: auto;
  height: 100%;
  min-height: 0;
  padding: 12px 12px 70px 12px;
  box-sizing: border-box;
  align-items: center;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--accent) 50%, transparent) transparent;
}

.studio-wb-split-preview::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.studio-wb-split-preview::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--bg-card, #fbf5ea) 50%, transparent);
  border-radius: 999px;
  margin: 6px 0;
}

.studio-wb-split-preview::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 45%, rgba(140, 120, 100, 0.4));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.studio-wb-split-preview::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ==========================================================================
   Multi-Theme Authentic Resume Typography
   ========================================================================== */

/* Modern Sans (Clean Tech / Silicon Valley / Modern Layout) */
.studio-wb-paper-sheet.theme-modern_sans {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: #334155;
  line-height: 1.42;
}

.studio-wb-paper-sheet.theme-modern_sans .nm {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 24pt;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  font-variant: normal;
  letter-spacing: -0.4px;
  line-height: 1.1;
  margin-bottom: 4px;
}

.studio-wb-paper-sheet.theme-modern_sans .ct {
  text-align: center;
  font-size: 9.3pt;
  color: #475569;
  margin-bottom: 12px;
}

.studio-wb-paper-sheet.theme-modern_sans h2,
.studio-wb-paper-sheet.theme-modern_sans .latex-sec-head {
  font-size: 11pt;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #2563eb;
  border-bottom: 2px solid #2563eb;
  margin: 14px 0 7px 0;
  padding-bottom: 2px;
  font-variant: normal;
}

.studio-wb-paper-sheet .latex-job-block {
  margin-bottom: 12px;
}

.studio-wb-paper-sheet li {
  margin-bottom: 3px;
}

.studio-wb-paper-sheet .latex-about-text {
  font-size: 9.4pt;
  line-height: 1.42;
  margin-bottom: 10px;
}

/* LaTeX Classic (Academic Classic / Computer Modern / Jake's Resume) */
.studio-wb-paper-sheet.theme-latex_classic {
  font-family: 'Computer Modern Serif', 'CMU Serif', 'Latin Modern Roman', 'Times New Roman', serif;
  color: #000000;
  line-height: 1.34;
}

.studio-wb-paper-sheet.theme-latex_classic .nm {
  font-family: 'Computer Modern Serif', serif;
  font-size: 22pt;
  font-weight: 700;
  font-variant: small-caps;
  line-height: 1.1;
  color: #000000;
  text-align: left;
}

.studio-wb-paper-sheet.theme-latex_classic .ct {
  text-align: right;
  font-size: 8.8pt;
  color: #000000;
  line-height: 1.45;
  white-space: nowrap;
}

.studio-wb-paper-sheet.theme-latex_classic .ct a {
  color: #000000;
  text-decoration: none;
}

.latex-fa-icon {
  display: inline-block;
  vertical-align: -0.5px;
  fill: currentColor;
}

.studio-wb-paper-sheet.theme-latex_classic h2,
.studio-wb-paper-sheet.theme-latex_classic .latex-sec-head {
  font-size: 11.2pt;
  font-weight: 700;
  font-variant: normal;
  letter-spacing: 0.2px;
  color: #000000;
  border-bottom: 0.65pt solid #000000;
  margin: 9px 0 3px 0;
  padding-bottom: 1px;
  text-transform: none;
}

.studio-wb-paper-sheet.theme-latex_classic .latex-project-header-wrap {
  display: inline;
}

/* Executive Navy (Leadership / Enterprise) */
.studio-wb-paper-sheet.theme-executive_navy {
  font-family: 'Calibri', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: #1e293b;
  line-height: 1.34;
}

.studio-wb-paper-sheet.theme-executive_navy .nm {
  text-align: center;
  color: #1e3a8a;
  font-size: 24pt;
  font-weight: 800;
  margin-bottom: 3px;
}

.studio-wb-paper-sheet.theme-executive_navy .ct {
  text-align: center;
  font-size: 9.3pt;
  color: #334155;
  margin-bottom: 10px;
}

.studio-wb-paper-sheet.theme-executive_navy h2,
.studio-wb-paper-sheet.theme-executive_navy .latex-sec-head {
  font-size: 11pt;
  font-weight: 800;
  text-transform: uppercase;
  color: #1e3a8a;
  border-bottom: 1.5px solid #1e3a8a;
  margin: 10px 0 5px 0;
  padding-bottom: 2px;
}

/* Minimal Slate (1-Page High Density / Charcoal) */
.studio-wb-paper-sheet.theme-minimal_slate {
  font-family: 'Arial', 'Helvetica', sans-serif;
  color: #374151;
  line-height: 1.3;
}

.studio-wb-paper-sheet.theme-minimal_slate .nm {
  font-size: 22pt;
  font-weight: 800;
  color: #111827;
  text-align: left;
}

.studio-wb-paper-sheet.theme-minimal_slate h2,
.studio-wb-paper-sheet.theme-minimal_slate .latex-sec-head {
  font-size: 10.5pt;
  font-weight: 700;
  text-transform: uppercase;
  color: #111827;
  border-bottom: 1px solid #e5e7eb;
  margin: 8px 0 4px 0;
  padding-bottom: 2px;
}

/* Common Editable Styles inside Paper */
.studio-wb-paper-sheet [contenteditable] {
  outline: none;
  border-radius: 2px;
  cursor: text;
  transition: background 0.12s, box-shadow 0.12s;
}

.studio-wb-paper-sheet [contenteditable]:hover {
  background: rgba(124, 140, 255, 0.09);
}

.studio-wb-paper-sheet [contenteditable]:focus {
  background: rgba(124, 140, 255, 0.15);
  box-shadow: 0 0 0 2px rgba(124, 140, 255, 0.4);
}

.studio-wb-paper-sheet mark {
  background: rgba(255, 233, 138, 0.7);
  color: #000000;
  border-radius: 2px;
  padding: 0 2px;
  font-weight: inherit;
}

.studio-wb-paper-sheet.nohl mark {
  background: none;
  color: inherit;
}

.studio-wb-del-bullet-btn {
  display: none;
  position: absolute;
  right: -24px;
  top: -1px;
  border: 0;
  background: none;
  color: #ff7a70;
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.studio-wb-a4-paper li:hover .studio-wb-del-bullet-btn,
.studio-wb-page li:hover .studio-wb-del-bullet-btn {
  display: inline-block;
}

.studio-wb-add-bullet-btn {
  border: 1px dashed rgba(124, 140, 255, 0.4);
  background: rgba(124, 140, 255, 0.05);
  color: var(--wb-ac, #7c8cff);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s;
  font-family: inherit;
}

.studio-wb-add-bullet-btn:hover {
  background: rgba(124, 140, 255, 0.15);
  border-color: var(--wb-ac, #7c8cff);
}

.studio-wb-page.nohl mark {
  background: none;
  color: inherit;
  font-weight: inherit;
}

/* History scrubber slider (hidden to maximize document canvas space) */
.studio-wb-slide {
  display: none !important;
}

/* Right Column (Target Job & AI Coach) */
.studio-wb-coach {
  overflow-y: auto;
  flex: 1 1 0;
  min-height: 0;
}

.studio-wb-sec {
  padding: 16px;
  border-bottom: 1px solid var(--wb-ln);
}

.studio-wb-ring {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 12px;
}

.studio-wb-big {
  font: 600 32px 'Source Serif 4', Georgia, serif;
  line-height: 1;
  color: var(--wb-tx);
}

.studio-wb-kw {
  display: inline-block;
  margin: 3px 3px 0 0;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  border: 1px solid var(--wb-ln);
  background: var(--wb-pn2);
  color: var(--wb-tx);
}

.studio-wb-kw.add {
  cursor: pointer;
  border-style: dashed;
}

.studio-wb-kw.add:hover {
  border-color: var(--wb-ac);
  background: rgba(124, 140, 255, 0.15);
}

.studio-wb-kw.y {
  background: rgba(255, 225, 77, 0.22);
  color: #ffe98a;
  border-color: rgba(255, 225, 77, 0.4);
}

.studio-wb-chk {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  font-size: 12.5px;
  align-items: flex-start;
  color: var(--wb-tx);
}

.studio-wb-chk b {
  flex: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  background: var(--wb-ok);
  color: #04281c;
  margin-top: 1px;
  font-weight: 700;
}

.studio-wb-chk b.w {
  background: #ffb347;
  color: #3b2000;
}

/* JD Tailoring Inline Diff & Review Banner */
.studio-wb-tailor-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface-solid, #ffffff);
  border: 1.5px solid var(--accent, #b4532a);
  border-radius: 12px;
  padding: 10px 18px;
  margin: 10px 16px 4px 16px;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 18%, rgba(0,0,0,0.08));
  animation: wbTailorSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 20;
}

@keyframes wbTailorSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tailor-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tailor-badge {
  background: var(--accent, #b4532a);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 9999px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.tailor-banner-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #2d241e);
}

.tailor-banner-subtitle {
  font-size: 11.5px;
  color: var(--muted, #7d6f63);
  margin-top: 1px;
}

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

.tailor-accept-btn {
  background: var(--accent, #b4532a) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border: none !important;
  padding: 6px 14px !important;
  border-radius: 8px !important;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tailor-accept-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.tailor-branch-btn {
  background: color-mix(in srgb, var(--accent) 12%, transparent) !important;
  color: var(--accent, #b4532a) !important;
  border: 1px solid var(--accent, #b4532a) !important;
  font-weight: 700 !important;
  padding: 6px 14px !important;
  border-radius: 8px !important;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tailor-branch-btn:hover {
  background: color-mix(in srgb, var(--accent) 22%, transparent) !important;
  transform: translateY(-1px);
}

.tailor-revert-btn {
  background: transparent !important;
  color: var(--muted, #7d6f63) !important;
  border: 1px solid var(--border, #e2d4bd) !important;
  padding: 6px 12px !important;
  border-radius: 8px !important;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.15s ease;
}

.tailor-revert-btn:hover {
  color: var(--text, #2d241e) !important;
  border-color: var(--text, #2d241e) !important;
}

/* Magical Diff Highlighting on A4 paper */
.wb-tailored-diff {
  background: color-mix(in srgb, var(--accent, #b4532a) 10%, transparent) !important;
  border-left: 3px solid var(--accent, #b4532a) !important;
  padding: 3px 8px !important;
  border-radius: 4px !important;
  position: relative;
  transition: all 0.25s ease;
}

.wb-tailor-sparkle-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  font-weight: 700;
  color: var(--accent, #b4532a);
  background: color-mix(in srgb, var(--accent, #b4532a) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #b4532a) 30%, transparent);
  border-radius: 9999px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

@media (max-width: 1240px) {
  .studio-workbench-app {
    grid-template-columns: 260px minmax(0, 1fr) 300px;
  }
}

@media (max-width: 1040px) {
  .studio-workbench-app {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  #studioWorkbenchSide {
    display: none;
  }
}

/* ==========================================================================
   Light Theme Workbench Adaptation (Cozy, Light, Latte)
   ========================================================================== */

[data-theme="cozy"] .studio-wb-col,
[data-theme="light"] .studio-wb-col,
[data-theme="latte"] .studio-wb-col {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

[data-theme="cozy"] .studio-wb-rail-btn,
[data-theme="light"] .studio-wb-rail-btn,
[data-theme="latte"] .studio-wb-rail-btn {
  border-color: var(--wb-ln);
  background: var(--wb-pn2);
  color: var(--wb-tx);
}

[data-theme="cozy"] .studio-wb-rail-btn:hover,
[data-theme="light"] .studio-wb-rail-btn:hover,
[data-theme="latte"] .studio-wb-rail-btn:hover {
  background: var(--wb-ln);
  border-color: var(--wb-ac);
  color: var(--wb-tx);
}

[data-theme="cozy"] .studio-wb-rail-toggle-btn,
[data-theme="light"] .studio-wb-rail-toggle-btn,
[data-theme="latte"] .studio-wb-rail-toggle-btn {
  border-color: var(--wb-ln);
  background: var(--wb-pn2);
  color: var(--wb-mu);
}

[data-theme="cozy"] .studio-wb-rail-toggle-btn:hover,
[data-theme="light"] .studio-wb-rail-toggle-btn:hover,
[data-theme="latte"] .studio-wb-rail-toggle-btn:hover {
  background: var(--wb-ln);
  border-color: var(--wb-ac);
  color: var(--wb-tx);
}

[data-theme="cozy"] .studio-wb-btn:hover:not(.pri):not(.bad),
[data-theme="light"] .studio-wb-btn:hover:not(.pri):not(.bad),
[data-theme="latte"] .studio-wb-btn:hover:not(.pri):not(.bad) {
  border-color: var(--wb-ac);
  color: var(--wb-tx);
  background: var(--wb-ln);
}

[data-theme="cozy"] .studio-wb-btn.pri:hover,
[data-theme="light"] .studio-wb-btn.pri:hover {
  background: #a55432;
  border-color: #a55432;
}

[data-theme="latte"] .studio-wb-btn.pri:hover {
  background: #7226d9;
  border-color: #7226d9;
}

/* Tree Nodes in Versions list */
[data-theme="cozy"] .studio-wb-n.sel,
[data-theme="light"] .studio-wb-n.sel,
[data-theme="latte"] .studio-wb-n.sel {
  background: var(--wb-pn2);
}

[data-theme="cozy"] .studio-wb-n.sel .t,
[data-theme="light"] .studio-wb-n.sel .t,
[data-theme="latte"] .studio-wb-n.sel .t {
  color: var(--wb-tx) !important;
  font-weight: 700;
}

[data-theme="cozy"] .studio-wb-n.is-base-node .t,
[data-theme="light"] .studio-wb-n.is-base-node .t,
[data-theme="latte"] .studio-wb-n.is-base-node .t {
  color: var(--wb-tx) !important;
  font-weight: 700;
}

[data-theme="cozy"] .studio-wb-n.is-base-node .studio-wb-dot,
[data-theme="light"] .studio-wb-n.is-base-node .studio-wb-dot,
[data-theme="latte"] .studio-wb-n.is-base-node .studio-wb-dot {
  border-color: var(--wb-ac);
  background: rgba(192, 106, 69, 0.15);
}

[data-theme="cozy"] .studio-wb-n[data-depth="0"]:not(:first-child),
[data-theme="light"] .studio-wb-n[data-depth="0"]:not(:first-child),
[data-theme="latte"] .studio-wb-n[data-depth="0"]:not(:first-child) {
  border-top-color: var(--wb-ln);
}

[data-theme="cozy"] .studio-wb-n[data-depth="1"]::before,
[data-theme="cozy"] .studio-wb-n[data-depth="2"]::before,
[data-theme="cozy"] .studio-wb-n[data-depth="3"]::before,
[data-theme="cozy"] .studio-wb-n[data-depth="4"]::before,
[data-theme="light"] .studio-wb-n[data-depth="1"]::before,
[data-theme="light"] .studio-wb-n[data-depth="2"]::before,
[data-theme="light"] .studio-wb-n[data-depth="3"]::before,
[data-theme="light"] .studio-wb-n[data-depth="4"]::before,
[data-theme="latte"] .studio-wb-n[data-depth="1"]::before,
[data-theme="latte"] .studio-wb-n[data-depth="2"]::before,
[data-theme="latte"] .studio-wb-n[data-depth="3"]::before,
[data-theme="latte"] .studio-wb-n[data-depth="4"]::before {
  border-left-color: var(--wb-ln);
  border-bottom-color: var(--wb-ln);
}

/* Action Bar More Button & Dropdown Menu */
[data-theme="cozy"] .studio-wb-more-btn,
[data-theme="light"] .studio-wb-more-btn,
[data-theme="latte"] .studio-wb-more-btn {
  background: var(--wb-pn2);
  border-color: var(--wb-ln);
  color: var(--wb-tx);
}

[data-theme="cozy"] .studio-wb-more-btn:hover,
[data-theme="light"] .studio-wb-more-btn:hover,
[data-theme="latte"] .studio-wb-more-btn:hover {
  background: var(--wb-ln);
  border-color: var(--wb-ac);
  color: var(--wb-tx);
}

[data-theme="cozy"] .studio-wb-super-menu,
[data-theme="light"] .studio-wb-super-menu,
[data-theme="latte"] .studio-wb-super-menu,
[data-theme="cozy"] #studioMoreDropdown.studio-wb-super-menu,
[data-theme="light"] #studioMoreDropdown.studio-wb-super-menu,
[data-theme="latte"] #studioMoreDropdown.studio-wb-super-menu {
  background: var(--wb-pn) !important;
  border-color: var(--wb-ln) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px var(--wb-ln) !important;
  color: var(--wb-tx) !important;
}

[data-theme="cozy"] .studio-wb-super-menu .studio-more-item,
[data-theme="light"] .studio-wb-super-menu .studio-more-item,
[data-theme="latte"] .studio-wb-super-menu .studio-more-item {
  color: var(--wb-tx);
}

[data-theme="cozy"] .studio-wb-super-menu .studio-more-item:hover,
[data-theme="light"] .studio-wb-super-menu .studio-more-item:hover,
[data-theme="latte"] .studio-wb-super-menu .studio-more-item:hover {
  background: var(--wb-pn2);
  color: var(--wb-tx);
}

[data-theme="cozy"] .studio-wb-super-menu .studio-more-item.on,
[data-theme="light"] .studio-wb-super-menu .studio-more-item.on,
[data-theme="latte"] .studio-wb-super-menu .studio-more-item.on {
  background: var(--wb-pn2);
  color: var(--wb-ac);
}

[data-theme="cozy"] .studio-menu-divider,
[data-theme="light"] .studio-menu-divider,
[data-theme="latte"] .studio-menu-divider {
  background: var(--wb-ln);
}

/* Mode Toggle (Visual Edit vs Compile Mode) */
[data-theme="cozy"] .studio-wb-mode-toggle,
[data-theme="light"] .studio-wb-mode-toggle,
[data-theme="latte"] .studio-wb-mode-toggle {
  background: var(--wb-pn2);
  border-color: var(--wb-ln);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

[data-theme="cozy"] .studio-wb-mode-btn,
[data-theme="light"] .studio-wb-mode-btn,
[data-theme="latte"] .studio-wb-mode-btn {
  color: var(--wb-mu);
}

[data-theme="cozy"] .studio-wb-mode-btn:hover,
[data-theme="light"] .studio-wb-mode-btn:hover,
[data-theme="latte"] .studio-wb-mode-btn:hover {
  color: var(--wb-tx);
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="cozy"] .studio-wb-mode-btn.on,
[data-theme="light"] .studio-wb-mode-btn.on,
[data-theme="latte"] .studio-wb-mode-btn.on {
  background: var(--wb-ac) !important;
  color: #ffffff !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* Zoom Toolbar in Top Bar */
[data-theme="cozy"] .studio-wb-zoom-bar,
[data-theme="light"] .studio-wb-zoom-bar {
  background: rgba(120, 84, 52, 0.1);
  border-color: rgba(120, 84, 52, 0.22);
  box-shadow: inset 0 1px 2px rgba(120, 84, 52, 0.08);
}

[data-theme="latte"] .studio-wb-zoom-bar {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

[data-theme="cozy"] .studio-wb-zoom-btn,
[data-theme="light"] .studio-wb-zoom-btn,
[data-theme="latte"] .studio-wb-zoom-btn {
  color: var(--wb-mu);
}

[data-theme="cozy"] .studio-wb-zoom-btn:hover,
[data-theme="light"] .studio-wb-zoom-btn:hover,
[data-theme="latte"] .studio-wb-zoom-btn:hover {
  color: var(--wb-tx);
  background: rgba(120, 84, 52, 0.12);
}

[data-theme="cozy"] .studio-wb-zoom-btn.active,
[data-theme="light"] .studio-wb-zoom-btn.active,
[data-theme="latte"] .studio-wb-zoom-btn.active {
  background: var(--wb-ac) !important;
  color: #ffffff !important;
}

[data-theme="cozy"] .studio-wb-zoom-val,
[data-theme="light"] .studio-wb-zoom-val,
[data-theme="latte"] .studio-wb-zoom-val {
  color: var(--wb-tx);
}

[data-theme="cozy"] .studio-wb-zoom-divider,
[data-theme="light"] .studio-wb-zoom-divider {
  background: rgba(120, 84, 52, 0.2);
}

[data-theme="latte"] .studio-wb-zoom-divider {
  background: rgba(0, 0, 0, 0.15);
}

/* Paper Sheet Shadow in Light Themes */
[data-theme="cozy"] .studio-wb-paper-sheet,
[data-theme="light"] .studio-wb-paper-sheet,
[data-theme="latte"] .studio-wb-paper-sheet {
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

[data-theme="cozy"] .studio-wb-page-divider,
[data-theme="light"] .studio-wb-page-divider {
  border-top-color: rgba(192, 106, 69, 0.5);
}

[data-theme="cozy"] .studio-wb-page-divider .page-pill,
[data-theme="light"] .studio-wb-page-divider .page-pill {
  background: #c06a45;
}

[data-theme="latte"] .studio-wb-page-divider {
  border-top-color: rgba(139, 92, 246, 0.5);
}

[data-theme="latte"] .studio-wb-page-divider .page-pill {
  background: #8b5cf6;
}

/* Split View Editor in Light Themes */
[data-theme="cozy"] .studio-wb-split-editor,
[data-theme="light"] .studio-wb-split-editor,
[data-theme="latte"] .studio-wb-split-editor {
  background: var(--wb-pn);
  border-color: var(--wb-ln);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

[data-theme="cozy"] .studio-wb-editor-bar,
[data-theme="light"] .studio-wb-editor-bar,
[data-theme="latte"] .studio-wb-editor-bar {
  background: var(--wb-pn2);
  border-bottom-color: var(--wb-ln);
}

[data-theme="cozy"] .studio-wb-editor-title,
[data-theme="light"] .studio-wb-editor-title,
[data-theme="latte"] .studio-wb-editor-title {
  color: var(--wb-tx);
}

[data-theme="cozy"] .studio-wb-editor-textarea,
[data-theme="light"] .studio-wb-editor-textarea,
[data-theme="latte"] .studio-wb-editor-textarea {
  background: var(--wb-pn);
  color: var(--wb-tx);
}

/* Uploaded Resumes Dock in Light Themes */
[data-theme="cozy"] .studio-uploaded-dock,
[data-theme="light"] .studio-uploaded-dock,
[data-theme="latte"] .studio-uploaded-dock {
  border-top-color: var(--wb-ln) !important;
}

[data-theme="cozy"] .studio-dock-card,
[data-theme="light"] .studio-dock-card,
[data-theme="latte"] .studio-dock-card {
  background: var(--wb-pn2);
  border-color: var(--wb-ln);
}

[data-theme="cozy"] .studio-dock-card:hover,
[data-theme="light"] .studio-dock-card:hover,
[data-theme="latte"] .studio-dock-card:hover {
  background: var(--wb-ln);
  border-color: var(--wb-ac);
}

[data-theme="cozy"] .studio-dock-filename,
[data-theme="light"] .studio-dock-filename,
[data-theme="latte"] .studio-dock-filename {
  color: var(--wb-tx);
}

[data-theme="cozy"] .studio-dock-card.selected .studio-dock-filename,
[data-theme="light"] .studio-dock-card.selected .studio-dock-filename,
[data-theme="latte"] .studio-dock-card.selected .studio-dock-filename {
  color: var(--wb-tx);
}

[data-theme="cozy"] .studio-dock-title,
[data-theme="light"] .studio-dock-title,
[data-theme="latte"] .studio-dock-title {
  color: var(--wb-mu);
}

[data-theme="cozy"] .studio-dock-sub,
[data-theme="light"] .studio-dock-sub,
[data-theme="latte"] .studio-dock-sub {
  color: var(--wb-mu);
}

[data-theme="cozy"] .studio-dock-empty,
[data-theme="light"] .studio-dock-empty,
[data-theme="latte"] .studio-dock-empty {
  border-color: var(--wb-ln);
  color: var(--wb-mu);
}

[data-theme="cozy"] .studio-dock-empty:hover,
[data-theme="light"] .studio-dock-empty:hover {
  border-color: var(--wb-ac);
  color: var(--wb-ac);
  background: rgba(192, 106, 69, 0.05);
}

[data-theme="latte"] .studio-dock-empty:hover {
  border-color: var(--wb-ac);
  color: var(--wb-ac);
  background: rgba(136, 57, 239, 0.05);
}

/* Keywords in Right Column */
[data-theme="cozy"] .studio-wb-kw.y,
[data-theme="light"] .studio-wb-kw.y,
[data-theme="latte"] .studio-wb-kw.y {
  background: rgba(245, 158, 11, 0.15);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.35);
}

/* Git Graph Cards in Light Themes */
[data-theme="cozy"] .studio-branch-card,
[data-theme="light"] .studio-branch-card,
[data-theme="latte"] .studio-branch-card {
  background: var(--wb-pn);
  border-color: var(--wb-ln);
}

[data-theme="cozy"] .studio-git-card:hover,
[data-theme="light"] .studio-git-card:hover,
[data-theme="latte"] .studio-git-card:hover {
  background: var(--wb-pn2);
  border-color: var(--wb-ln);
}

[data-theme="cozy"] .studio-git-card.selected,
[data-theme="light"] .studio-git-card.selected,
[data-theme="latte"] .studio-git-card.selected {
  background: var(--wb-pn2);
  border-color: var(--wb-ac);
}

[data-theme="cozy"] .studio-git-card-title,
[data-theme="light"] .studio-git-card-title,
[data-theme="latte"] .studio-git-card-title {
  color: var(--wb-tx);
}

[data-theme="cozy"] .studio-git-card-sub,
[data-theme="light"] .studio-git-card-sub,
[data-theme="latte"] .studio-git-card-sub {
  color: var(--wb-mu);
}

/* ==========================================================================
   Horizontal Git-Style Resume Branch Timeline & Navigator
   ========================================================================== */

.studio-branch-card {
  background: rgba(15, 20, 28, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  margin-bottom: 0;
  flex: 0 0 285px;
  width: 285px;
  min-width: 260px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    flex-basis 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    margin 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.studio-branch-card.is-collapsed {
  flex: 0 0 0px !important;
  width: 0px !important;
  min-width: 0px !important;
  max-width: 0px !important;
  padding: 0px !important;
  margin: 0px !important;
  border: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

/* ── Resume Versions Timeline (new left-panel design) ────────── */

/* Header row: title + upload PDF */
.studio-rv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  margin-bottom: 8px;
}

.studio-rv-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.studio-rv-upload-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.studio-rv-upload-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
}

.studio-sidebar-toggle-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #94a3b8;
  width: 26px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  flex-shrink: 0;
}

.studio-sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.studio-sidebar-expand-btn {
  background: rgba(124, 110, 247, 0.15) !important;
  border: 1px solid rgba(124, 110, 247, 0.35) !important;
  border-radius: 6px !important;
  color: #c4b5fd !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 3px 8px !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.studio-sidebar-expand-btn:hover {
  background: rgba(124, 110, 247, 0.25) !important;
  border-color: rgba(124, 110, 247, 0.5) !important;
  color: #ffffff !important;
}

.studio-tab-action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.studio-tab-action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
}

/* ── Integrated / Split LaTeX Editor Styles ────────── */
.studio-split-view-container {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  gap: 12px;
}

.studio-split-editor-pane {
  flex: 1 1 50%;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  min-height: 0;
}

.studio-split-preview-pane {
  flex: 1 1 50%;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  background: #10141d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  min-height: 0;
  align-items: center;
  justify-content: center;
  position: relative;
}

.studio-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: #161b22;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11.5px;
  flex-shrink: 0;
  gap: 8px;
}

.studio-editor-wrapper {
  display: flex;
  flex: 1 1 0;
  min-height: 0;
  position: relative;
  background: #090d16;
  overflow: hidden;
}

.studio-editor-gutter {
  width: 44px;
  padding: 10px 6px 10px 0;
  font-family: 'SFMono-Regular', Consolas, Menlo, monospace;
  font-size: 11.5px;
  line-height: 1.5;
  text-align: right;
  color: #484f58;
  background: #0d1117;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  user-select: none;
  overflow: hidden;
  white-space: pre;
  flex-shrink: 0;
}

.studio-editor-textarea {
  flex: 1 1 0;
  min-height: 0;
  padding: 10px 12px;
  font-family: 'SFMono-Regular', Consolas, Menlo, monospace;
  font-size: 11.5px;
  line-height: 1.5;
  color: #e6edf3;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
  tab-size: 2;
}

/* Search versions filter input */
.studio-rv-filter {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #ffffff;
  font-size: 11.5px;
  padding: 5px 8px;
  outline: none;
  box-sizing: border-box;
  flex: 0 0 auto;
  margin-bottom: 8px;
  transition: border-color 0.15s, background 0.15s;
}

.studio-rv-filter::placeholder {
  color: #64748b;
}

.studio-rv-filter:focus {
  border-color: rgba(124, 110, 247, 0.5);
  background: rgba(255, 255, 255, 0.07);
}

/* Helper hint subtitle */
.studio-rv-hint {
  display: none !important;
}

font-size: 13px;
}

/* Scrollable timeline list */
/* ── Unified Git Graph Resume Versions Timeline ────────── */
.studio-rv-list {
  position: relative;
  flex: 1 1 0;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  scrollbar-width: thin;
  padding: 4px 6px 16px 2px;
}

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

.studio-rv-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

.studio-git-graph-container {
  position: relative;
  width: 100%;
  min-height: 100%;
}

.studio-git-svg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
  overflow: visible;
}

.studio-git-node-group {
  pointer-events: auto;
  cursor: pointer;
}

.studio-node-plus {
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  transform-origin: center;
}

.studio-node-normal {
  opacity: 1;
  transition: opacity 0.15s ease;
}

.studio-git-node-group.is-selected .studio-node-plus,
.studio-git-node-group:hover .studio-node-plus,
.studio-git-node-group.row-hovered .studio-node-plus {
  opacity: 1;
}

.studio-git-node-group.is-selected .studio-node-normal,
.studio-git-node-group:hover .studio-node-normal,
.studio-git-node-group.row-hovered .studio-node-normal {
  opacity: 0;
}

#studioGitRows,
.studio-git-rows {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex !important;
  flex-direction: column !important;
  gap: 0px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.studio-git-row {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  cursor: pointer;
  box-sizing: border-box;
  user-select: none;
}

.studio-git-row--head {
  min-height: 52px;
}

.studio-git-row--checkpoint {
  min-height: 38px;
}

.studio-git-row--base {
  min-height: 48px;
  margin-top: 6px;
}

/* Card container for Head rows */
.studio-git-card {
  flex: 1;
  min-width: 0;
  border-radius: 10px;
  padding: 8px 12px;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.studio-git-card:hover,
.studio-git-row.node-hovered .studio-git-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.studio-git-card.selected {
  background: #252846;
  border-color: rgba(124, 110, 247, 0.45);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.studio-git-card-main {
  min-width: 0;
  flex: 1;
}

.studio-git-card-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.studio-git-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 175px;
}

.studio-git-badge-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1.5px 7px;
  border-radius: 6px;
  background: rgba(124, 110, 247, 0.25);
  color: #c4b5fd;
  white-space: nowrap;
}

.studio-git-card-sub {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Action button pill items on right side of cards */
.studio-card-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  margin-left: auto;
}

.studio-git-badge-active {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2.5px 8px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  white-space: nowrap;
}

.studio-card-actions-group {
  display: none;
  align-items: center;
  gap: 5px;
}

/* Reveal action buttons on card selection or hover */
.studio-git-card.selected .studio-card-actions-group,
.studio-git-card:hover .studio-card-actions-group,
.studio-git-base-card.selected .studio-card-actions-group,
.studio-git-base-card:hover .studio-card-actions-group,
.studio-git-row.node-hovered .studio-card-actions-group {
  display: inline-flex;
}

.studio-card-btn-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  line-height: 1.4;
}

.studio-card-btn-action:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.studio-card-btn-more {
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Checkpoint row styling */
.studio-git-checkpoint-item {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.studio-git-checkpoint-item:hover,
.studio-git-row.node-hovered .studio-git-checkpoint-item {
  background: rgba(255, 255, 255, 0.04);
}

.studio-git-checkpoint-item.selected {
  background: rgba(124, 110, 247, 0.16);
}

.studio-git-checkpoint-text {
  font-size: 12px;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Base layout card */
.studio-git-base-card {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border-radius: 10px;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.studio-git-base-card:hover,
.studio-git-row.node-hovered .studio-git-base-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.studio-git-base-card.selected {
  background: #252846;
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.studio-git-base-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.1px;
}

.studio-git-base-sub {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 2px;
}

/* Keep old SVG/variant elements invisible but accessible for JS compat */
.studio-branch-scroll-wrap,
.studio-variants-list-wrap {
  display: none !important;
}

.studio-branch-svg {
  display: block;
  user-select: none;
  min-width: 100%;
  overflow: visible;
}

.studio-branch-node {
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.studio-branch-node:hover circle.studio-branch-dot {
  filter: drop-shadow(0 0 7px rgba(255, 255, 255, 0.65));
}

.studio-branch-node:hover text {
  fill: #ffffff !important;
}

.studio-branch-halo {
  animation: studioBranchPulse 2s infinite ease-in-out;
}

@keyframes studioBranchPulse {
  0% {
    r: 14;
    opacity: 0.9;
  }

  50% {
    r: 16.5;
    opacity: 0.45;
  }

  100% {
    r: 14;
    opacity: 0.9;
  }
}

.studio-branch-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.studio-date-pill {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.studio-header-download-btn {
  transition: all 0.15s ease;
}

.studio-header-download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

/* Two-Column Studio Layout */
.studio-v3-grid {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 960px) {
  .studio-v3-grid {
    grid-template-columns: 1fr;
  }
}

/* Left Sidebar */
.studio-sidebar-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.studio-sidebar-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.studio-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.studio-resume-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  width: 100%;
}

.studio-resume-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
}

.studio-resume-item.active {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.45);
}

.studio-resume-item-icon {
  font-size: 13px;
  margin-top: 1px;
}

.studio-resume-item-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.studio-resume-item-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-resume-item-meta {
  font-size: 11px;
  color: var(--muted);
}

.studio-sidebar-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.studio-sidebar-actions .btn {
  flex: 1;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

/* Right Detail Pane */
.studio-detail-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 0 !important;
  min-width: 0 !important;
  width: auto !important;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}

/* ── Minimal 20% Sidebar Mini Rows (User Design from Resumes.html) ────────── */
:root {
  --studio-git-line: #2d2d44;
  --studio-git-bg: #101019;
}

.studio-rv-tailor-btn {
  color: #9a9af7;
  font-weight: 600;
  font-size: 13.5px;
  margin: 2px 0 14px 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.studio-rv-tailor-btn:hover {
  color: #c4c4ff;
  background: rgba(154, 154, 247, 0.08);
}

.studio-mini-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  margin: 0 !important;
  padding: 0 8px 0 0;
  box-sizing: border-box;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  background: none;
  border: 0;
  text-align: left;
  color: #7d7d99;
  transition: color 0.12s ease, background 0.12s ease;
}

.studio-mini-row:hover {
  color: #ecebf8;
  background: rgba(255, 255, 255, 0.04);
}

.studio-mini-row[aria-current="true"],
.studio-mini-row.selected {
  color: #ffffff;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
}

.studio-mini-row .studio-mini-title {
  font-size: 13px;
  font-weight: inherit;
  color: inherit;
  display: block;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.25;
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 6px;
  transition: color 0.12s ease, font-weight 0.12s ease;
}

.studio-mini-row[aria-current="true"] .studio-mini-title,
.studio-mini-row.selected .studio-mini-title {
  font-weight: 700 !important;
  color: #ffffff !important;
}

.studio-mini-row .studio-mini-date {
  font-size: 12px;
  font-weight: 400;
  color: #7d7d99;
  white-space: nowrap;
  flex: 0 0 auto;
  margin-left: auto;
  text-align: right;
  transition: opacity 0.15s ease, color 0.12s ease;
}

.studio-mini-row[aria-current="true"] .studio-mini-date,
.studio-mini-row.selected .studio-mini-date {
  color: #94a3b8;
}

.studio-mini-row:hover .studio-mini-date {
  opacity: 0;
}

.studio-mini-row .studio-mini-more-btn {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 15px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  z-index: 3;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.studio-mini-row:hover .studio-mini-more-btn {
  opacity: 0.85;
  pointer-events: auto;
}

.studio-mini-row .studio-mini-more-btn:hover {
  opacity: 1 !important;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.12) !important;
}

/* ── Independent Uploaded Resume Dock (Lower 20-30% of sidebar) ────────── */
.studio-uploaded-dock {
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.studio-dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.studio-dock-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #64748b;
}

.studio-dock-action-btn {
  font-size: 11px;
  font-weight: 600;
  color: #9a9af7;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}

.studio-dock-action-btn:hover {
  color: #c4c4ff;
  background: rgba(154, 154, 247, 0.1);
}

.studio-dock-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.studio-dock-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.studio-dock-card.selected,
.studio-dock-card[aria-current="true"] {
  background: rgba(251, 146, 60, 0.08);
  border-color: rgba(251, 146, 60, 0.4);
  box-shadow: 0 0 12px rgba(251, 146, 60, 0.12);
}

.studio-dock-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: rgba(251, 146, 60, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fb923c;
}

.studio-dock-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.studio-dock-filename {
  font-size: 12.5px;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.studio-dock-card.selected .studio-dock-filename {
  color: #ffffff;
  font-weight: 700;
}

.studio-dock-sub {
  font-size: 11px;
  color: #7d7d99;
  display: flex;
  align-items: center;
  gap: 6px;
}

.studio-dock-active-pill {
  font-size: 9.5px;
  font-weight: 600;
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
  padding: 1px 5px;
  border-radius: 4px;
}

.studio-dock-card .studio-mini-more-btn {
  opacity: 0;
  pointer-events: none;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 15px;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
}

.studio-dock-card:hover .studio-mini-more-btn {
  opacity: 1;
  pointer-events: auto;
}

.studio-dock-card .studio-mini-more-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.studio-dock-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 2px;
}

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

.studio-dock-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* Modal Mode Switcher Tabs */
.studio-create-mode-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-soft, #ece1cf);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--border, #e2d4bd);
}

.studio-create-mode-tab {
  flex: 1;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted, #7c6c59);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.studio-create-mode-tab:hover {
  color: var(--text, #4b3f34);
  background: var(--surface, rgba(251, 245, 234, 0.9));
}

.studio-create-mode-tab.is-active {
  color: #ffffff !important;
  background: var(--accent, #c06a45) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* Layout Selection Cards */
.studio-layout-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.studio-layout-card {
  padding: 10px 12px 12px;
  background: var(--surface-solid, #fbf5ea);
  border: 1px solid var(--border, #e2d4bd);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  position: relative;
  color: var(--text, #4b3f34);
}

.studio-layout-card:hover {
  background: var(--bg-soft, #ece1cf);
  border-color: var(--accent, #c06a45);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.studio-layout-card.is-selected {
  background: var(--surface-solid, #fbf5ea);
  border-color: var(--accent, #c06a45);
  box-shadow: 0 0 0 2px var(--accent, #c06a45), 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Miniature LaTeX Layout Previews */
.studio-layout-thumb-wrapper {
  background: var(--bg-soft, #ece1cf);
  padding: 6px 8px;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 2px;
  overflow: hidden;
}

.studio-layout-card:hover .studio-layout-thumb-paper {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.studio-layout-card.is-selected .studio-layout-thumb-paper {
  box-shadow: 0 0 0 1.5px #8b5cf6, 0 6px 18px rgba(139, 92, 246, 0.28);
}

.studio-layout-thumb-paper {
  width: 100%;
  height: 126px;
  background: #ffffff !important;
  color: #0f172a !important;
  border-radius: 3px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  padding: 7px 9px;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  user-select: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

/* Typography for Academic Classic */
.thumb-name-serif {
  font-family: 'Computer Modern Serif', 'Times New Roman', serif;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #000000 !important;
  line-height: 1;
}

.thumb-subline-serif {
  font-family: 'Computer Modern Serif', serif;
  font-size: 5.5px;
  color: #475569 !important;
  margin-top: 1.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thumb-rule {
  height: 0.8px;
  background: #0f172a;
  margin: 2.5px 0 3px;
}

.thumb-sec-title-serif {
  font-family: 'Computer Modern Serif', serif;
  font-size: 6.2px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #000000 !important;
  line-height: 1;
}

.thumb-sec-rule-serif {
  height: 0.5px;
  background: #64748b;
  margin: 1.5px 0 2.5px;
}

/* Typography for Modern Tech */
.thumb-name-sans {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 9px;
  font-weight: 800;
  color: #0f172a !important;
  line-height: 1;
  letter-spacing: -0.2px;
}

.thumb-subline-sans {
  font-family: 'Inter', sans-serif;
  font-size: 5.5px;
  color: #64748b !important;
  margin-top: 1.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thumb-sec-title-blue {
  font-family: 'Inter', sans-serif;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #2563eb !important;
  border-bottom: 1.5px solid #2563eb;
  padding-bottom: 1px;
  margin: 3px 0 2.5px;
  line-height: 1;
}

.thumb-tags-row {
  display: flex;
  gap: 3px;
  margin-bottom: 3px;
}

.thumb-tag-blue {
  font-family: 'Inter', sans-serif;
  font-size: 5px;
  font-weight: 600;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 0.5px solid #bfdbfe;
  padding: 0.5px 3px;
  border-radius: 2px;
}

.thumb-dot-blue {
  width: 2.5px;
  height: 2.5px;
  border-radius: 50%;
  background: #2563eb;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Typography for Executive */
.thumb-name-navy {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 800;
  color: #1e3a8a !important;
  line-height: 1;
}

.thumb-role-navy {
  font-family: 'Inter', sans-serif;
  font-size: 5.5px;
  font-style: italic;
  font-weight: 600;
  color: #3b82f6 !important;
  margin-top: 1px;
}

.thumb-rule-navy {
  height: 1.8px;
  background: #1e3a8a;
  margin: 2.5px 0 3px;
}

.thumb-sec-title-navy {
  font-family: 'Inter', sans-serif;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #1e3a8a !important;
  border-bottom: 1px solid #1e3a8a;
  padding-bottom: 1px;
  margin: 3px 0 2.5px;
  line-height: 1;
}

.thumb-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-bottom: 2px;
}

.thumb-chip-navy {
  font-family: 'Inter', sans-serif;
  font-size: 4.8px;
  background: #f1f5f9 !important;
  color: #1e293b !important;
  padding: 1px 2px;
  border-radius: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 1.5px solid #1e3a8a;
}

.thumb-dot-navy {
  width: 2.5px;
  height: 2.5px;
  border-radius: 50%;
  background: #1e3a8a;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Typography for Compact */
.thumb-header-compact {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 1px;
}

.thumb-name-compact {
  font-family: 'Inter', sans-serif;
  font-size: 8px;
  font-weight: 800;
  color: #0f172a !important;
}

.thumb-subline-compact {
  font-family: 'Inter', sans-serif;
  font-size: 5px;
  color: #64748b !important;
}

.thumb-rule-charcoal {
  height: 1px;
  background: #334155;
  margin: 1.5px 0 2px;
}

.thumb-sec-title-charcoal {
  font-family: 'Inter', sans-serif;
  font-size: 5.5px;
  font-weight: 800;
  color: #334155 !important;
  border-bottom: 0.6px solid #94a3b8;
  padding-bottom: 0.5px;
  margin: 2px 0 1.5px;
  line-height: 1;
}

.thumb-grid-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5px;
  margin-bottom: 2px;
}

.thumb-chip-compact {
  font-family: 'Inter', sans-serif;
  font-size: 4.5px;
  color: #475569 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thumb-dash {
  width: 3px;
  height: 0.8px;
  background: #475569;
  flex-shrink: 0;
  margin-top: 3px;
}

/* Universal Thumb Elements */
.thumb-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5px;
}

.thumb-bar-bold {
  height: 3px;
  background: #334155;
  border-radius: 1px;
  display: inline-block;
}

.thumb-bar-dark {
  height: 3px;
  background: #0f172a;
  border-radius: 1px;
  display: inline-block;
}

.thumb-bar-navy {
  height: 3px;
  background: #1e3a8a;
  border-radius: 1px;
  display: inline-block;
}

.thumb-bar-blue {
  height: 3px;
  background: #2563eb;
  border-radius: 1px;
  display: inline-block;
}

.thumb-bar-muted {
  height: 2.5px;
  background: #94a3b8;
  border-radius: 1px;
  display: inline-block;
}

.thumb-bar-sub {
  height: 2.5px;
  background: #cbd5e1;
  border-radius: 1px;
  display: block;
}

.thumb-bullet {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 1.5px;
}

.thumb-bullet-compact {
  display: flex;
  align-items: center;
  gap: 2.5px;
  margin-bottom: 1px;
}

.thumb-dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #334155;
  flex-shrink: 0;
}

.thumb-line {
  height: 2.2px;
  background: #cbd5e1;
  border-radius: 1px;
  display: inline-block;
}

.studio-layout-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.studio-layout-card-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text, #4b3f34) !important;
}

.studio-layout-card-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent, #c06a45) 14%, transparent);
  color: var(--accent, #c06a45);
  border: 1px solid color-mix(in srgb, var(--accent, #c06a45) 26%, transparent);
  white-space: nowrap;
}

.studio-layout-card.is-selected .studio-layout-card-badge {
  background: var(--accent, #c06a45) !important;
  color: #ffffff !important;
  border-color: var(--accent, #c06a45) !important;
}

.studio-layout-card-desc {
  font-size: 11px;
  color: var(--muted, #7c6c59) !important;
  line-height: 1.4;
}

/* ==========================================================================
   New User Onboarding Modal & Wizard
   ========================================================================== */
.resume-onboarding-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100050;
  background: rgba(15, 12, 10, 0.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.resume-onboarding-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.resume-onboarding-card {
  background: var(--bg-card, #fbf5ea);
  border: 1px solid var(--border, #e2d4bd);
  border-radius: 16px;
  width: min(640px, 95vw);
  max-height: 88vh;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.resume-onboarding-backdrop.is-open .resume-onboarding-card {
  transform: translateY(0) scale(1);
}

.resume-onboarding-header {
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--border, #e2d4bd);
  background: var(--bg-soft, #ece1cf);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.resume-onboarding-body {
  padding: 18px 24px 22px;
  overflow-y: auto;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.resume-onboarding-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.resume-onboarding-step-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--bg-soft, #ece1cf);
  color: var(--muted, #7c6c59);
  border: 1px solid var(--border, #e2d4bd);
  transition: all 0.2s ease;
}

.resume-onboarding-step-pill.is-active {
  background: var(--accent, #c06a45);
  color: #ffffff;
  border-color: var(--accent, #c06a45);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.resume-onboarding-step-pill.is-done {
  background: color-mix(in srgb, var(--accent, #c06a45) 15%, transparent);
  color: var(--accent, #c06a45);
  border-color: var(--accent, #c06a45);
}

.resume-onboarding-card .studio-layout-card {
  padding: 8px 10px 10px;
  gap: 4px;
}

.resume-onboarding-card .studio-layout-thumb-paper {
  height: 98px;
}

.resume-onboarding-card .studio-layout-card-desc {
  font-size: 10px;
  line-height: 1.3;
}

.resume-onboarding-dropzone {
  border: 2px dashed var(--border, #e2d4bd);
  border-radius: 14px;
  padding: 36px 20px;
  text-align: center;
  background: var(--surface-solid, #ffffff);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.resume-onboarding-dropzone:hover,
.resume-onboarding-dropzone.is-dragover {
  border-color: var(--accent, #c06a45);
  background: color-mix(in srgb, var(--accent, #c06a45) 6%, var(--surface-solid, #ffffff));
  transform: scale(1.01);
}

.resume-onboarding-upload-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent, #c06a45) 14%, transparent);
  color: var(--accent, #c06a45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.resume-onboarding-dropzone:hover .resume-onboarding-upload-icon {
  transform: translateY(-3px);
}

.resume-onboarding-parse-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  gap: 14px;
  text-align: center;
}

.resume-onboarding-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid color-mix(in srgb, var(--accent, #c06a45) 25%, transparent);
  border-top-color: var(--accent, #c06a45);
  border-radius: 50%;
  animation: obSpin 0.75s linear infinite;
}

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

/* Gallery pill nav */
.studio-gallery-pill {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.studio-gallery-pill:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.studio-gallery-pill.is-active {
  color: #ffffff;
  background: rgba(139, 92, 246, 0.2);
  border-color: #8b5cf6;
  font-weight: 700;
}

line-height: 1;
padding: 4px 6px;
border-radius: 4px;
cursor: pointer;
margin-left: auto;
transition: opacity 0.15s ease,
color 0.15s ease;
}

.studio-dock-card:hover .studio-mini-more-btn {
  opacity: 0.85;
  pointer-events: auto;
}

.studio-dock-card .studio-mini-more-btn:hover {
  opacity: 1 !important;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.12) !important;
}

.studio-dock-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  gap: 6px;
  cursor: pointer;
  color: #7d7d99;
  font-size: 12px;
  transition: all 0.15s ease;
}

.studio-dock-empty:hover {
  border-color: #9a9af7;
  color: #c4c4ff;
  background: rgba(154, 154, 247, 0.04);
}

.studio-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
}

.studio-detail-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.studio-detail-status-area {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.studio-active-status-text {
  font-size: 13.5px;
  font-weight: 600;
  color: #34d399;
  /* Green text from Image 1: Active for auto-apply */
  letter-spacing: -0.1px;
}

.studio-set-active-btn {
  font-size: 12.5px;
  font-weight: 500;
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 6px;
  padding: 3px 12px;
  background: rgba(96, 165, 250, 0.08);
  cursor: pointer;
  transition: all 0.15s ease;
}

.studio-set-active-btn:hover {
  background: rgba(96, 165, 250, 0.18);
  color: #93c5fd;
}

.studio-pill-inuse {
  font-size: 11px;
  font-weight: 700;
  color: #2ecc71;
  background: rgba(46, 204, 113, 0.14);
  border: 1px solid rgba(46, 204, 113, 0.35);
  border-radius: 20px;
  padding: 2px 10px;
}

/* Sub-View Tabs: Preview, What ATS read, LaTeX */
.studio-detail-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.studio-detail-tab-btn {
  background: none;
  border: none;
  outline: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  padding: 3px 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
}

.studio-detail-tab-btn:hover {
  color: #ffffff;
}

.studio-detail-tab-btn.active {
  color: #ffffff;
  font-weight: 600;
}

.studio-detail-tab-btn.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -9px;
  right: 0;
  height: 2px;
  background: #3b82f6;
  border-radius: 2px;
}

.studio-dot-indicator {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
}

.studio-dot-indicator--latex {
  background: #60a5fa;
}

/* Detail Views Area */
.studio-detail-body {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

/* Paper Stage: Transparent container with NO box, NO border, NO background */
.studio-paper-wrapper {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 auto !important;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

/* The Paper Scaler: behaves as the physical white paper sheet */
.studio-paper-scaler {
  background: #ffffff;
  color: #1a1a1a;
  border-radius: 4px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  position: relative;
  margin: 0 auto;
  transition: width 0.12s ease, height 0.12s ease;
}

/* The Frame: rendered at full native print canvas and scaled with transform */
.studio-paper-sheet-v3 {
  background: #ffffff;
  border: none !important;
  margin: 0;
  padding: 0;
  display: block;
  overflow: hidden !important;
  transform-origin: 0 0;
}

/* Bottom Actions Row */
.studio-detail-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
}

.studio-actions-left {
  display: flex;
  gap: 10px;
}

.studio-more-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: all 0.15s ease;
}

.studio-more-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
}

.studio-more-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: #181d28;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 6px;
  display: none;
  flex-direction: column;
  gap: 3px;
  min-width: 175px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  z-index: 100;
}

.studio-more-dropdown.is-open {
  display: flex;
}

/* Floating contextual popover menu for card 3-dots */
#studioCardContextMenu {
  position: fixed !important;
  bottom: auto !important;
  right: auto !important;
  background: #181d28 !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 10px !important;
  padding: 6px 4px !important;
  display: none;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 145px !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
  z-index: 999999 !important;
}

#studioCardContextMenu.is-open {
  display: flex !important;
}

#studioCardContextMenu .studio-more-item {
  background: none;
  border: none;
  color: #e2e8f0;
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 12px;
  text-align: left;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.12s ease;
  width: 100%;
  white-space: nowrap;
}

#studioCardContextMenu .studio-more-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

#studioCardContextMenu .studio-more-item--danger {
  color: #f87171;
}

#studioCardContextMenu .studio-more-item--danger:hover {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
}

.studio-more-item {
  background: none;
  border: none;
  color: #e2e8f0;
  font-size: 13.5px;
  font-weight: 500;
  padding: 9px 14px;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.12s ease;
  width: 100%;
}

.studio-more-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.studio-more-item--danger {
  color: #f87171;
}

.studio-more-item--danger:hover {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}

.studio-more-item--danger:hover {
  background: rgba(235, 111, 146, 0.12);
}

/* Action Row in My Resumes */
.studio-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.studio-action-hint {
  font-size: 13px;
  color: var(--muted);
}

.studio-action-hint strong {
  color: var(--text);
  font-weight: 600;
}

.studio-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* List of Horizontal Resume Cards */
.studio-resume-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.resume-row-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.15s ease;
}

.resume-row-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.035);
}

.resume-row-card--active {
  border: 1px solid rgba(46, 204, 113, 0.45);
  background: rgba(46, 204, 113, 0.025);
}

.resume-row-card--active:hover {
  border-color: rgba(46, 204, 113, 0.65);
}

.resume-row-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 240px;
}

.resume-row-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.resume-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.badge-active-pill {
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(46, 204, 113, 0.16);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.35);
  border-radius: 12px;
  padding: 1px 8px;
}

.badge-master-pill {
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.16);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 12px;
  padding: 1px 8px;
}

.badge-tag-pill {
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 1px 8px;
}

.resume-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.resume-row-actions .btn {
  font-size: 11.5px;
  padding: 5px 11px;
  border-radius: 6px;
}

/* ================= TAILOR TO A JOB (2-COLUMN LAYOUT) ================= */
.studio-tailor-grid {
  display: grid;
  grid-template-columns: 410px 1fr;
  gap: 24px;
  align-items: flex-start;
}

@media (max-width: 1080px) {
  .studio-tailor-grid {
    grid-template-columns: 1fr;
  }
}

.studio-step-label {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  display: block;
}

.studio-subtext {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.4;
}

.studio-chips-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.studio-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.studio-chip:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: #3b82f6;
  color: #ffffff;
}

.studio-match-btn {
  width: 100%;
  margin-top: 14px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 700;
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
  display: flex;
  justify-content: center;
  align-items: center;
}

.studio-match-btn:hover {
  background: #2563eb !important;
  border-color: #2563eb !important;
}

/* Empty State Container */
.studio-empty-state {
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.015);
  border-radius: 12px;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  padding: 30px;
}

/* ==========================================================================
   User Onboarding Journey & Setup Walkthrough Modal
   ========================================================================== */

.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 10006;
  background: rgba(8, 10, 16, 0.85);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.onboarding-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.onboarding-card {
  position: relative;
  width: 100%;
  max-width: 740px;
  background: #111522;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(99, 102, 241, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: onboardingCardSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes onboardingCardSlideUp {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }

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

.onboarding-glow-bar {
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #3b82f6 50%, #10b981 100%);
}

.onboarding-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 10;
}

.onboarding-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.onboarding-header {
  padding: 24px 28px 16px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.015);
}

.onboarding-vip-badge {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(99, 102, 241, 0.14);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.onboarding-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px 0;
  letter-spacing: -0.3px;
}

.onboarding-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 16px 0;
  line-height: 1.45;
}

/* Stepper Navigation */
.onboarding-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}

.onboarding-step {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  opacity: 0.55;
  transition: all 0.2s ease;
}

.onboarding-step:hover {
  opacity: 0.85;
}

.onboarding-step.active {
  opacity: 1;
}

.onboarding-step.completed .onboarding-step-num {
  background: #10b981;
  color: #0b0f19;
  border-color: #10b981;
}

.onboarding-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.onboarding-step.active .onboarding-step-num {
  background: #6366f1;
  border-color: #818cf8;
  color: #fff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.onboarding-step-text {
  font-size: 12.5px;
  font-weight: 600;
  color: #cbd5e1;
}

.onboarding-step.active .onboarding-step-text {
  color: #fff;
}

.onboarding-step-connector {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  transition: background 0.2s ease;
}

.onboarding-step-connector.completed {
  background: rgba(16, 185, 129, 0.6);
}

/* Panes */
.onboarding-pane {
  display: none;
  flex-direction: column;
}

.onboarding-pane.active {
  display: flex;
}

.onboarding-pane-body {
  padding: 24px 28px;
  max-height: 60vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.onboarding-pane-footer {
  padding: 16px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.015);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Dropzone */
.onboarding-dropzone {
  border: 2px dashed rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.03);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.onboarding-dropzone:hover,
.onboarding-dropzone.dragover {
  border-color: #818cf8;
  background: rgba(99, 102, 241, 0.08);
}

.onboarding-dropzone-icon {
  margin-bottom: 8px;
}

.onboard-status-card {
  padding: 12px 16px;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 10px;
}

.onboarding-or-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  margin: 2px 0;
}

.onboarding-or-divider::before,
.onboarding-or-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.onboarding-or-divider span {
  padding: 0 10px;
}

.onboard-template-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

/* Forms */
.onboard-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 16px;
}

.onboard-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.onboard-label {
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
}

.onboard-input {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  background: #141824;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #fff;
  outline: none;
  transition: border-color 0.15s ease;
}

.onboard-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.onboard-input-hint {
  font-size: 11px;
  color: var(--muted);
}

/* Accounts list */
.onboard-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.onboard-account-card {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.onboard-account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.onboard-acc-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.onboard-account-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Engines Grid (Step 4) */
.onboard-engines-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.onboard-engine-card {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.onboard-engine-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.onboard-engine-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 3px 0;
}

.onboard-engine-desc {
  font-size: 11.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

/* Buttons */
.onboarding-btn-primary,
.onboarding-btn-next {
  padding: 8px 18px;
  background: #3b82f6;
  border: 1px solid #3b82f6;
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.onboarding-btn-primary:hover,
.onboarding-btn-next:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.onboarding-btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
  border-color: #6366f1;
}

.onboarding-btn-primary:hover {
  background: linear-gradient(135deg, #4338ca 0%, #2563eb 100%);
}


/* ==========================================================================
   LinkedIn Hiring Team Outreach & Follow-up Pipeline Styles
   ========================================================================== */
.outreach-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.outreach-actions-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.outreach-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.outreach-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.outreach-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.outreach-stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.outreach-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.outreach-stat-val {
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.2;
}
.outreach-stat-sub {
  font-size: 11px;
  color: var(--muted);
}
.outreach-filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 8px;
  margin-bottom: 12px;
}
.outreach-filter-pill {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}
.outreach-filter-pill:hover {
  border-color: var(--accent);
  color: var(--fg);
}
.outreach-filter-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.outreach-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}
.outreach-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 600;
}
.outreach-tag-easy {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.outreach-tag-external {
  background: rgba(100, 116, 139, 0.12);
  color: var(--muted);
  border: 1px solid rgba(100, 116, 139, 0.25);
}
.outreach-stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.outreach-stage-sent {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.outreach-stage-accepted {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.outreach-stage-messaged {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.3);
}
.outreach-stage-replied {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.35);
}
.outreach-stage-none {
  background: rgba(100, 116, 139, 0.1);
  color: var(--muted);
  border: 1px solid rgba(100, 116, 139, 0.2);
}
.outreach-variable-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 11px;
  font-family: monospace;
  color: var(--accent);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}
.outreach-variable-chip:hover {
  background: var(--surface);
  border-color: var(--accent);
}
.outreach-settings-drawer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.05));
}
.outreach-table-container {
  overflow-x: auto;
  min-height: 200px;
}
.outreach-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.outreach-table th {
  background: var(--bg);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1;
}
.outreach-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--fg);
}
.outreach-table tr:hover td {
  background: rgba(0, 0, 0, 0.015);
}
