/* Tailored Resume Left JD Inspector Panel & Character-Level Highlighting
 * Zero layout impact when collapsed; mirrors right AI chat drawer mechanics when expanded.
 */

.page-shell {
  transition:
    padding-left 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    padding-right 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Left-edge persistent trigger tab */
.jd-panel-edge-tab {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 940;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 10px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  background: var(--surface, #ffffff);
  color: var(--text, #111827);
  border: 1px solid var(--border, #e5e7eb);
  border-left: none;
  border-radius: 0 12px 12px 0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    transform 0.2s ease,
    opacity 0.2s ease;
}

.jd-panel-edge-tab:hover {
  background: var(--accent-soft, #eff6ff);
  color: var(--accent, #1d4ed8);
  border-color: var(--accent, #1d4ed8);
}

.jd-panel-edge-tab:focus-visible {
  outline: 2px solid var(--accent, #1d4ed8);
  outline-offset: 2px;
}

body.jd-panel-open .jd-panel-edge-tab {
  opacity: 0;
  pointer-events: none;
  transform: translate(-100%, -50%);
}

/* Left JD Inspector Drawer */
.jd-inspector-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(392px, 92vw);
  z-index: 960;
  display: flex;
  flex-direction: column;
  background: var(--surface, #ffffff);
  color: var(--text, #111827);
  border-right: 1px solid var(--border, #e5e7eb);
  box-shadow: 12px 0 36px rgba(15, 23, 42, 0.1);
  transform: translateX(-100%);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

body.jd-panel-open .jd-inspector-sidebar {
  transform: translateX(0);
}

@media (min-width: 1180px) {
  body.jd-panel-open {
    --page-px: clamp(24px, 3.2vw, 56px);
  }

  body.jd-panel-open .page-shell {
    padding-left: 392px;
  }

  /* Ensure multi-column sections adapt cleanly inside compressed viewport */
  body.jd-panel-open .summary-layout,
  body.jd-panel-open .two-col-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  body.jd-panel-open .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  body.jd-panel-open .domain-matrix {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  body.jd-panel-open.ai-chat-open .hero-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1179px) {
  .jd-panel-edge-tab {
    top: auto;
    bottom: 20px;
    left: 16px;
    transform: none;
    writing-mode: horizontal-tb;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 999px;
    padding: 9px 14px;
  }

  body.jd-panel-open .jd-panel-edge-tab {
    transform: translateY(16px);
  }
}

/* Header */
.jd-sidebar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  background: var(--surface, #ffffff);
  flex-shrink: 0;
}

.jd-sidebar-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent, #1d4ed8);
  margin-bottom: 4px;
}

.jd-sidebar-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text, #111827);
}

.jd-sidebar-company {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-muted, #4b5563);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.jd-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
}

.jd-close-btn {
  appearance: none;
  border: 1px solid var(--border, #e5e7eb);
  background: var(--surface, #ffffff);
  color: var(--text-muted, #4b5563);
  border-radius: 8px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.jd-close-btn:hover {
  background: var(--bg, #f8fafc);
  color: var(--text, #111827);
  border-color: var(--text-muted, #9ca3af);
}

/* Match Status Bar */
.jd-match-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  background: var(--bg, #f8fafc);
  font-size: 12px;
  color: var(--text-muted, #4b5563);
  flex-shrink: 0;
}

.jd-match-status-text {
  line-height: 1.4;
  min-width: 0;
}

.jd-match-status-text strong {
  color: var(--text, #111827);
}

.jd-clear-btn {
  appearance: none;
  border: 1px solid var(--border, #e5e7eb);
  background: var(--surface, #ffffff);
  color: var(--text, #111827);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.jd-clear-btn:hover:not(:disabled) {
  border-color: var(--accent, #1d4ed8);
  color: var(--accent, #1d4ed8);
}

.jd-clear-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Scrollable Body */
.jd-sidebar-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 18px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.jd-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.jd-meta-item {
  padding: 8px 10px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  background: var(--bg, #f8fafc);
}

.jd-meta-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #6b7280);
  margin-bottom: 2px;
}

.jd-meta-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #111827);
  word-break: break-word;
}

.jd-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jd-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted, #6b7280);
  margin: 0;
}

.jd-section-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #6b7280);
}

.jd-description-box {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted, #374151);
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg, #f8fafc);
  border: 1px solid var(--border, #e5e7eb);
}

/* Clickable JD Requirement Items */
.jd-item-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jd-req-btn {
  width: 100%;
  text-align: left;
  appearance: none;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text, #111827);
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background-color 0.16s ease,
    box-shadow 0.16s ease;
}

.jd-req-btn:hover {
  border-color: var(--accent, #1d4ed8);
  background: rgba(29, 78, 216, 0.03);
}

.jd-req-btn.is-active {
  border-color: #d97706;
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.25);
}

.jd-req-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted, #6b7280);
}

.jd-req-concepts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.jd-concept-chip {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  background: var(--bg, #f1f5f9);
  color: var(--text-muted, #475569);
  border: 1px solid var(--border, #e2e8f0);
}

.jd-req-btn.is-active .jd-concept-chip {
  background: rgba(245, 158, 11, 0.16);
  color: #92400e;
  border-color: rgba(217, 119, 6, 0.35);
}

/* Keywords Grid */
.jd-keyword-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jd-keyword-card {
  width: 100%;
  text-align: left;
  appearance: none;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 9px 12px;
  font-family: inherit;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background-color 0.16s ease,
    box-shadow 0.16s ease;
}

.jd-keyword-card:hover {
  border-color: var(--accent, #1d4ed8);
}

.jd-keyword-card.is-active {
  border-color: #d97706;
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.25);
}

.jd-keyword-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #111827);
}

.jd-keyword-match-note {
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-muted, #4b5563);
}

/* Character & Word-Level Highlight inside Live Resume DOM */
mark.jd-char-highlight {
  background: rgba(245, 158, 11, 0.24);
  color: inherit;
  border-radius: 2px;
  padding: 0;
  margin: 0;
  box-shadow: inset 0 -2px 0 rgba(217, 119, 6, 0.72);
  font: inherit;
  letter-spacing: inherit;
}

mark.jd-char-highlight.is-primary-hit {
  background: rgba(251, 191, 36, 0.36);
  box-shadow:
    0 0 0 1.5px rgba(217, 119, 6, 0.55),
    inset 0 -2px 0 rgba(180, 83, 9, 0.85);
}

/* Tailored Match Trigger Buttons in Experience & Project Cards */
.tailored-match-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 6px;
  border-radius: 999px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  cursor: pointer;
  font-family: inherit;
  font-size: 11.5px;
  line-height: 1.4;
  vertical-align: middle;
  transition: all 0.16s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.tailored-match-trigger-btn:hover {
  border-color: var(--accent, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.1);
}

.tailored-match-pill-score {
  font-weight: 700;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.tailored-match-pill-label {
  font-weight: 600;
  color: var(--text, #111827);
  letter-spacing: 0.02em;
}

/* Floating Popover Modal for Match Analysis */
.tailored-match-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: tailoredMatchFadeIn 0.18s ease-out;
}

.tailored-match-modal-card {
  position: relative;
  width: 100%;
  max-width: 580px;
  max-height: 86vh;
  background: var(--surface, #ffffff);
  color: var(--text, #111827);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 14px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: tailoredMatchSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.tailored-match-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-soft, #f8fafc);
  flex-shrink: 0;
}

.tailored-match-modal-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent, #1d4ed8);
  margin-bottom: 4px;
}

.tailored-match-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text, #111827);
}

.tailored-match-modal-close-btn {
  appearance: none;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.tailored-match-modal-close-btn:hover {
  background: #f1f5f9;
  color: var(--text, #111827);
  border-color: #cbd5e1;
}

.tailored-match-modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tailored-match-target-job {
  padding: 10px 14px;
  background: var(--bg-soft, #f8fafc);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text-muted, #4b5563);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.tailored-match-target-job strong {
  color: var(--text, #111827);
}

.tailored-match-score-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 10px;
  gap: 12px;
}

.tailored-match-score-val {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tailored-match-score-tier-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.tailored-match-points-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tailored-match-points-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #111827);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tailored-match-points-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary, #334155);
}

.tailored-match-points-list li::marker {
  color: var(--accent, #1d4ed8);
}

.tailored-match-modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border, #e5e7eb);
  background: var(--bg-soft, #f8fafc);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.tailored-match-modal-done-btn {
  appearance: none;
  background: var(--accent, #1d4ed8);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.tailored-match-modal-done-btn:hover {
  background: #1e40af;
}

@keyframes tailoredMatchFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes tailoredMatchSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

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

/* External Link Card in Left Sidebar */
.jd-external-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: #1d4ed8;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 12px;
  transition: all 0.15s ease;
}

.jd-external-link-card:hover {
  background: rgba(37, 99, 235, 0.12);
  border-color: #1d4ed8;
  text-decoration: none;
}

/* Card Experience & Project Selection Checkbox */
.tailored-card-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-subtle, #d1d5db);
  cursor: pointer;
  user-select: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary, #475569);
  transition: all 0.15s ease;
}

.tailored-card-checkbox-label:hover {
  border-color: #2563eb;
  color: #1e40af;
  background: rgba(37, 99, 235, 0.04);
}

.tailored-card-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.tailored-card-checkbox-custom {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1.5px solid #94a3b8;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  position: relative;
}

.tailored-card-checkbox:checked+.tailored-card-checkbox-custom {
  background: #2563eb;
  border-color: #2563eb;
}

.tailored-card-checkbox:checked+.tailored-card-checkbox-custom::after {
  content: "";
  display: block;
  width: 4px;
  height: 7px;
  border: solid #ffffff;
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(45deg) translate(-0.5px, -0.5px);
}

.tailored-card-checkbox-text {
  line-height: 1;
}

/* Card Excluded State */
.is-card-excluded .tailored-card-checkbox-label {
  background: rgba(148, 163, 184, 0.08);
  border-color: #cbd5e1;
  color: #64748b;
}

.tailored-match-pill-tier {
  font-size: 11px;
  font-weight: 700;
  margin-left: 2px;
}

/* Top Sticky Match Score Dashboard Bar */
.tailored-score-dashboard-bar {
  position: sticky;
  top: 0;
  z-index: 85;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(203, 213, 225, 0.85);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  padding: 8px 16px;
  animation: dashFadeInDown 0.25s ease-out;
}

@keyframes dashFadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.dash-bar-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.dash-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.dash-target-badge {
  font-weight: 700;
  font-size: 11px;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.dash-target-title {
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  white-space: nowrap;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-target-company {
  color: var(--text-secondary, #64748b);
  font-weight: 500;
  white-space: nowrap;
}

.dash-bar-scores {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dash-score-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-subtle, #cbd5e1);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11.5px;
}

.dash-score-item--sel {
  border-width: 1.5px;
  font-weight: 600;
}

.dash-label {
  font-size: 11px;
  color: var(--text-secondary, #64748b);
  font-weight: 600;
  white-space: nowrap;
}

.dash-score-badge {
  font-weight: 700;
  font-size: 11.5px;
  padding: 1px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.dash-sub {
  font-size: 10.5px;
  color: #94a3b8;
  white-space: nowrap;
}

.dash-arrow {
  color: #94a3b8;
  font-size: 12px;
}

.dash-delta-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.dash-delta-tag.is-positive {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.dash-delta-tag.is-negative {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.dash-delta-tag.is-neutral {
  background: rgba(148, 163, 184, 0.15);
  color: #475569;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

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

/* Dashboard & Sidebar Status Selector (Sleek, Modern Badge Style) */
.dash-status-badge-wrap {
  display: inline-flex;
  align-items: center;
  position: relative;
  height: 24px;
  padding: 0 6px 0 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: all 0.15s ease;
  user-select: none;
  cursor: pointer;
  box-sizing: border-box;
}

.dash-status-badge-wrap:hover {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.tailored-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-inline-end: 5px;
  pointer-events: none;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.dash-status-select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  padding: 0 14px 0 0;
  margin: 0;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
  outline: none;
  line-height: 24px;
  height: 24px;
}

.dash-status-select:focus {
  outline: none;
}

.tailored-status-chevron {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.dash-status-badge-wrap:hover .tailored-status-chevron {
  opacity: 1;
}

/* 0a. Applying (Cyan) */
.tailored-status--applying {
  background-color: #ecfeff;
  border: 1px solid #a5f3fc;
  color: #0e7490;
}
.tailored-status--applying:hover {
  background-color: #cffafe;
  border-color: #67e8f9;
}
.tailored-status--applying .tailored-status-dot {
  background-color: #06b6d4;
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.25);
}
.tailored-status--applying .tailored-status-chevron {
  stroke: #0891b2;
}

/* 0b. Applied (Blue) */
.tailored-status--applied {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}
.tailored-status--applied:hover {
  background-color: #e0edff;
  border-color: #93c5fd;
}
.tailored-status--applied .tailored-status-dot {
  background-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}
.tailored-status--applied .tailored-status-chevron {
  stroke: #2563eb;
}

/* 1. Published (Emerald) */
.tailored-status--published {
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.tailored-status--published:hover {
  background-color: #e6fcf1;
  border-color: #6ee7b7;
}
.tailored-status--published .tailored-status-dot {
  background-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}
.tailored-status--published .tailored-status-chevron {
  stroke: #059669;
}

/* 2. Private (Indigo) */
.tailored-status--private {
  background-color: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #3730a3;
}
.tailored-status--private:hover {
  background-color: #e6eaff;
  border-color: #a5b4fc;
}
.tailored-status--private .tailored-status-dot {
  background-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}
.tailored-status--private .tailored-status-chevron {
  stroke: #4f46e5;
}

/* 3. Draft (Amber) */
.tailored-status--draft {
  background-color: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}
.tailored-status--draft:hover {
  background-color: #fef8db;
  border-color: #fcd34d;
}
.tailored-status--draft .tailored-status-dot {
  background-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}
.tailored-status--draft .tailored-status-chevron {
  stroke: #d97706;
}

/* 4. Archived (Slate) */
.tailored-status--archived {
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
}
.tailored-status--archived:hover {
  background-color: #f1f5f9;
  border-color: #94a3b8;
}
.tailored-status--archived .tailored-status-dot {
  background-color: #94a3b8;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.2);
}
.tailored-status--archived .tailored-status-chevron {
  stroke: #64748b;
}

.dash-save-indicator {
  font-size: 11px;
  font-weight: 600;
  transition: opacity 0.3s ease;
  opacity: 0;
  white-space: nowrap;
}

.dash-save-indicator.is-saving {
  color: #64748b;
}

.dash-save-indicator.is-saved {
  color: #10b981;
}

.dash-save-indicator.is-error {
  color: #ef4444;
}

.dash-action-btn {
  height: 28px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.dash-action-btn--save {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #ffffff;
}

.dash-action-btn--save:hover {
  background: #1d4ed8;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  transform: translateY(-1px);
}

.dash-action-btn--save.is-saved {
  background: #059669;
  border-color: #047857;
  color: #ffffff;
}

.dash-action-btn--save.is-error {
  background: #dc2626;
  border-color: #b91c1c;
  color: #ffffff;
}

.dash-action-btn--reset {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #475569;
}

.dash-action-btn--reset:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.dash-action-btn--export {
  background: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
}

.dash-action-btn--export:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

/* Sidebar Dual-Score Dashboard Grid */
.jd-score-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.jd-dash-box {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.jd-dash-box--sel {
  border-width: 1.5px;
}

.jd-dash-box-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary, #64748b);
  text-transform: uppercase;
  margin-bottom: 2px;
  letter-spacing: 0.3px;
}

.jd-dash-box-score {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.jd-dash-box-tier {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin: 3px 0 2px 0;
}

.jd-dash-box-desc {
  font-size: 9.5px;
  color: #94a3b8;
}

.jd-dash-arrow {
  color: #94a3b8;
  font-size: 14px;
  text-align: center;
}

.jd-dash-delta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed var(--border-subtle, #cbd5e1);
  font-size: 11px;
  margin-bottom: 8px;
}

.jd-dash-delta-label {
  font-weight: 600;
  color: var(--text-secondary, #475569);
  white-space: nowrap;
}

.jd-dash-delta-val {
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
}

.jd-dash-delta-val.is-positive {
  color: #047857;
}

.jd-dash-delta-val.is-negative {
  color: #b91c1c;
}

.jd-dash-delta-val.is-neutral {
  color: #64748b;
}

.jd-dash-delta-desc {
  font-size: 10px;
  color: #64748b;
  flex: 1;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .dash-bar-container {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .dash-bar-scores {
    justify-content: flex-start;
  }
  .dash-bar-actions {
    justify-content: flex-end;
  }
}

@media print {

  .tailored-score-dashboard-bar,
  #tailored-score-dashboard-bar,
  .jd-score-dashboard-grid,
  .jd-dash-delta-row,
  .jd-panel-edge-tab,
  .jd-inspector-sidebar,
  .tailored-match-trigger-btn,
  .tailored-match-modal-overlay,
  .tailored-match-container,
  [data-tailored-match="true"] {
    display: none !important;
  }

  body.jd-panel-open .page-shell {
    padding-left: 0 !important;
  }

  mark.jd-char-highlight {
    background: transparent !important;
    box-shadow: none !important;
  }
}

/* ==========================================================================
   Public Viewer Mode — Clean, Uncluttered Candidate Resume
   ========================================================================== */

.is-public-viewer #dash-bar-container,
.is-public-viewer #tailored-score-dashboard-bar,
.is-public-viewer #jd-panel-edge-tab,
.is-public-viewer #jd-inspector-sidebar,
.is-public-viewer #jd-panel-backdrop,
.is-public-viewer .tailored-card-checkbox-label,
.is-public-viewer .tailored-match-trigger-btn,
.is-public-viewer .tailored-match-pill,
.is-public-viewer .tailored-public-hidden {
  display: none !important;
}

.tailored-public-hidden {
  display: none !important;
}

/* Share & Preview Buttons in Admin Studio Dashboard */
.dash-action-btn--share {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}
.dash-action-btn--share:hover {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.dash-action-btn--preview {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dash-action-btn--preview:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
  text-decoration: none;
}

/* Private Notice Banner */
.tailored-private-notice-banner {
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  color: #92400e;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}