:root {
  --text-primary: rgba(20, 32, 45, 0.92);
  --text-secondary: rgba(20, 32, 45, 0.60);
  --text-muted: rgba(20, 32, 45, 0.42);
  --accent: #168CA4;
  --accent-hover: #0F7F97;
  --accent-active: #0B6F86;
  --accent-soft: rgba(22, 140, 164, 0.08);
  --accent-soft-strong: rgba(22, 140, 164, 0.12);
  --accent-border: rgba(22, 140, 164, 0.18);
  --success: #2E8B6F;
  --danger: #B42318;

  --brand-50: var(--accent-soft);
  --brand-100: var(--accent-soft-strong);
  --brand-200: #a9ddec;
  --brand-300: #70c2d7;
  --brand-400: #1C9AB0;
  --brand-500: var(--accent);
  --brand-600: var(--accent-hover);
  --brand-700: var(--accent-active);

  --bg-app: #f8fbfd;
  --surface: #ffffff;
  --surface-soft: #f8fafc;

  --text-main: var(--text-primary);
  --text-heading: var(--text-primary);
  --text-soft: var(--text-muted);

  --border-soft: #e5e7eb;
  --border-brand: var(--accent-border);

  --shadow-card: 0 18px 50px rgba(17, 24, 39, 0.07);
  --shadow-button: 0 12px 28px rgba(22, 140, 164, 0.18);

  --left-safe-area: 160px;
  --page-max-width: 1240px;

  --font-heading: var(--font-body); /* guide-v2: Inter headings; Georgia dropped */
  /* Canonical product UI typeface (design-guide-v2 §Typography = Inter).
     Backed by the self-hosted Inter variable face in style.css. */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  /* Weight ladder (Inter variable renders each truly). guide-v2: lighten, cap the top. */
  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 550;
  --fw-bold: 600;
  --fw-heavy: 700;
  /* Canonical page title (guide-v2 page-heading: 34px / 550). ONE spec for
     every page's main <h1> so all page titles match. */
  --title-size: clamp(34px, 4vw, 44px);
  --title-weight: var(--fw-semibold);
  --title-line: 1.1;
}

body,
.sb-front-page {
  background: var(--bg-app);
  color: var(--text-main);
}

.sb-main {
  position: relative;
  padding: 48px 56px 72px var(--left-safe-area);
  color: var(--text-main);
  background: linear-gradient(180deg, #fbfdff 0%, #f8fbfd 56%, #f3f8fb 100%);
}

.sb-main::before {
  display: none;
}

.sb-sidebar-logo-img {
  width: 212px !important;
  max-width: 212px !important;
}

.sb-menu-item.active {
  border-color: rgba(31, 151, 169, 0.07) !important;
  background: rgba(31, 151, 169, 0.095) !important;
  color: #168ca4 !important;
  box-shadow: none !important;
}

.sb-menu-item:hover {
  background: rgba(32, 151, 172, 0.055);
  color: #198ea3;
}

.page-inner,
.dashboard-shell,
.saved-jobs-page,
.weekly-page {
  width: min(var(--page-max-width), 100%);
  margin: 24px auto;
}

.app-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
}

.app-page-eyebrow {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-page-title {
  margin: 0;
  color: var(--text-heading);
  font-size: clamp(34px, 4vw, 44px);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: 0;
}

.app-page-subtitle {
  margin: 10px 0 0;
  max-width: 680px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.5;
}

.app-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.btn,
.dashboard-action,
.sj-button,
#application-bot-root .apb-create-cv-btn,
/* #application-bot-root .jobhelp-bottom-action-btn.open-video-popup, */
#application-bot-root .apb-btn-primary,
#application-bot-root .apb-btn-secondary,
#application-bot-root .btn-primary,
#application-bot-root .btn-secondary,
#application-bot-root .empty-cta,
/* .jobhelp-bottom-action-btn, */
.sb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px !important;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

.btn:hover,
.dashboard-action:hover,
.sj-button:hover,
#application-bot-root .apb-create-cv-btn:hover,
#application-bot-root .jobhelp-bottom-action-btn.open-video-popup:hover,
.jobhelp-bottom-action-btn:hover {
  transform: translateY(-1px);
}

.btn-primary,
.dashboard-action--primary,
.sj-button--primary,
#application-bot-root .apb-create-cv-btn,
#application-bot-root .empty-cta,
#application-bot-root .apb-btn-primary,
#application-bot-root .btn-primary,
#application-bot-root .apb-profile-btn-primary,
#application-bot-root .apb-editor-ai-feedback-btn,
#application-bot-root .apb-editor-nav-item.active,
#application-bot-root .apb-pagination-btn.active,
#application-bot-root .apb-job-addon-checkbox.checked,
.sb-btn {
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: linear-gradient(135deg, #1C9AB0, var(--accent)) !important;
  color: #ffffff !important;
  box-shadow: var(--shadow-button) !important;
}

.btn-primary:hover,
.dashboard-action--primary:hover,
.sj-button--primary:hover,
#application-bot-root .apb-create-cv-btn:hover,
#application-bot-root .empty-cta:hover,
#application-bot-root .apb-btn-primary:hover:not(:disabled),
#application-bot-root .btn-primary:hover,
.sb-btn:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover)) !important;
  box-shadow: 0 16px 34px rgba(22, 140, 164, 0.24) !important;
}

.btn-secondary,
.dashboard-action--secondary,
.sj-button--secondary,
#application-bot-root .jobhelp-bottom-action-btn.open-video-popup,
#application-bot-root .apb-btn-secondary,
#application-bot-root .btn-secondary,
.jobhelp-bottom-action-btn {
  border: 1px solid var(--border-brand) !important;
  background: var(--surface) !important;
  color: var(--brand-600) !important;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.04) !important;
}

.btn-secondary:hover,
.dashboard-action--secondary:hover,
.sj-button--secondary:hover,
#application-bot-root .jobhelp-bottom-action-btn.open-video-popup:hover,
#application-bot-root .apb-btn-secondary:hover,
.jobhelp-bottom-action-btn:hover {
  background: var(--brand-50) !important;
  border-color: rgba(22, 140, 164, 0.30) !important;
}

.btn-ghost,
.sj-button--ghost {
  border: 1px solid transparent !important;
  background: transparent !important;
  color: var(--brand-600) !important;
  box-shadow: none !important;
}

.icon-btn,
.sj-icon-button,
#application-bot-root .apb-btn-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border-soft) !important;
  border-radius: 999px !important;
  background: var(--surface) !important;
  color: var(--text-muted) !important;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.04) !important;
}

.icon-btn:hover,
.sj-icon-button:hover,
#application-bot-root .apb-btn-icon:hover {
  color: var(--brand-600) !important;
  background: var(--brand-50) !important;
  border-color: var(--border-brand) !important;
}

.card,
.metric-card,
.insight-card,
.recent-panel,
.sj-summary-card,
.sj-insight-card,
.sj-empty-board,
.sj-modal-panel,
.sj-drawer-panel,
.sj-fit-panel,
.weekly-workspace,
#application-bot-root .apb-card,
#application-bot-root .apb-filter-bar,
#application-bot-root .empty-content-area {
  border: 1px solid rgba(17, 24, 39, 0.06) !important;
  background: rgba(255, 255, 255, 0.88) !important;
  box-shadow: var(--shadow-card) !important;
}

.metric-card,
.sj-summary-card {
  border-radius: 20px !important;
}

.insight-card,
.recent-panel,
.sj-insight-card,
.sj-empty-board,
.weekly-workspace,
#application-bot-root .apb-filter-bar {
  border-radius: 24px !important;
}

.sj-modal-panel,
.sj-drawer-panel,
.sj-fit-panel,
#application-bot-root .apb-card {
  border-radius: 24px !important;
}

.input,
.sj-search,
.sj-add-form input,
.sj-add-form textarea,
.sj-preview-panel input,
.sj-preview-panel textarea,
.sj-preview-panel select,
.sj-drawer textarea,
#application-bot-root input,
#application-bot-root textarea,
#application-bot-root select {
  border-color: var(--border-soft) !important;
}

.input:focus,
.sj-search:focus-within,
.sj-add-form input:focus,
.sj-add-form textarea:focus,
.sj-preview-panel input:focus,
.sj-preview-panel textarea:focus,
.sj-preview-panel select:focus,
.sj-drawer textarea:focus,
#application-bot-root textarea:focus,
#application-bot-root select:focus {
  border-color: var(--brand-400) !important;
  box-shadow: 0 0 0 4px rgba(42, 159, 192, 0.12) !important;
  outline: none !important;
}

.dashboard-shell {
  padding-bottom: 24px;
}

.dashboard-topbar,
.saved-jobs-topbar {
  min-height: 44px;
}

.dashboard-hero h1,
.saved-jobs-header h1 {
  color: var(--text-heading);
  letter-spacing: 0;
}

.dashboard-action svg,
.sj-button svg,
#application-bot-root .apb-create-cv-btn svg,
#application-bot-root .jobhelp-bottom-action-btn.open-video-popup svg {
  width: 18px;
  height: 18px;
  stroke: currentColor !important;
}

.ai-assistant-card {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.assistant-spark,
.sj-spark,
.composer-send {
  color: var(--brand-400);
}

.composer-send,
.ai-send {
  background: linear-gradient(180deg, var(--brand-400), var(--brand-500)) !important;
  color: #ffffff;
}

.metric-card--blue .metric-icon,
.metric-card--green .metric-icon,
.metric-card--amber .metric-icon,
.metric-card--purple .metric-icon,
.row-icon--blue,
.row-icon--green,
.row-icon--purple {
  color: var(--brand-500);
  background: var(--brand-50);
}

.pill-link {
  border-color: var(--border-brand);
  color: var(--brand-600) !important;
  background: #ffffff;
}

.saved-jobs-header {
  text-align: left !important;
  padding: 20px 0 22px;
}

.saved-jobs-header .sj-eyebrow {
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.sj-button {
  border-radius: 999px !important;
}

.sj-chip,
.apb-filter-tab-btn {
  border-radius: 999px !important;
}

.sj-chip.is-active,
#application-bot-root .apb-filter-tab-btn.active,
#application-bot-root .apb-filter-tab-btn[aria-pressed="true"] {
  border-color: var(--border-brand) !important;
  background: var(--brand-50) !important;
  color: var(--brand-600) !important;
}

.sj-lane {
  border-radius: 24px !important;
}

.sj-modal-backdrop,
.sj-drawer-backdrop,
.sj-fit-backdrop {
  background: rgba(17, 24, 39, 0.32) !important;
  backdrop-filter: blur(8px);
}

.sj-drawer {
  display: grid !important;
  place-items: center !important;
  padding: 32px clamp(24px, 5vw, 72px) !important;
}

.sj-drawer[hidden] {
  display: none !important;
}

.sj-drawer-panel {
  width: min(980px, calc(100vw - 96px)) !important;
  max-width: 980px !important;
  /* height: min(86vh, 820px) !important;
  max-height: calc(100vh - 64px) !important; */
  margin: 0 !important;
  border-radius: 28px !important;
}

.sj-modal-panel,
.sj-fit-panel {
  border-radius: 28px !important;
}

#application-bot-root .apb-modal {
  max-width: min(720px, calc(100vw - 32px)) !important;
  min-width: 0 !important;
  max-height: min(860px, calc(100vh - 32px)) !important;
  padding: 0 !important;
  border: 1px solid rgba(17, 24, 39, 0.08) !important;
  border-radius: 28px !important;
  background: var(--surface) !important;
  box-shadow: 0 28px 80px rgba(17, 24, 39, 0.2) !important;
  overflow: hidden !important;
}

#application-bot-root .apb-modal::backdrop {
  background: rgba(17, 24, 39, 0.32) !important;
  backdrop-filter: blur(8px) !important;
}

#application-bot-root .apb-modal-container {
  display: flex !important;
  flex-direction: column !important;
  max-height: min(860px, calc(100vh - 32px)) !important;
  border-radius: 28px !important;
  background: var(--surface) !important;
  overflow: hidden !important;
}

#application-bot-root .apb-modal-content {
  min-height: 0 !important;
  background: var(--surface) !important;
  overflow: auto !important;
}

#application-bot-root .apb-modal-header,
#application-bot-root .apb-header-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  border-bottom: 1px solid rgba(17, 24, 39, 0.06) !important;
  text-align: left !important;
  padding-bottom: 20px !important;
}

#application-bot-root .apb-modal-header h2,
#application-bot-root .apb-upload-header {
  margin: 0 !important;
  color: var(--text-heading) !important;
  font-size: 26px !important;
  font-weight: 650 !important;
  line-height: 1.15 !important;
  letter-spacing: 0 !important;
}

#application-bot-root .apb-modal-header p,
#application-bot-root .apb-section-modal-subtitle,
#application-bot-root .apb-upload-subtitle {
  margin-top: 8px !important;
  color: var(--text-muted) !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  font-weight: 400 !important;
}

#application-bot-root .apb-modal-close,
#application-bot-root .apb-upload-close {
  flex: 0 0 auto !important;
  width: 40px !important;
  height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid var(--border-soft) !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: var(--text-muted) !important;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.05) !important;
  transition: all 160ms ease !important;
}

#application-bot-root .apb-modal-close:hover,
#application-bot-root .apb-upload-close:hover {
  border-color: var(--border-brand) !important;
  background: var(--brand-50) !important;
  color: var(--brand-600) !important;
}

#application-bot-root .apb-modal-close svg,
#application-bot-root .apb-upload-close svg,
#application-bot-root .apb-modal-option svg,
#application-bot-root .apb-upload-modal svg {
  stroke: currentColor !important;
}

#application-bot-root .apb-modal-options {
  display: grid !important;
  gap: 14px !important;
  padding: 24px 28px 28px !important;
  background: var(--surface) !important;
}

#application-bot-root .apb-modal-option {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 16px !important;
  min-height: 86px !important;
  padding: 18px 20px !important;
  border: 1px solid rgba(17, 24, 39, 0.08) !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.05) !important;
  color: var(--text-main) !important;
  text-align: left !important;
  transition: all 160ms ease !important;
}

#application-bot-root .apb-modal-option:hover,
#application-bot-root .apb-modal-option-insertCV {
  border-color: var(--border-brand) !important;
  background: linear-gradient(135deg, #ffffff 0%, var(--brand-50) 100%) !important;
}

#application-bot-root .apb-modal-option:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.08) !important;
}

#application-bot-root .apb-option-icon {
  width: 44px !important;
  height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 16px !important;
  background: var(--brand-50) !important;
  color: var(--brand-500) !important;
}

#application-bot-root .apb-option-content h3 {
  margin: 0 0 5px !important;
  color: var(--text-heading) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

#application-bot-root .apb-option-content p {
  margin: 0 !important;
  color: var(--text-muted) !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}

#application-bot-root .apb-option-arrow {
  color: var(--brand-600) !important;
}

#application-bot-root .recommendation-badge,
#application-bot-root .apb-badge-required {
  border-radius: 999px !important;
  background: linear-gradient(180deg, var(--brand-500), var(--brand-600)) !important;
  color: #ffffff !important;
  box-shadow: var(--shadow-button) !important;
}

#application-bot-root .apb-upload-modal,
#application-bot-root .apb-modal-body {
  background: var(--surface) !important;
}

#application-bot-root .apb-upload-section,
#application-bot-root .apb-modal-body,
#application-bot-root .apb-section-modal,
#application-bot-root .apb-templates-grid {
  padding: 24px 28px !important;
}

#application-bot-root .apb-upload-container,
#application-bot-root .apb-upload-dropzone {
  border-color: rgba(42, 159, 192, 0.32) !important;
  border-radius: 22px !important;
  background: var(--brand-50) !important;
}

#application-bot-root .apb-upload-dropzone:hover {
  border-color: var(--brand-400) !important;
  background: #f2fbfd !important;
}

#application-bot-root .apb-upload-icon,
#application-bot-root .apb-upload-loader-circle {
  color: var(--brand-500) !important;
  border-top-color: var(--brand-400) !important;
}

#application-bot-root .apb-tab,
#application-bot-root .apb-application-type-tabs button {
  min-height: 36px !important;
  padding: 0 14px !important;
  border: 1px solid var(--border-soft) !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: var(--text-muted) !important;
  box-shadow: none !important;
}

#application-bot-root .apb-tab-active,
#application-bot-root .apb-application-type-tabs button.apb-tab-active {
  border-color: var(--border-brand) !important;
  background: var(--brand-50) !important;
  color: var(--brand-600) !important;
}

#application-bot-root .apb-templates-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

#application-bot-root .apb-template-item {
  border: 1px solid rgba(17, 24, 39, 0.08) !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.05) !important;
  overflow: hidden !important;
}

#application-bot-root .apb-template-item:hover,
#application-bot-root .apb-template-item.selected {
  border-color: var(--border-brand) !important;
  background: var(--brand-50) !important;
}

#application-bot-root .apb-template-check {
  background: var(--brand-500) !important;
  color: #ffffff !important;
  border-color: var(--brand-500) !important;
}

#application-bot-root .apb-modal-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  padding: 18px 28px 24px !important;
  border-top: 1px solid rgba(17, 24, 39, 0.06) !important;
  background: rgba(248, 250, 252, 0.72) !important;
}

#application-bot-root .apb-modal .apb-btn-primary,
#application-bot-root .apb-modal .apb-btn-secondary {
  min-height: 44px !important;
  border-radius: 999px !important;
  padding: 0 20px !important;
  font-weight: 650 !important;
}

.apb-modal {
  max-height: 90vh;
  max-width: 80vw;
  padding: 0 !important;
  border: 1px solid rgba(17, 24, 39, 0.08) !important;
  border-radius: 28px !important;
  background: var(--surface) !important;
  box-shadow: 0 28px 80px rgba(17, 24, 39, 0.2) !important;
  overflow: hidden !important;
}

.apb-modal::backdrop {
  background: rgba(17, 24, 39, 0.32) !important;
  backdrop-filter: blur(8px) !important;
}

.apb-modal .apb-modal-container {
  display: flex !important;
  flex-direction: column !important;
  border-radius: 28px !important;
  background: var(--surface) !important;
  overflow: hidden !important;
}

.apb-modal .apb-modal-content {
  min-height: 0 !important;
  background: var(--surface) !important;
  overflow: auto !important;
}

.apb-modal .apb-modal-header,
.apb-modal .apb-header-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  border-bottom: 1px solid rgba(17, 24, 39, 0.06) !important;
  text-align: left !important;
  padding-bottom: 20px !important;
}

.apb-modal .apb-modal-header h2,
.apb-modal .apb-upload-header {
  margin: 0 !important;
  color: var(--text-heading) !important;
  font-size: 26px !important;
  font-weight: 650 !important;
  line-height: 1.15 !important;
  letter-spacing: 0 !important;
}

.apb-modal .apb-modal-header p,
.apb-modal .apb-section-modal-subtitle,
.apb-modal .apb-upload-subtitle {
  margin-top: 8px !important;
  color: var(--text-muted) !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  font-weight: 400 !important;
}

.apb-modal .apb-modal-close,
.apb-modal .apb-upload-close {
  flex: 0 0 auto !important;
  width: 40px !important;
  height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid var(--border-soft) !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: var(--text-muted) !important;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.05) !important;
  transition: all 160ms ease !important;
}

.apb-modal .apb-modal-close:hover,
.apb-modal .apb-upload-close:hover {
  border-color: var(--border-brand) !important;
  background: var(--brand-50) !important;
  color: var(--brand-600) !important;
}

.apb-modal .apb-modal-close svg,
.apb-modal .apb-upload-close svg,
.apb-modal .apb-modal-option svg,
.apb-modal .apb-upload-modal svg {
  stroke: currentColor !important;
}

/* Selected-file preview icons (DOCX/PDF/image) are multi-colour FILLED glyphs.
   The blanket `stroke: currentColor` above outlines every path and mangles
   them. Only the empty-state upload glyph (class="lucide") uses stroke, so
   exclude it and clear the forced stroke on the filled file-type icons.
   Both ancestor scopes are listed so this out-specifies each blanket rule
   regardless of whether the modal is portaled outside #application-bot-root. */
.apb-modal .apb-upload-icon svg:not(.lucide),
.apb-modal .apb-upload-icon svg:not(.lucide) *,
#application-bot-root .apb-upload-icon svg:not(.lucide),
#application-bot-root .apb-upload-icon svg:not(.lucide) * {
  stroke: none !important;
}

.apb-modal .apb-modal-options {
  display: grid !important;
  gap: 14px !important;
  padding: 24px 28px 28px !important;
  background: var(--surface) !important;
}

.apb-modal .apb-modal-option {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 16px !important;
  min-height: 86px !important;
  padding: 18px 20px !important;
  border: 1px solid rgba(17, 24, 39, 0.08) !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.05) !important;
  color: var(--text-main) !important;
  text-align: left !important;
  transition: all 160ms ease !important;
}

.apb-modal .apb-modal-option:hover,
.apb-modal .apb-modal-option-insertCV {
  border-color: var(--border-brand) !important;
  background: linear-gradient(135deg, #ffffff 0%, var(--brand-50) 100%) !important;
}

.apb-modal .apb-modal-option:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.08) !important;
}

.apb-modal .apb-option-icon {
  width: 44px !important;
  height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 16px !important;
  background: var(--brand-50) !important;
  color: var(--brand-500) !important;
}

.apb-modal .apb-option-content h3 {
  margin: 0 0 5px !important;
  color: var(--text-heading) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

.apb-modal .apb-option-content p {
  margin: 0 !important;
  color: var(--text-muted) !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}

.apb-modal .apb-option-arrow {
  color: var(--brand-600) !important;
}

.apb-modal .recommendation-badge,
.apb-modal .apb-badge-required {
  border-radius: 999px !important;
  background: linear-gradient(180deg, var(--brand-500), var(--brand-600)) !important;
  color: #ffffff !important;
  box-shadow: var(--shadow-button) !important;
}

.apb-modal .apb-upload-modal,
.apb-modal .apb-modal-body {
  background: var(--surface) !important;
}


.apb-modal .apb-modal-body,
.apb-modal .apb-section-modal,
.apb-modal .apb-templates-grid {
  padding: 24px 28px !important;
}

.apb-modal .apb-upload-container,
.apb-modal .apb-upload-dropzone {
  border-color: rgba(42, 159, 192, 0.32) !important;
  border-radius: 16px 16px 0 0 !important;
  background: var(--brand-50) !important;
}

.apb-modal .apb-upload-dropzone:hover {
  border-color: var(--brand-400) !important;
  background: #f2fbfd !important;
}

.apb-modal .apb-upload-icon,
.apb-modal .apb-upload-loader-circle {
  color: var(--brand-500) !important;
  border-top-color: var(--brand-400) !important;
}

.apb-modal .apb-tab,
.apb-modal .apb-application-type-tabs button {
  min-height: 36px !important;
  padding: 0 14px !important;
  border: 1px solid var(--border-soft) !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: var(--text-muted) !important;
  box-shadow: none !important;
}

.apb-modal .apb-tab-active,
.apb-modal .apb-application-type-tabs button.apb-tab-active {
  border-color: var(--border-brand) !important;
  background: var(--brand-50) !important;
  color: var(--brand-600) !important;
}

.apb-modal .apb-templates-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.apb-modal .apb-template-item {
  border: 1px solid rgba(17, 24, 39, 0.08) !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.05) !important;
  overflow: hidden !important;
}

.apb-modal .apb-template-item:hover,
.apb-modal .apb-template-item.selected {
  border-color: var(--border-brand) !important;
  background: var(--brand-50) !important;
}

.apb-modal .apb-template-check {
  background: var(--brand-500) !important;
  color: #ffffff !important;
  border-color: var(--brand-500) !important;
}

.apb-modal .apb-modal-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 18px 28px 24px !important;
  border-top: 1px solid rgba(17, 24, 39, 0.06) !important;
  background: rgba(248, 250, 252, 0.72) !important;
}

.apb-modal .apb-btn-primary,
.apb-modal .apb-btn-secondary,
.apb-modal .apb-upload-btn-analyze,
.apb-modal .apb-upload-btn-back {
  min-height: 44px !important;
  border-radius: 999px !important;
  padding: 0 20px !important;
  font-weight: 650 !important;
}

.sb-main:has(> #application-bot-root) {
  min-height: 100vh;
  height: 100vh;
  padding: 82px 56px 72px var(--left-safe-area) !important;
  overflow-y: auto !important;
}

.sb-main:has(> #application-bot-root)>#application-bot-root {
  display: block;
  width: 100%;
  max-width: var(--page-max-width);
  min-height: calc(100vh - 154px);
  height: auto !important;
  margin: 0 auto;
  overflow: visible !important;
  position: relative;
}

#application-bot-root .apb-main {
  min-height: calc(100vh - 154px);
  height: auto !important;
  background: transparent !important;
  overflow: visible !important;
}

#application-bot-root .apb-main .apb-header {
  align-items: flex-start !important;
  gap: 32px;
  padding: 0 0 30px !important;
  background: transparent !important;
  margin-top: 10px !important;
}

#application-bot-root .apb-header-left {
  min-width: 0;
  text-align: left;
}

#application-bot-root .apb-breadcrumb {
  display: none !important;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#application-bot-root .apb-breadcrumb-item.active {
  color: var(--brand-600);
}

#application-bot-root .apb-title {
  margin: 0;
  color: var(--text-heading) !important;
  /* Headline style matching jobboard's #saved-jobs-title — Inter (Georgia serif
     dropped per design-guide-v2). Same font-family / weight / line-height / clamp
     range as .saved-jobs-header h1 so all section-level page titles read as one
     family across the app. !important is kept on the size + family so
     each bot's per-page appHeader.css override stays neutralised. */
  font-family: var(--font-body) !important;
  font-size: clamp(42px, 4vw, 58px) !important;
  font-weight: 500 !important;
  line-height: 1.05;
  letter-spacing: 0;
}

#application-bot-root .apb-page-subtitle {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.5;
}

#application-bot-root .apb-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 13px;
}

#application-bot-root .apb-stats-divider {
  display: none;
}

#application-bot-root .apb-stats>span:not(.apb-stats-divider) {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(17, 24, 39, 0.06);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.04);
}

#application-bot-root .apb-stats-dynamic {
  color: var(--text-main);
  font-weight: 750;
}

#application-bot-root .apb-header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 2px;
}

#application-bot-root .apb-filter-bar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  align-items: center;
  gap: 16px;
  margin: 0 0 22px !important;
  padding: 12px !important;
  border: 1px solid rgba(17, 24, 39, 0.06) !important;
  border-radius: 24px !important;
  background: rgba(255, 255, 255, 0.88) !important;
  box-shadow: var(--shadow-card) !important;
}

#application-bot-root .apb-filter-tabs {
  display: flex !important;
  align-items: center;
  justify-content: flex-start !important;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

#application-bot-root .apb-filter-tab-btn {
  flex: 0 0 auto;
  height: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 12px 0 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border: 1px solid var(--border-soft) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  color: var(--text-muted) !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
  cursor: pointer;
  transform: none !important;
}

#application-bot-root .apb-filter-tab-btn:hover {
  border-color: var(--border-brand) !important;
  background: var(--brand-50) !important;
  color: var(--brand-600) !important;
}

#application-bot-root .apb-filter-tab-btn.active,
#application-bot-root .apb-filter-tab-btn[aria-pressed="true"] {
  border-color: var(--border-brand) !important;
  background: var(--brand-50) !important;
  color: var(--brand-600) !important;
}

#application-bot-root .apb-filter-badge {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(42, 159, 192, 0.2) !important;
  border-radius: 999px;
  background: #ffffff !important;
  color: var(--brand-600) !important;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
}

#application-bot-root .apb-filter-badge.muted {
  color: var(--text-muted) !important;
}

#application-bot-root .apb-filter-tab-btn.active .apb-filter-badge,
#application-bot-root .apb-filter-tab-btn[aria-pressed="true"] .apb-filter-badge {
  border-color: var(--brand-400) !important;
  background: var(--brand-400) !important;
  color: #ffffff !important;
}

#application-bot-root .apb-toolbar-search {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-muted);
  box-shadow: none;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  text-align: left;
}

#application-bot-root .apb-toolbar-search:hover,
#application-bot-root .apb-toolbar-search:focus-visible {
  border-color: var(--brand-400);
  background: #ffffff;
  color: var(--brand-600);
  box-shadow: 0 0 0 4px rgba(42, 159, 192, 0.12);
  outline: none;
}

#application-bot-root .apb-toolbar-search svg {
  flex: 0 0 auto;
  width: 16px !important;
  height: 16px !important;
  stroke: currentColor !important;
}

#application-bot-root .apb-content {
  width: 100%;
  flex: 1;
  padding: 0 !important;
}

#application-bot-root .empty-content-area {
  width: 100%;
  min-height: 380px;
  padding: 56px 24px !important;
  display: grid !important;
  place-items: center;
  border: 1px solid rgba(17, 24, 39, 0.06);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-card);
}

#application-bot-root .empty-state {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

#application-bot-root .empty-illustration,
#application-bot-root .empty-state-icon {
  width: 64px !important;
  height: 64px !important;
  margin: 0 auto 20px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  background: var(--brand-50) !important;
  color: var(--brand-500) !important;
}

#application-bot-root .empty-title,
#application-bot-root .empty-state-card h2 {
  margin: 0;
  color: var(--text-heading) !important;
  font-size: 24px !important;
  font-weight: 650 !important;
  line-height: 1.2;
}

#application-bot-root .empty-subtitle,
#application-bot-root .empty-state-card p {
  max-width: 420px;
  margin: 12px auto 0 !important;
  color: var(--text-muted) !important;
  font-size: 15px !important;
  line-height: 1.55;
}

#application-bot-root .empty-cta {
  min-height: 44px !important;
  margin-top: 24px !important;
  padding: 0 20px !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, var(--brand-500), var(--brand-600)) !important;
  color: #ffffff !important;
  box-shadow: var(--shadow-button) !important;
}

#application-bot-root .apb-cards-grid .empty-content-area,
#application-bot-root .apb-content-grid .empty-content-area {
  grid-column: 1 / -1;
}

#application-bot-root .apb-cards-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding: 0 0 20px;
}

#application-bot-root .apb-avatar-teal,
#application-bot-root .apb-editor-skill-bar {
  background: var(--brand-400) !important;
}

#application-bot-root .apb-template-item.selected .apb-template-name,
#application-bot-root .skill-percent,
#application-bot-root .apb-editor-back-btn:hover,
#application-bot-root .apb-editor-header h1:hover {
  color: var(--brand-600) !important;
}

#application-bot-root #cv-title:focus,
#application-bot-root .apb-job-addon-checkbox-row.checked {
  border-color: var(--brand-400) !important;
}

#application-bot-root .save-cv-loader,
#application-bot-root .loader,
#application-bot-root .skeleton-spinner {
  border-top-color: var(--brand-400) !important;
}

#application-bot-root .apb-bottom-nav,
#application-bot-root .apb-mobile-menu,
#application-bot-root .apb-mobile-more-sheet,
#application-bot-root .apb-mobile-more-backdrop,
#application-bot-root .legacy-shell,
#application-bot-root .old-product-menu,
#application-bot-root .skrivsikkert-sidebar {
  display: none !important;
}

.sb-front-page:has(#application-bot-root.apb-editor-mode)>.sb-sidebar,
.sb-front-page:has(#application-bot-root.apb-editor-mode)>.sb-mobile-menu-toggle {
  display: none !important;
}

.sb-front-page:has(#application-bot-root.apb-editor-mode) .sb-main {
  height: 100vh;
  padding: 0 !important;
  background: #f5f5f7;
  overflow: hidden !important;
}

.sb-front-page:has(#application-bot-root.apb-editor-mode) .sb-main::before {
  display: none;
}

.sb-front-page:has(#application-bot-root.apb-editor-mode) .sb-main>#application-bot-root,
.sb-front-page:has(#application-bot-root.apb-editor-mode) #application-bot-root .apb-main {
  max-width: none;
  min-height: 100vh;
  height: 100vh !important;
  overflow: hidden !important;
}

.weekly-workspace {
  padding: 24px;
}

.weekly-page {
  padding-top: 34px;
}

.weekly-workspace .sb-chat-section {
  min-height: 560px;
}

.sb-chat-section {
  --sb-chat-border: var(--border-soft);
  --sb-chat-border-strong: var(--border-brand);
  --sb-chat-surface: #ffffff;
  --sb-chat-surface-muted: var(--surface-soft);
  --sb-chat-text: var(--text-main);
  --sb-chat-text-muted: var(--text-soft);
  --sb-chat-accent: var(--brand-500);
  --sb-chat-accent-hover: var(--brand-600);
}

.sb-chat-section .mwai-body {
  border-color: rgba(17, 24, 39, 0.06) !important;
  border-radius: 22px !important;
  box-shadow: none !important;
}

.sb-chat-section .mwai-input {
  border-top-color: var(--border-soft) !important;
}

.sb-chat-section .mwai-input textarea {
  border-radius: 16px !important;
}

.sb-chat-section .mwai-input .mwai-input-submit,
.sb-chat-section .mwai-input-submit {
  border-radius: 999px !important;
  background: linear-gradient(180deg, var(--brand-500), var(--brand-600)) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 20px rgba(42, 159, 192, 0.2) !important;
}

/* Contact modal styling is owned entirely by assets/css/contact-modal.css.
   The previous .sb-contact-* block here forced the old teal-banner-header
   design onto every page that loads the design system (CV, Application,
   Saved Jobs, Weekly Plan, Trash) and overrode the new flat-modal CSS via
   !important. The frontpage disables this stylesheet, so it never got the
   override and rendered the new design correctly. Removing these rules
   makes every surface use the same canonical contact-modal.css. */

@media (max-width: 1180px) {
  #application-bot-root .apb-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {

  .sb-sidebar-logo-img {
        width: 184px !important;
        max-width: 184px !important;
    }

  .sb-main,
  .sb-main:has(> #application-bot-root) {
    height: auto;
    min-height: 100vh;
    padding: 76px 20px 36px !important;
  }

  .sb-main:has(> #application-bot-root)>#application-bot-root,
  #application-bot-root .apb-main {
    min-height: calc(100vh - 112px);
  }

  .app-page-header,
  #application-bot-root .apb-main .apb-header {
    gap: 22px;
  }

  #application-bot-root .apb-filter-bar {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 767px) {
  /* Present the saved-job drawer as a true bottom sheet on phones:
     pin it to the bottom edge (flex end) so the rounded top corners
     read as intentional, instead of a block-flow card stuck to the
     top with a dead grey gap beneath it. */
  .sj-drawer {
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 0 !important;
    /* Keep the base `position: fixed; inset: 0` (the real fixed viewport). Do
       NOT force a vh/dvh/svh height — those mismatched the visible area and
       produced either a clipped footer or a gap below the sheet. */
  }

  .sj-drawer-panel {
    /* At <=860px this panel is `position:absolute; inset:auto 0 0`, which
       detaches it from the flex flow and left the footer clipped / a gap below
       the sheet. Make it a normal relative flex child bounded by the drawer
       (the fixed viewport) so its bottom always meets the viewport bottom and
       the footer is the bottom-most visible element. */
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    max-height: 96% !important;
    margin: 0 !important;
    border-radius: 22px 22px 0 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  /* Content scrolls; footer is a fixed-height row pinned at the panel bottom. */
  .sj-drawer-content {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }

  .sj-drawer-footer {
    flex: 0 0 auto !important;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .apb-modal {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100vh - 24px) !important;
    border-radius: 24px !important;
  }

  .apb-modal .apb-modal-container {
    border-radius: 24px !important;
  }

  .apb-modal .apb-modal-header,
  .apb-modal .apb-header-wrapper {
    padding: 22px 20px 16px !important;
  }

  .apb-modal .apb-modal-options,
  .apb-modal .apb-modal-body,
  .apb-modal .apb-section-modal,
  .apb-modal .apb-templates-grid {
    padding: 18px 20px !important;
  }

  .apb-modal .apb-modal-option {
    grid-template-columns: 40px minmax(0, 1fr) auto !important;
    gap: 12px !important;
    padding: 16px !important;
  }

  .apb-modal .apb-templates-grid {
    grid-template-columns: 1fr !important;
  }

  .apb-modal .apb-modal-footer {
    padding: 16px 20px 20px !important;
    flex-wrap: wrap !important;
  }

  .app-page-header,
  #application-bot-root .apb-main .apb-header {
    flex-direction: column;
  }

  .app-page-actions,
  #application-bot-root .apb-header-right {
    width: 100%;
    justify-content: flex-start;
  }

  /* Cards grid collapses to a single column on phones. Without this override
     the 1180px rule above keeps the grid at 2 columns, which on a 320–400px
     viewport produces unreadable card content. */
  #application-bot-root .apb-cards-grid {
    grid-template-columns: 1fr;
  }
}
