@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,600;1,6..72,400&display=swap');

:root {
  --bg-main: #0a0c10;
  --bg-sidebar: #0e1117;
  --bg-surface: #141820;
  --bg-surface-hover: #1c222e;
  --bg-surface-active: #242c3b;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-focus: rgba(99, 102, 241, 0.5);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-primary: #4f46e5;
  --accent-primary-hover: #4338ca;
  --accent-glow: rgba(79, 70, 229, 0.15);

  /* Mobile App Variables & Layer System */
  --mobile-nav-height: 58px;
  --mobile-header-height: 52px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);

  --z-base: 0;
  --z-sticky-header: 100;
  --z-tab-nav: 200;
  --z-bottom-nav: 9000;
  --z-drawer: 99998;
  --z-modal: 99999;
  --z-toast: 100000;
}

/* Application dossier: quiet document-first review surface. */
.application-dossier-shell { min-height: min(860px, 92vh); }
.dossier-document-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 15px; border: 1px solid rgba(255,255,255,.07); border-radius: 12px;
  background: #141820;
}
.dossier-tailoring-box {
  display: grid; grid-template-columns: max-content 1fr; align-items: start; gap: 12px;
  padding: 12px 14px; border: 1px solid rgba(99,102,241,.25); border-radius: 12px;
  background: rgba(49,46,129,.16); color: #cbd5e1; font-size: 12px; line-height: 1.55;
}
.dossier-tailoring-box strong { color: #a5b4fc; white-space: nowrap; }
.dossier-pdf-frame-wrap {
  height: min(68vh, 820px); min-height: 560px; overflow: hidden; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.1); background: #30343b;
}
.dossier-cv-preview-stage { display:flex; justify-content:center; align-items:flex-start; min-height:470px; padding:20px; overflow:auto; border:1px solid rgba(255,255,255,.07); border-radius:12px; background:#0a0c10; }
.dossier-pdf-page { display: block; width: 328px; max-width: 40vw; height: auto; margin: 0 auto; background: white; box-shadow: 0 15px 50px rgba(0,0,0,.35); }
.dossier-letter-paper {
  width: min(100%, 820px); margin: 0 auto; padding: clamp(28px, 5vw, 64px);
  border-radius: 5px; background: #fff; color: #1f2937; box-shadow: 0 18px 55px rgba(0,0,0,.28);
  font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.7;
}
.dossier-letter-heading {
  display: flex; flex-direction: column; gap: 3px; margin-bottom: 32px; padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb; color: #4b5563; font-size: 12px;
}
.dossier-letter-heading strong { color: #111827; font-size: 17px; }
@media (max-width: 640px) {
  .dossier-tailoring-box { grid-template-columns: 1fr; gap: 4px; }
  .dossier-pdf-frame-wrap { min-height: 480px; }
  .dossier-letter-paper { padding: 26px 22px; }
}

html {
  font-size: 13px;
  -webkit-text-size-adjust: 100%;
  background-color: var(--bg-main);
  color-scheme: dark;
  height: 100%;
  height: 100dvh;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
}

@media (min-width: 769px) {
  html {
    font-size: 13px;
  }
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-main);
  background-color: var(--bg-main);
  color: var(--text-primary);
  height: 100%;
  height: 100dvh;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#app-layout {
  height: 100%;
  height: 100dvh;
  width: 100%;
  display: flex;
  overflow: hidden;
  position: relative;
}

#command-header {
  height: 64px;
  min-height: 64px;
  padding: 14px 24px;
  box-sizing: border-box;
}

#main-view-container {
  flex: 1 1 0%;
  height: calc(100% - 64px);
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

#view-jobs, #view-map, #view-cvs, #view-cover-letters {
  height: 100%;
  min-height: 100%;
  width: 100%;
}

/* Prevent auto-zoom on iOS when tapping text inputs while keeping selects compact */
input:not([type="button"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
textarea {
  font-size: 16px;
  touch-action: manipulation;
  user-select: text;
  -webkit-user-select: text;
}

@media (min-width: 769px) {
  input:not([type="button"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  textarea {
    font-size: 12px;
  }
}

select {
  font-size: 12px;
  touch-action: manipulation;
}

* {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  box-sizing: border-box;
}

code, kbd, pre, .font-mono {
  font-family: 'JetBrains Mono', monospace !important;
}

.font-serif {
  font-family: 'Newsreader', Georgia, serif !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Borderless Floating Surface Utilities */
.app-surface {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
}

.app-surface-subtle {
  background: rgba(20, 24, 32, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
}

.app-input {
  background: rgba(10, 12, 16, 0.75);
  border: 1px solid var(--border-subtle);
  color: #f8fafc;
  border-radius: 10px;
  transition: all 0.15s ease;
}
.app-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background: rgba(15, 18, 24, 0.95);
}

/* Navigation items */
.nav-item {
  color: var(--text-secondary);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}
.nav-item.active {
  color: #ffffff;
  background: rgba(99, 102, 241, 0.12);
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: #6366f1;
  border-radius: 0 4px 4px 0;
}

/* Stepper & Wizard Pills */
.wizard-step-pill {
  transition: all 0.2s ease;
}
.wizard-step-pill.active {
  background: #4f46e5;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}
.wizard-step-pill.completed {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

/* High-Density Job Row Hover */
.job-row {
  transition: all 0.15s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.job-row:hover {
  background: rgba(255, 255, 255, 0.03);
}
.job-row.selected {
  background: rgba(99, 102, 241, 0.08);
  border-left: 3px solid #6366f1;
}

/* Match Pill Badges */
.match-badge-high {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.match-badge-mid {
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.25);
}
.match-badge-low {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

/* ========================================================================= */
/* RICH JOB DESCRIPTION FORMATTING */
/* ========================================================================= */
.job-rich-description {
  color: #cbd5e1;
  font-size: 0.82rem;
  line-height: 1.65;
}
.job-rich-description p {
  margin-bottom: 0.85rem;
}
.job-rich-description h3, .job-rich-description h4, .job-rich-description .section-heading {
  color: #e2e8f0;
  font-weight: 700;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 1.1rem;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.job-rich-description h3::before, .job-rich-description h4::before, .job-rich-description .section-heading::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 12px;
  background-color: #6366f1;
  border-radius: 2px;
}
.job-rich-description ul {
  list-style: none;
  padding-left: 0;
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
}
.job-rich-description li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.35rem;
  line-height: 1.6;
}
.job-rich-description li::before {
  content: '•';
  position: absolute;
  left: 0.25rem;
  top: 0;
  color: #818cf8;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.3;
}
.job-rich-description strong {
  color: #ffffff;
  font-weight: 600;
}

/* ========================================================================= */
/* CANVA-GRADE A4 CV DESIGN SYSTEM & MULTI-TEMPLATE ENGINE */
/* ========================================================================= */
.cv-document-sheet {
  --cv-accent: #4f46e5;
  --cv-dark: #0f172a;
  --cv-ink: #1e293b;
  --cv-body: #334155;
  --cv-muted: #64748b;
  --cv-light-bg: #f8fafc;
  --cv-border: #e2e8f0;
  background: #ffffff;
  color: var(--cv-body);
  width: 100%;
  max-width: 820px;           /* Authentic A4 proportion */
  min-height: 1160px;
  height: 1160px;         /* fixed A4 ratio: 820 × 1160 */
  max-height: 1160px;
  margin: 0 auto;
  padding: 0;
  border-radius: 12px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  font-size: 11px;
  line-height: 1.55;
  user-select: text;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.cv-document-sheet.font-sans { font-family: 'Plus Jakarta Sans', sans-serif; }
.cv-document-sheet.font-inter { font-family: 'Inter', sans-serif; }
.cv-document-sheet.font-serif { font-family: 'Newsreader', Georgia, serif; }

.cv-studio-sidebar{width:244px;flex:0 0 244px;background:linear-gradient(180deg,#131722 0%,#0d1119 100%);border-left:1px solid rgba(148,163,184,.14);padding:22px 16px;overflow-y:auto;color:#e2e8f0}.cv-tool-eyebrow{font-size:10px;font-weight:800;letter-spacing:.16em;text-transform:uppercase;color:#818cf8}.cv-studio-sidebar h2{margin:7px 0 7px;font-size:16px;font-weight:750;color:#f8fafc}.cv-tool-help{font-size:11px;line-height:1.55;color:#8491a5;margin-bottom:20px}.cv-tool-group{padding:16px 0;border-top:1px solid rgba(148,163,184,.12)}.cv-tool-label{font-size:10px;font-weight:750;letter-spacing:.1em;text-transform:uppercase;color:#718096;margin-bottom:8px}.cv-tool-group>button{width:100%;height:39px;margin:5px 0;padding:0 10px;display:flex;align-items:center;gap:9px;border:1px solid rgba(148,163,184,.13);border-radius:9px;background:rgba(30,37,51,.72);color:#cbd5e1;font-size:11.5px;text-align:left;transition:.16s}.cv-tool-group>button:hover{background:#252c3d;border-color:rgba(129,140,248,.55);color:white;transform:translateY(-1px)}.cv-tool-group>button svg{width:14px;height:14px;color:#8b9cf7}.cv-tool-group>button span{flex:1}.cv-tool-group>button b{font-size:16px;font-weight:400;color:#64748b}.cv-header-options label{display:flex;align-items:center;min-height:31px;cursor:pointer;font-size:11.5px;color:#aeb9ca}.cv-header-options label span{flex:1}.cv-header-options input{position:absolute;opacity:0}.cv-header-options i{position:relative;width:28px;height:16px;border-radius:20px;background:#30394a;transition:.15s}.cv-header-options i:after{content:'';position:absolute;width:12px;height:12px;left:2px;top:2px;border-radius:50%;background:#94a3b8;transition:.15s}.cv-header-options input:checked+i{background:#4f46e5}.cv-header-options input:checked+i:after{left:14px;background:white}.cv-edit-content{width:100%;height:40px;border:1px solid rgba(129,140,248,.45);border-radius:9px;background:rgba(79,70,229,.16);color:#c7d2fe;display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;font-weight:700}.cv-edit-content:hover{background:rgba(79,70,229,.27)}.cv-edit-content svg{width:14px}.cv-save-state{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:13px;font-size:10.5px;color:#718096}.cv-save-state span{width:6px;height:6px;border-radius:50%;background:#34d399;box-shadow:0 0 8px rgba(52,211,153,.55)}
.cv-block-list{display:flex;flex-direction:column;gap:5px}.cv-block-list>button{display:flex;align-items:center;gap:8px;width:100%;padding:7px 8px;border-radius:7px;color:#9daabd;font-size:11px;text-align:left}.cv-block-list>button:hover{background:#202737;color:white}.cv-block-list svg{width:13px;height:13px;color:#7788d8}.cv-block-list span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cv-block-list p{font-size:10.5px;color:#596579}.cv-inline-editor{margin:2px 0 14px;border-radius:11px;background:#171d29;border:1px solid rgba(129,140,248,.3);overflow:hidden}.cv-inline-editor:empty{display:none}.cv-inline-head{display:flex;align-items:center;justify-content:space-between;padding:10px 11px;border-bottom:1px solid rgba(148,163,184,.12);color:#e2e8f0;font-size:11px}.cv-inline-head button{font-size:17px;color:#64748b}.cv-inline-editor>label,.cv-inline-grid label{display:block;padding:7px 10px 0}.cv-inline-editor label>span{display:block;margin-bottom:4px;color:#7f8ba0;font-size:9.5px;font-weight:700;text-transform:uppercase;letter-spacing:.05em}.cv-inline-editor input,.cv-inline-editor textarea{width:100%;padding:7px 8px;border:1px solid #313a4d;border-radius:7px;background:#0f141e;color:#e2e8f0;font-size:11px;line-height:1.4;resize:vertical;outline:none}.cv-inline-editor input:focus,.cv-inline-editor textarea:focus{border-color:#6366f1;box-shadow:0 0 0 2px rgba(99,102,241,.13)}.cv-inline-grid{display:grid;grid-template-columns:1fr 1fr}.cv-remove-block{margin:11px 10px 10px;color:#fb7185;font-size:10.5px}.cv-remove-block:hover{color:#fda4af}
.cv-studio-sidebar{width:310px!important;flex-basis:310px!important;position:relative;z-index:1;scroll-padding-top:16px}.cv-bullet-editor{padding:9px 10px 2px}.cv-bullet-editor>span{display:block;margin-bottom:7px;color:#7f8ba0;font-size:9.5px;font-weight:700;text-transform:uppercase;letter-spacing:.05em}.cv-bullet-row{display:grid;grid-template-columns:12px 1fr 18px;align-items:start;gap:5px;margin-bottom:7px}.cv-bullet-row>i{color:#818cf8;font-size:17px;font-style:normal;line-height:28px}.cv-bullet-row textarea{min-height:48px}.cv-bullet-row>button{color:#64748b;font-size:16px;line-height:28px}.cv-bullet-row>button:hover{color:#fb7185}.cv-add-bullet{padding:4px 0;color:#a5b4fc;font-size:10.5px;font-weight:700}.cv-add-bullet:hover{color:#c7d2fe}
@media(max-width:900px){.cv-studio-workspace{overflow-y:auto;flex-direction:column}.cv-studio-sidebar{order:-1;width:100%!important;flex-basis:auto!important;overflow:visible;padding:14px 16px}.cv-studio-sidebar .cv-tool-help{display:none}.cv-tool-group{display:flex;gap:6px;padding:10px 0;flex-wrap:wrap}.cv-tool-group .cv-tool-label{width:100%}.cv-tool-group>button{width:auto;flex:1;min-width:135px}.cv-header-options{display:flex;flex-wrap:wrap;gap:0 16px}.cv-header-options label{min-width:95px}.cv-edit-content{max-width:200px}.cv-save-state{justify-content:flex-start}.cv-block-list{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.cv-inline-editor{width:100%;max-width:520px}}

/* Micro-Components across all templates */
.cv-pill-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 9.5px;
  font-weight: 600;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  transition: all 0.15s ease;
  line-height: 1.2;
}
.cv-pill-tag.accent {
  background: color-mix(in srgb, var(--cv-accent) 12%, #ffffff);
  color: var(--cv-accent);
  border-color: color-mix(in srgb, var(--cv-accent) 25%, transparent);
}

/* Structured & Clean Skills Taxonomy (No badge boxes) */
.cv-skill-group {
  break-inside: avoid;
  margin-bottom: 22px;
}
.cv-skill-group:last-child {
  margin-bottom: 0;
}
.cv-skill-cat-title {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 5px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.cv-skill-cat-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cv-skill-list {
  display: flex;
  flex-direction: column;
  gap: 6.5px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.cv-skill-item {
  display: flex;
  align-items: center;
  gap: 7.5px;
  font-size: 11px;
  font-weight: 500;
  color: #334155;
  line-height: 1.35;
  padding: 1px 0;
  background: transparent;
  border: none;
}
.cv-skill-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.9;
}

/* Polished Full-Width Education Component */
.cv-edu-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}
.cv-edu-item:last-child {
  margin-bottom: 0;
}
.cv-edu-degree {
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  margin: 0;
}
.cv-edu-school {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  margin-top: 2px;
  width: 100%;
  line-height: 1.35;
}
.cv-edu-date {
  font-size: 9.5px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  padding: 1.5px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 6px;
}

/* Contact Details (Clean Inline Layout) */
.cv-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: #475569;
}
.cv-contact-item a {
  color: inherit;
  text-decoration: none;
}
.cv-contact-item a:hover {
  color: var(--cv-accent);
}
.cv-contact-icon {
  color: var(--cv-accent);
}

.cv-monogram-badge {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--cv-accent), #0f172a);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
}
.cv-avatar-wrap {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.18), 0 0 0 2px rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
  background: #f1f5f9;
}
.cv-avatar-monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--cv-accent) 80%, #ffffff), var(--cv-accent));
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.cv-timeline-track {
  position: relative;
  border-left: 2px solid #e2e8f0;
  padding-left: 18px;
  margin-left: 6px;
}
.cv-timeline-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cv-accent);
  position: absolute;
  left: -24px;
  top: 4px;
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 5px color-mix(in srgb, var(--cv-accent) 25%, transparent);
}
.cv-bullets {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}
.cv-bullets li {
  position: relative;
  padding-left: 14px;
  margin-top: 3.5px;
  color: var(--cv-body);
  font-size: 10.5px;
  line-height: 1.55;
}
.cv-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--cv-accent);
  font-size: 11px;
  font-weight: bold;
}

/* ========================================================================= */
/* TEMPLATE 1: CANVA CREATIVE STUDIO (TWO-TONE EDITORIAL) */
/* ========================================================================= */
.theme-canva-creative {
  display: flex;
  flex-direction: column;
}
.theme-canva-creative .cv-hero-banner {
  background: linear-gradient(135deg, color-mix(in srgb, var(--cv-accent) 85%, #0f172a), #0f172a);
  color: #ffffff;
  padding: 32px 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-shrink: 0;
}
.theme-canva-creative .cv-hero-name {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #ffffff;
  line-height: 1.1;
  margin: 0;
}
.theme-canva-creative .cv-hero-role {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  color: #38bdf8 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}
.theme-canva-creative .cv-hero-contact .cv-contact-item {
  color: #f8fafc !important;
  font-size: 11px;
  background: transparent;
  border: none;
  padding: 0;
  font-weight: 500;
}
.theme-canva-creative .cv-hero-contact .cv-contact-icon {
  color: #38bdf8 !important;
}
.theme-canva-creative .cv-hero-contact .cv-contact-item span,
.theme-canva-creative .cv-hero-contact .cv-contact-item a {
  color: #ffffff !important;
  font-weight: 500;
  text-decoration: none;
}
.theme-canva-creative .cv-hero-contact .cv-contact-item a:hover {
  color: #38bdf8 !important;
}
.theme-canva-creative .cv-two-tone-body {
  display: grid;
  grid-template-columns: 275px 1fr;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}
.theme-canva-creative .cv-left-pane {
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100%;
  min-height: 100%;
}
.theme-canva-creative .cv-right-pane {
  background: #ffffff;
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  height: 100%;
  min-height: 100%;
}
.theme-canva-creative .cv-sec-heading {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cv-accent);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.theme-canva-creative .cv-sec-heading::after {
  content: '';
  flex: 1;
  height: 2px;
  background: color-mix(in srgb, var(--cv-accent) 20%, transparent);
  border-radius: 2px;
}

/* ========================================================================= */
/* TEMPLATE 2: CANVA TECH PRO (DARK SLATE SIDEBAR) */
/* ========================================================================= */
.theme-canva-sidebar {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 1120px;
  height: auto;
  flex: 1;
  align-items: stretch;
}
.theme-canva-sidebar .cv-dark-sidebar {
  background: #0f172a;
  color: #f8fafc;
  padding: 36px 22px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  height: 100%;
  min-height: 100%;
}
.theme-canva-sidebar .cv-sidebar-name {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.theme-canva-sidebar .cv-sidebar-role-badge {
  display: block;
  max-width: 100%;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #38bdf8 !important;
  line-height: 1.35;
  margin-top: 4px;
  background: transparent;
  border: none;
  padding: 0 4px;
  text-align: center;
  text-wrap: balance;
  word-break: normal;
}
.theme-canva-sidebar .cv-sidebar-sec-heading {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 6px;
  margin-bottom: 14px;
}
.theme-canva-sidebar .cv-dark-sidebar .cv-skill-cat-title {
  color: #f8fafc;
  border-bottom-color: rgba(255, 255, 255, 0.12);
}
.theme-canva-sidebar .cv-dark-sidebar .cv-skill-item {
  color: #cbd5e1;
  background: transparent;
  border: none;
}
.theme-canva-sidebar .cv-dark-sidebar .cv-contact-item {
  color: #f8fafc !important;
  font-size: 11px;
  background: transparent;
  border: none;
  font-weight: 500;
}
.theme-canva-sidebar .cv-dark-sidebar .cv-contact-item span,
.theme-canva-sidebar .cv-dark-sidebar .cv-contact-item a {
  color: #ffffff !important;
  font-weight: 500;
  text-decoration: none;
}
.theme-canva-sidebar .cv-dark-sidebar .cv-contact-item a:hover {
  color: #38bdf8 !important;
}
.theme-canva-sidebar .cv-dark-sidebar .cv-contact-icon {
  color: #38bdf8 !important;
}
.theme-canva-sidebar .cv-dark-sidebar .cv-edu-degree {
  color: #ffffff !important;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}
.theme-canva-sidebar .cv-dark-sidebar .cv-edu-school {
  color: #94a3b8 !important;
  font-size: 10.5px;
  margin-top: 2px;
}
.theme-canva-sidebar .cv-dark-sidebar .cv-edu-date {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 600;
  font-family: monospace;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 4px;
}
.theme-canva-sidebar .cv-light-content {
  background: #ffffff;
  padding: 38px 34px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  height: 100%;
  min-height: 100%;
}
.theme-canva-sidebar .cv-light-sec-heading {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.theme-canva-sidebar .cv-light-sec-heading::before {
  content: '';
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: var(--cv-accent);
}

/* ========================================================================= */
/* TEMPLATE 3: CANVA EXECUTIVE HORIZON (HERO BANNER & 2-COLUMN) */
/* ========================================================================= */
.theme-canva-executive {
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  min-height: 1120px;
}
.theme-canva-executive .cv-exec-banner {
  background: linear-gradient(135deg, #070d18 0%, #0f172a 50%, #1e293b 100%);
  color: #ffffff;
  padding: 34px 38px 28px;
  position: relative;
  border-top: 4px solid var(--cv-accent);
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.theme-canva-executive .cv-exec-name {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #ffffff !important;
  line-height: 1.1;
  margin: 0;
}
.theme-canva-executive .cv-exec-role {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #38bdf8 !important;
  margin-top: 2px;
}
.theme-canva-executive .cv-exec-contacts-ribbon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.theme-canva-executive .cv-exec-banner .cv-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #f1f5f9 !important;
  font-weight: 500;
  background: transparent;
  border: none;
  padding: 0;
}
.theme-canva-executive .cv-exec-banner .cv-contact-item span {
  color: #f1f5f9 !important;
}
.theme-canva-executive .cv-exec-banner .cv-contact-item a {
  color: #ffffff !important;
  font-weight: 500;
  text-decoration: none;
}
.theme-canva-executive .cv-exec-banner .cv-contact-item a:hover {
  color: #38bdf8 !important;
}
.theme-canva-executive .cv-exec-banner .cv-contact-icon {
  color: #38bdf8 !important;
}
.theme-canva-executive .cv-exec-body {
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 1fr 275px;
  gap: 24px;
  flex: 1;
  min-height: 0;
}
.theme-canva-executive .cv-exec-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.theme-canva-executive .cv-sec-heading {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cv-accent);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.theme-canva-executive .cv-sec-heading::after {
  content: '';
  flex: 1;
  height: 2px;
  background: color-mix(in srgb, var(--cv-accent) 20%, transparent);
  border-radius: 2px;
}

/* ========================================================================= */
/* SCANNER RADAR & AUTO-APPLY ANIMATIONS */
/* ========================================================================= */
@keyframes radarSweep {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.02); }
}
.radar-sweep-beam {
  animation: radarSweep 3s linear infinite;
  transform-origin: center center;
}
.radar-pulse-ring {
  animation: pulseGlow 2s ease-in-out infinite;
}
.match-metric-bar {
  height: 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.match-metric-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================================================= */
/* TEMPLATE 4: CANVA SWISS MINIMALIST (EDITORIAL MODERN) */
/* ========================================================================= */
.theme-canva-swiss {
  padding: 44px 48px;
  background: #ffffff;
}
.theme-canva-swiss .cv-swiss-header {
  padding-bottom: 20px;
  border-bottom: 3px solid #0f172a;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.theme-canva-swiss .cv-swiss-name {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1;
  margin: 0;
}
.theme-canva-swiss .cv-swiss-role {
  font-size: 12px;
  font-weight: 700;
  color: var(--cv-accent);
  margin-top: 5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.theme-canva-swiss .cv-swiss-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 32px;
}

/* ========================================================================= */
/* TEMPLATE 5: CANVA INFOGRAPHIC GRID (CARD MATRIX) */
/* ========================================================================= */
.theme-canva-infographic {
  padding: 34px 38px;
  background: #f1f5f9;
}
.theme-canva-infographic .cv-info-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 20px 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  margin-bottom: 16px;
}
.theme-canva-infographic .cv-info-header {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  border-top: 4px solid var(--cv-accent);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

/* ========================================================================= */
/* TEMPLATE 6: CANVA CLEAN MODERN (CONTEMPORARY) */
/* ========================================================================= */
.theme-canva-modern {
  padding: 40px 44px;
  background: #ffffff;
  position: relative;
}
.theme-canva-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--cv-accent), #38bdf8);
}
.theme-canva-modern .cv-mod-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 22px;
  border-bottom: 2px solid #f1f5f9;
  margin-bottom: 24px;
}
.theme-canva-modern .cv-mod-name {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.theme-canva-modern .cv-mod-role {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cv-accent);
  margin-top: 3px;
}

/* ========================================================================= */
/* APPLICATION DOSSIER — TAB BAR (Rounded Pill Suite)                         */
/* ========================================================================= */
.dossier-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  color: #94a3b8;
  background: transparent;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer;
}

.dossier-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.dossier-tab.is-active {
  color: #ffffff;
  background: #4f46e5;
  border-color: #6366f1;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.35);
  font-weight: 700;
}

.dossier-tab:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 1px;
}

/* ========================================================================= */
/* CANVA-GRADE COVER LETTER LETTERHEAD SUITE & MULTI-TEMPLATE ENGINE */
/* ========================================================================= */
.letter-document-sheet {
  --letter-accent: #4f46e5;
  --letter-dark: #0f172a;
  --letter-ink: #1e293b;
  --letter-body: #334155;
  --letter-muted: #64748b;
  --letter-border: #e2e8f0;
  background: #ffffff;
  color: var(--letter-body);
  width: 100%;
  max-width: 820px;
  min-height: 1120px;
  margin: 0 auto;
  padding: 0;
  border-radius: 12px;
  box-shadow: 0 30px 80px -15px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  font-size: 11px;
  line-height: 1.65;
  user-select: text;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.letter-document-sheet.font-sans { font-family: 'Plus Jakarta Sans', sans-serif; }
.letter-document-sheet.font-inter { font-family: 'Inter', sans-serif; }
.letter-document-sheet.font-serif { font-family: 'Newsreader', Georgia, serif; }

.letter-body-content {
  color: var(--letter-body);
  font-size: 11.5px;
  line-height: 1.75;
}
.letter-body-content p {
  margin-bottom: 14px;
}
.letter-body-content strong {
  color: var(--letter-ink);
  font-weight: 700;
}
.letter-body-content ul {
  list-style: none;
  padding-left: 0;
  margin: 10px 0 14px;
}
.letter-body-content li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 6px;
  line-height: 1.6;
}
.letter-body-content li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--letter-accent);
  font-weight: bold;
}

.letter-signature-script {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-size: 24px;
  color: var(--letter-dark);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

/* COVER LETTER THEME 1: EXECUTIVE MODERN (HORIZON LETTERHEAD) */
.theme-letter-executive .cl-header-wrap {
  padding: 44px 50px 24px;
  border-bottom: 2px solid color-mix(in srgb, var(--letter-accent) 25%, #e2e8f0);
}
.theme-letter-executive .cl-body-wrap {
  padding: 36px 50px 48px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* COVER LETTER THEME 2: CANVA CREATIVE (GRADIENT HERO BANNER) */
.theme-letter-creative .cl-header-wrap {
  background: linear-gradient(135deg, color-mix(in srgb, var(--letter-accent) 85%, #0f172a), #0f172a);
  color: #ffffff;
  padding: 38px 50px;
}
.theme-letter-creative .cl-body-wrap {
  padding: 38px 50px 48px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* COVER LETTER THEME 3: SWISS MINIMALIST (EDITORIAL) */
.theme-letter-swiss .cl-header-wrap {
  padding: 44px 50px 20px;
  border-bottom: 3.5px solid #0f172a;
}
.theme-letter-swiss .cl-body-wrap {
  padding: 36px 50px 48px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* COVER LETTER THEME 4: CLASSIC CORPORATE (MONOGRAM) */
.theme-letter-corporate .cl-header-wrap {
  padding: 40px 50px 24px;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
}
.theme-letter-corporate .cl-body-wrap {
  padding: 36px 50px 48px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Print Rules for Pixel-Perfect 100% Native PDF Export */
@media print {
  html, body {
    background: white !important;
    color: black !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    height: auto !important;
  }
  aside, header:not(.cv-header), #modal-app-wizard, #modal-onboarding, #modal-cover-letter, #toast-container, .no-print {
    display: none !important;
  }
  main, #main-view-container {
    background: white !important;
    height: auto !important;
    overflow: visible !important;
  }
  #view-cvs, #cv-preview-stage, #view-cover-letters, #letter-preview-stage {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
    background: white !important;
  }
  .cv-document-sheet, .letter-document-sheet {
    box-shadow: none !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    min-height: 0 !important;
    height: 297mm !important;
    transform: scale(.965) !important;
    transform-origin: top center !important;
    border-radius: 0 !important;
    border: none !important;
  }
  .cv-document-sheet, .cv-document-sheet *, .letter-document-sheet, .letter-document-sheet * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  @page {
    size: A4;
    margin: 4mm;
  }
}

/* ========================================================================= */
/* GLOBAL BORDERLESS CLEANUP — separation via tone & space, not lines */
/* ========================================================================= */
body:not(.cv-print) [class*="border-white/"],
body [class*="border-indigo-500/"],
body [class*="border-emerald-500/"],
body [class*="border-amber-500/"],
body [class*="border-rose-500/"],
body [class*="border-slate-7"],
body [class*="border-slate-8"] { border-color: transparent !important; }
.job-row { border-bottom-color: transparent !important; border-radius: 10px; }
.job-row.selected { border-left-color: transparent !important; background: rgba(99, 102, 241, 0.12); }
.app-surface, .app-surface-subtle { border-color: transparent !important; }
.app-input { border-color: transparent !important; background: rgba(255, 255, 255, 0.045); }
.app-input:hover { background: rgba(255, 255, 255, 0.065); }
.app-input:focus { background: rgba(255, 255, 255, 0.07); box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.45); }
.match-badge-high, .match-badge-mid, .match-badge-low { border-color: transparent !important; }
.nav-item.active::before { display: none; }
[class*="shadow-indigo-600/"] { --tw-shadow-color: transparent !important; box-shadow: none !important; }
/* ========================================================================= */
/* ANIMATED SETUP UI & MICRO-INTERACTIONS */
/* ========================================================================= */
@keyframes fadeInSlideUp {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.25), inset 0 0 15px rgba(99, 102, 241, 0.1);
  }
  50% {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.5), inset 0 0 25px rgba(99, 102, 241, 0.2);
  }
}

@keyframes bounceSubtle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.onboarding-step-pane {
  animation: fadeInSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.extracted-success-card {
  animation: fadeInSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards, pulseGlow 3s infinite;
}

.stat-counter-pop {
  animation: bounceSubtle 1.5s ease infinite;
}

.chip-role-btn {
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.chip-role-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}
.chip-role-btn:active {
  transform: scale(0.96);
}


/* Toast Animations */
@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.toast-entry {
  animation: slideInUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ========================================================================= */
/* SHARED PRIMITIVES */
/* ========================================================================= */
.brand-mark { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; background: linear-gradient(135deg, #6366f1, #4338ca); }
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; background: #5b5bf0; color: #fff; font-size: 12.5px; font-weight: 600; transition: background .15s, transform .1s, opacity .15s; }
.btn-primary:hover:not(:disabled) { background: #6c6cf5; }
.btn-primary:active:not(:disabled) { transform: scale(.985); }
.btn-primary:disabled { opacity: .7; cursor: progress; }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: rgba(255,255,255,.05); color: #cbd5e1; font-size: 12.5px; font-weight: 500; transition: background .15s; }
.btn-ghost:hover { background: rgba(255,255,255,.09); color: #fff; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 11.5px; font-weight: 500; color: #94a3b8; }
.field-input { height: 42px; padding: 0 14px; font-size: 13px; width: 100%; }
select.field-input { padding-right: 8px; }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,.06); color: #cbd5e1; font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.chip-accent { background: rgba(99,102,241,.16); color: #c7d2fe; }
.chip-muted { color: #64748b; }
.chip-btn { cursor: pointer; transition: background .15s, color .15s; }
.chip-btn:hover { background: rgba(99,102,241,.18); color: #e0e7ff; }
.chip-pop { animation: chipPop .35s cubic-bezier(.16,1,.3,1) both; background: rgba(16,185,129,.14); color: #6ee7b7; }
@keyframes chipPop { from { opacity: 0; transform: translateY(4px) scale(.9); } to { opacity: 1; transform: none; } }

/* Strict Global Hidden Rule */
.hidden, [hidden] {
  display: none !important;
}

#auth-layout.hidden, #auth-layout[style*="display: none"] {
  display: none !important;
}
#app-layout.hidden, #app-layout[style*="display: none"] {
  display: none !important;
}

/* ========================================================================= */
/* AUTH */
/* ========================================================================= */
.auth-shell {
  background: #08090c !important;
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
}
.auth-grid { display: grid; grid-template-columns: 1fr; height: 100%; width: 100%; }
@media (min-width: 1024px) { .auth-grid { grid-template-columns: minmax(420px, 46%) 1fr; } }
.auth-brand { display: none; position: relative; overflow: hidden; padding: 40px 48px; flex-direction: column; justify-content: space-between; background: #0d0f15; height: 100%; }
@media (min-width: 1024px) {
  #auth-layout:not(.hidden) .auth-brand { display: flex !important; }
}
.auth-brand-glow { position: absolute; inset: -20%; background: radial-gradient(40% 35% at 30% 70%, rgba(99,102,241,.28), transparent 70%), radial-gradient(30% 30% at 80% 20%, rgba(56,189,248,.12), transparent 70%); filter: blur(10px); animation: glowDrift 14s ease-in-out infinite alternate; }
@keyframes glowDrift { to { transform: translate3d(4%, -3%, 0) scale(1.05); } }
.auth-tick { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(99,102,241,.14); color: #a5b4fc; }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 32px 24px; overflow-y: auto; height: 100%; }
.auth-card-in { animation: fadeInSlideUp .5s cubic-bezier(.16,1,.3,1) both; width: 100%; }
.seg-control { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 12px; background: rgba(255,255,255,.04); }
.seg-pill { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 9px; background: rgba(255,255,255,.09); transition: transform .3s cubic-bezier(.16,1,.3,1); }
.seg-btn { position: relative; z-index: 1; height: 32px; font-size: 12px; font-weight: 500; color: #64748b; transition: color .2s; }
.seg-btn.is-active { color: #fff; }
.auth-error { font-size: 12px; color: #fda4af; background: rgba(244,63,94,.1); padding: 10px 12px; border-radius: 10px; animation: fadeInSlideUp .25s ease both; }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 4px; }
.pw-meter span { height: 3px; border-radius: 2px; background: rgba(255,255,255,.07); transition: background .25s; }
.pw-meter[data-score="1"] span:nth-child(-n+1) { background: #f43f5e; }
.pw-meter[data-score="2"] span:nth-child(-n+2) { background: #f59e0b; }
.pw-meter[data-score="3"] span:nth-child(-n+3) { background: #84cc16; }
.pw-meter[data-score="4"] span { background: #10b981; }

/* ========================================================================= */
/* ONBOARDING / CV ANALYZER */
/* ========================================================================= */
.ob-shell {
  background: rgba(5,6,9,.94) !important;
  backdrop-filter: blur(20px) !important;
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
}
.ob-shell.hidden, #modal-onboarding.hidden, [id="modal-onboarding"].hidden { display: none !important; }
.ob-shell:not(.hidden) { display: flex !important; align-items: center; justify-content: center; padding: 16px; }
.ob-frame { width: 100%; max-width: 720px; max-height: 92vh; display: flex; flex-direction: column; background: #0e1016; border-radius: 20px; box-shadow: 0 40px 120px -20px rgba(0,0,0,.8); overflow: hidden; animation: fadeInSlideUp .45s cubic-bezier(.16,1,.3,1) both; }
.ob-pane { animation: fadeInSlideUp .4s cubic-bezier(.16,1,.3,1) both; }
.ob-label { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #64748b; margin-bottom: 10px; }
.ob-steps { display: none; align-items: center; gap: 8px; }
@media (min-width: 640px) { .ob-steps { display: flex; } }
.ob-step { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #475569; font-weight: 500; transition: color .3s; }
.ob-step b { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; background: rgba(255,255,255,.05); transition: all .3s; }
.ob-step.is-active { color: #e2e8f0; }
.ob-step.is-active b { background: #5b5bf0; color: #fff; box-shadow: 0 0 0 4px rgba(91,91,240,.18); }
.ob-step.is-done { color: #94a3b8; }
.ob-step.is-done b { background: rgba(16,185,129,.18); color: #34d399; }
.ob-step-line { width: 18px; height: 1px; background: rgba(255,255,255,.08); }

.ob-drop { cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 56px 24px; border-radius: 16px; background: rgba(255,255,255,.025); outline: none; position: relative; transition: background .2s, box-shadow .2s, transform .2s; background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='16' ry='16' stroke='%23334155' stroke-width='1.5' stroke-dasharray='6%2c 8' stroke-linecap='round'/%3e%3c/svg%3e"); }
.ob-drop:hover, .ob-drop:focus-visible { background-color: rgba(99,102,241,.06); }
.ob-drop.is-drag { background-color: rgba(99,102,241,.12); transform: scale(1.01); box-shadow: 0 0 0 2px rgba(99,102,241,.5); }
.ob-drop-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: #a5b4fc; background: rgba(99,102,241,.12); transition: transform .25s cubic-bezier(.16,1,.3,1); }
.ob-drop:hover .ob-drop-icon, .ob-drop.is-drag .ob-drop-icon { transform: translateY(-4px); }
.ob-feature { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.025); font-size: 11.5px; color: #94a3b8; }
.ob-feature i, .ob-feature svg { color: #818cf8; flex-shrink: 0; }

/* Scanning */
.ob-scan-layout { display: flex; gap: 36px; align-items: center; padding: 12px 0; }
@media (max-width: 640px) { .ob-scan-layout { flex-direction: column; } }
.scan-doc-wrap { width: 190px; flex-shrink: 0; }
.scan-doc { position: relative; overflow: hidden; height: 250px; padding: 18px 16px; border-radius: 10px; background: #f8fafc; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 24px 50px -16px rgba(0,0,0,.7); animation: docFloat 3s ease-in-out infinite; }
@keyframes docFloat { 50% { transform: translateY(-4px); } }
.sd-head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.sd-avatar { width: 26px; height: 26px; border-radius: 50%; background: #e2e8f0; flex-shrink: 0; }
.sd-line { display: block; height: 5px; border-radius: 3px; background: #e2e8f0; position: relative; overflow: hidden; }
.sd-line::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(99,102,241,.35), transparent); transform: translateX(-100%); animation: shimmer 1.8s ease-in-out infinite; }
.sd-accent { background: #c7d2fe; }
.sd-gap { height: 6px; }
.sd-chip { display: block; width: 22px; height: 9px; border-radius: 5px; background: #e0e7ff; }
@keyframes shimmer { to { transform: translateX(100%); } }
.scan-beam { position: absolute; left: 0; right: 0; height: 60px; top: -60px; background: linear-gradient(180deg, transparent, rgba(99,102,241,.18) 70%, rgba(99,102,241,.55)); border-bottom: 2px solid #6366f1; box-shadow: 0 6px 18px rgba(99,102,241,.55); animation: beam 2.1s cubic-bezier(.45,0,.55,1) infinite; }
@keyframes beam { 0% { top: -60px; } 100% { top: 100%; } }
.scan-bar { height: 4px; border-radius: 4px; background: rgba(255,255,255,.06); overflow: hidden; }
.scan-bar span { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #6366f1, #22d3ee); transition: width .25s ease-out; }
.scan-step { display: flex; align-items: center; gap: 10px; height: 30px; font-size: 12.5px; color: #475569; transition: color .3s; }
.scan-step-icon { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.04); flex-shrink: 0; transition: background .3s; }
.scan-step-icon .dot { width: 5px; height: 5px; border-radius: 50%; background: #334155; transition: all .3s; }
.scan-step.is-active { color: #e2e8f0; }
.scan-step.is-active .scan-step-icon { background: transparent; border: 2px solid rgba(99,102,241,.25); border-top-color: #818cf8; animation: spin .8s linear infinite; }
.scan-step.is-active .dot { display: none; }
.scan-step.is-done { color: #94a3b8; }
.scan-step.is-done .scan-step-icon { background: rgba(16,185,129,.16); }
.scan-step.is-done .dot { width: 8px; height: 5px; border-radius: 0; background: none; border-left: 2px solid #34d399; border-bottom: 2px solid #34d399; transform: rotate(-45deg) translate(1px, -1px); }
.scan-step.is-error { color: #fda4af; }
.scan-step.is-error .scan-step-icon { background: rgba(244,63,94,.18); }
.scan-step.is-error .dot { background: #f43f5e; }

/* Result */
.ob-success-badge { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #34d399; background: rgba(16,185,129,.14); animation: badgePop .5s cubic-bezier(.34,1.56,.64,1) both; flex-shrink: 0; }
@keyframes badgePop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.ob-stat { padding: 14px 16px; border-radius: 12px; background: rgba(255,255,255,.03); display: flex; flex-direction: column; gap: 2px; }
.ob-stat strong { font-size: 22px; font-weight: 600; color: #fff; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ob-stat span { font-size: 11px; color: #64748b; }
.ob-exp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 10px; background: rgba(255,255,255,.025); }
.ob-role-row { display: flex; gap: 8px; align-items: center; animation: fadeInSlideUp .25s ease both; }
.ob-role-del { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: #64748b; flex-shrink: 0; transition: all .15s; }
.ob-role-del:hover { color: #fda4af; background: rgba(244,63,94,.1); }
@media (prefers-reduced-motion: reduce) { .scan-beam, .sd-line::after, .scan-doc, .auth-brand-glow { animation: none !important; } }

/* ========================================================================= */
/* AUTOPILOT WORKING RADAR & TELEMETRY STREAM */
/* ========================================================================= */
.radar-hub-circle {
  position: relative;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, rgba(10, 12, 16, 0.95) 75%);
  box-shadow: 0 0 40px -10px rgba(99, 102, 241, 0.3), inset 0 0 30px rgba(99, 102, 241, 0.15);
  overflow: hidden;
}
.radar-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px dashed rgba(99, 102, 241, 0.2);
  pointer-events: none;
}
.radar-ring-1 { width: 70px; height: 70px; }
.radar-ring-2 { width: 140px; height: 140px; }
.radar-ring-3 { width: 210px; height: 210px; }

.radar-crosshair-h {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.2), transparent);
}
.radar-crosshair-v {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(99, 102, 241, 0.2), transparent);
}

.radar-beam {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(99, 102, 241, 0.55) 0deg, rgba(34, 211, 238, 0.15) 45deg, transparent 90deg, transparent 360deg);
  animation: radarRotate 4s linear infinite;
  transform-origin: center center;
}
@keyframes radarRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.radar-blip {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 10px #22d3ee, 0 0 20px #6366f1;
  animation: blipGlow 2s ease-in-out infinite;
}
@keyframes blipGlow {
  0%, 100% { transform: scale(0.8); opacity: 0.4; }
  50% { transform: scale(1.3); opacity: 1; }
}

.telemetry-feed {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  line-height: 1.6;
}
.telemetry-feed::-webkit-scrollbar {
  width: 5px;
}
.telemetry-feed::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.telemetry-feed::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* AI Briefing Markdown Elements */
.ai-briefing-content h3 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #818cf8;
  margin-top: 14px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-briefing-content h3:first-child {
  margin-top: 0;
}
.ai-briefing-content p {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 10px;
}
.ai-briefing-content ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ai-briefing-content li {
  position: relative;
  padding-left: 14px;
  font-size: 12px;
  color: #e2e8f0;
  line-height: 1.5;
}
.ai-briefing-content li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: #6366f1;
  font-weight: bold;
}
.ai-briefing-content table {
  width: 100%;
  font-size: 11.5px;
  border-collapse: collapse;
  margin-bottom: 12px;
}
.ai-briefing-content th, .ai-briefing-content td {
  padding: 5px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}
.ai-briefing-content strong {
  color: #ffffff;
  font-weight: 600;
}

/* Leaflet Dark Mode Map Customization */
.leaflet-container {
  background-color: #08090d !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.leaflet-popup-content-wrapper {
  background: rgba(14, 17, 23, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.7), 0 8px 10px -6px rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(12px) !important;
  color: #f1f5f9 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.4 !important;
  font-size: 12px !important;
}

.leaflet-popup-tip {
  background: #0e1117 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* Custom Marker Pins */
.custom-radar-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.custom-radar-pin:hover {
  transform: scale(1.25);
  z-index: 9999 !important;
}

.pin-user-home {
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  background: #06b6d4;
  border: 3px solid #ffffff;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.8), 0 0 30px rgba(6, 182, 212, 0.4);
  animation: pulse-ring 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.7); }
  70% { box-shadow: 0 0 0 12px rgba(6, 182, 212, 0); }
  100% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); }
}

.pin-job-applied {
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  background: #10b981;
  border: 2.5px solid #ffffff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

.pin-job-high {
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  background: #6366f1;
  border: 2.5px solid #ffffff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
}

.pin-job-mid {
  width: 14px;
  height: 14px;
  border-radius: 9999px;
  background: #f59e0b;
  border: 2px solid #ffffff;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

/* ========================================================================= */
/* SLEEK APP-LIKE ACCORDION & DRAWER ANIMATIONS */
/* ========================================================================= */
.drawer-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}

.drawer-content.expanded {
  max-height: 4000px;
  opacity: 1;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeInSlide {
  animation: fadeInSlide 0.25s ease-out forwards;
}

.salary-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.salary-pill-competitive {
  background: rgba(148, 163, 184, 0.08);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.flush-card {
  background: transparent;
  border: none;
  padding: 0;
}

.employer-intel-card {
  background: rgba(255, 255, 255, 0.02);
  border: none;
  border-radius: 12px;
  transition: all 0.2s ease;
}

/* =========================================================================
   MODAL Z-INDEX ELEVATION (MUST SIT ABOVE LEAFLET MAP & RADAR OVERLAYS)
   ========================================================================= */
#modal-live-browser,
#modal-portal-credentials,
#modal-application-dossier,
#modal-app-wizard,
#modal-profile-wizard,
#modal-settings,
#modal-role,
#modal-cover-letter,
#modal-onboarding,
#auth-layout {
  z-index: 99999 !important;
}

#toast-container {
  z-index: 100000 !important;
}

/* Portal Wizard Grid & Interactive Cards */
.portal-wizard-card {
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.portal-wizard-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 20px rgba(99, 102, 241, 0.15);
}
.portal-wizard-card.is-active {
  border-color: #6366f1 !important;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.18) 0%, rgba(20, 24, 33, 0.95) 100%) !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5), 0 12px 32px rgba(0, 0, 0, 0.8) !important;
}

/* =========================================================================
   MOBILE / DESKTOP RESPONSIVE DISPLAY UTILITIES & DOCK
   ========================================================================= */

/* Default (Desktop >= 769px): Completely Hide Mobile Elements */
.mobile-only,
.mobile-bottom-fade-scrim,
.mobile-bottom-dock-wrapper,
.mobile-bottom-dock,
.mobile-bottom-sheet-backdrop {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.desktop-only {
  display: flex !important;
}

/* Mobile Screens (<= 768px): Enable Mobile Glass Dock & Bottom Sheets */
@media (max-width: 768px) {
  .mobile-only {
    display: flex !important;
    pointer-events: auto !important;
    visibility: visible !important;
  }

  .desktop-only {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }

  /* Floating Bottom Scrim & Elevated Obsidian Glass Pill Dock */
  .mobile-bottom-fade-scrim {
    display: block !important;
    visibility: visible !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: calc(85px + env(safe-area-inset-bottom, 0px)) !important;
    pointer-events: none !important;
    z-index: 8990 !important;
    background: linear-gradient(to top, rgba(9, 9, 11, 0.96) 0%, rgba(9, 9, 11, 0.75) 40%, rgba(9, 9, 11, 0.25) 75%, transparent 100%) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    mask-image: linear-gradient(to top, black 0%, black 45%, transparent 100%) !important;
    -webkit-mask-image: linear-gradient(to top, black 0%, black 45%, transparent 100%) !important;
  }

  .mobile-bottom-dock-wrapper {
    display: flex !important;
    visibility: visible !important;
    position: fixed !important;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    left: 12px !important;
    right: 12px !important;
    max-width: 310px !important;
    margin: 0 auto !important;
    width: calc(100% - 24px) !important;
    padding: 0 !important;
    z-index: 9000 !important;
    pointer-events: none !important;
    justify-content: center !important;
    align-items: center !important;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  .mobile-bottom-dock {
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 3px !important;
    width: 100% !important;
    height: 44px !important;
    background: rgba(16, 16, 20, 0.92) !important;
    backdrop-filter: blur(30px) saturate(210%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(210%) !important;
    border: 1px solid rgba(255, 255, 255, 0.13) !important;
    border-radius: 22px !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8), 0 0 1px rgba(255, 255, 255, 0.18), inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
    padding: 3px 5px !important;
    box-sizing: border-box !important;
  }

  .mobile-nav-pill {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 2px !important;
    border: none !important;
    background: transparent !important;
    padding: 0 1px !important;
  }

  .mobile-nav-tab-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    height: 34px !important;
    min-width: 34px !important;
    padding: 0 8px !important;
    border-radius: 17px !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    color: #94a3b8 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
    flex: 1 1 0px !important;
    outline: none !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .mobile-nav-tab-btn:active {
    transform: scale(0.94) !important;
  }

  .mobile-nav-tab-btn.is-active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.32) 0%, rgba(139, 92, 246, 0.2) 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(129, 140, 248, 0.5) !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    flex: 0 0 auto !important;
    padding: 0 11px 0 9px !important;
  }

  .mobile-nav-tab-btn i,
  .mobile-nav-tab-btn svg {
    width: 15px !important;
    height: 15px !important;
  }

  .mobile-nav-tab-btn.is-active i,
  .mobile-nav-tab-btn.is-active svg {
    color: #a5b4fc !important;
    filter: drop-shadow(0 0 6px rgba(165, 180, 252, 0.6)) !important;
  }

  .mobile-nav-tab-btn.is-active span {
    display: inline-block !important;
  }

  .mobile-nav-tab-btn span {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: -0.2px !important;
    line-height: 1 !important;
    color: #ffffff !important;
    white-space: nowrap !important;
  }

  .mobile-fab-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 18px !important;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45), 0 0 10px rgba(168, 85, 247, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.6) !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
  }
  .mobile-fab-btn:active {
    transform: scale(0.9) !important;
  }
  .mobile-fab-btn i,
  .mobile-fab-btn svg {
    width: 16px !important;
    height: 16px !important;
    color: #ffffff !important;
    stroke-width: 2.8 !important;
  }

  /* Slide-Up Bottom Sheet Drawers */
  .mobile-bottom-sheet-backdrop {
    display: flex !important;
    visibility: visible !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    z-index: 99998 !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    animation: fadeIn 0.18s ease !important;
  }

  .mobile-bottom-sheet-backdrop.hidden,
  .mobile-bottom-sheet-backdrop[style*="display: none"],
  .mobile-bottom-sheet-backdrop[hidden] {
    display: none !important;
    pointer-events: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }

  .mobile-bottom-sheet {
    background: #0d1017 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: none !important;
    border-radius: 24px 24px 0 0 !important;
    padding: 16px 20px calc(24px + env(safe-area-inset-bottom, 16px)) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    max-height: 88dvh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.9) !important;
    animation: slideUpSheet 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  }
}

@keyframes slideUpSheet {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sheet-handle {
  width: 38px !important;
  height: 4px !important;
  background: rgba(255, 255, 255, 0.25) !important;
  border-radius: 2px !important;
  margin: 0 auto 6px !important;
  flex-shrink: 0 !important;
}

/* Segmented pill control */
.segmented-control {
  display: flex !important;
  background: rgba(14, 17, 23, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  padding: 3px !important;
  gap: 2px !important;
  width: 100% !important;
}
.segmented-control-btn {
  flex: 1 !important;
  padding: 7px 10px !important;
  border-radius: 8px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  text-align: center !important;
  background: transparent !important;
  color: #94a3b8 !important;
  border: none !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.15s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
}
.segmented-control-btn.active {
  background: rgba(99, 102, 241, 0.25) !important;
  color: #ffffff !important;
  border: 1px solid rgba(99, 102, 241, 0.4) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

/* Map Proximity Radius Switcher Buttons (Universal) */
.map-radius-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 3px 8px !important;
  height: 24px !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  border: 1px solid transparent !important;
  color: #94a3b8 !important;
  background: transparent !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
  user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

.map-radius-btn:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.map-radius-btn.active {
  color: #67e8f9 !important;
  background: rgba(6, 182, 212, 0.18) !important;
  border-color: rgba(6, 182, 212, 0.35) !important;
  font-weight: 700 !important;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2) !important;
}

/* CV & Cover Letter Active Select Dropdowns (Universal) */
#cv-active-select,
#cl-active-select {
  font-size: 11.5px !important;
  font-weight: 600 !important;
  height: 28px !important;
  padding: 2px 8px !important;
  border-radius: 8px !important;
  max-width: 220px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  background-color: rgba(14, 17, 23, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f1f5f9 !important;
}

/* Document Scaler on Mobile */
.cv-preview-mobile-wrapper,
.cl-preview-mobile-wrapper {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
  overflow-x: hidden !important;
  position: relative !important;
}

@media (max-width: 768px) {
  html, body {
    font-size: 13px;
    zoom: 1 !important;
    height: 100% !important;
    height: 100dvh !important;
  }

  .mobile-only {
    display: flex !important;
  }
  .desktop-only {
    display: none !important;
  }

  /* Responsive App Shell & Safe Padding — Matching Socials Topbar */
  #command-header {
    height: auto !important;
    min-height: calc(76px + env(safe-area-inset-top, 0px)) !important;
    padding-top: max(calc(env(safe-area-inset-top, 0px) + 24px), 52px) !important;
    padding-bottom: 14px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    background: #09090b !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-sizing: border-box !important;
  }

  #main-view-container {
    flex: 1 1 0% !important;
    height: 100% !important;
    min-height: 0 !important;
    width: 100% !important;
    overflow: hidden !important;
    position: relative !important;
    padding-bottom: 0 !important;
  }

  /* Portal Login Gate bottom scroll padding on mobile */
  #portal-login-gate {
    padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 40px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Map View Full Mobile Screen */
  #view-map {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    padding-bottom: 0 !important;
  }

  #view-map .map-desktop-feed {
    display: none !important;
  }

  #proximity-leaflet-map {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1 !important;
  }

  /* Floating Map Top Control Bar */
  .map-floating-top-hud {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    right: 10px !important;
    max-width: calc(100% - 20px) !important;
    z-index: 400 !important;
    pointer-events: none;
  }
  .map-floating-top-hud > * {
    pointer-events: auto;
  }
  .map-floating-top-hud > div {
    padding: 3px 6px !important;
    border-radius: 12px !important;
    gap: 4px !important;
  }

  .map-radius-btn {
    padding: 2px 5px !important;
    height: 22px !important;
    font-size: 9.5px !important;
    border-radius: 5px !important;
  }

  #map-role-select-mobile {
    font-size: 10px !important;
    height: 22px !important;
    padding: 1px 4px !important;
    max-width: 90px !important;
    border-radius: 6px !important;
  }

  /* Compact CV & Cover Letter Mobile Toolbar Controls */
  #cv-active-select,
  #cl-active-select {
    max-width: 150px !important;
    font-size: 10px !important;
    height: 25px !important;
    padding: 1px 5px !important;
  }

  #cv-theme-select,
  #cl-theme-select,
  #cv-font-select,
  #cl-font-select {
    font-size: 9.5px !important;
    height: 25px !important;
    padding: 1px 4px !important;
  }

  /* Floating Map Bottom Nearby Openings Button */
  .map-floating-bottom-hud {
    position: absolute !important;
    bottom: calc(var(--mobile-nav-height) + var(--safe-bottom) + 20px) !important;
    left: 14px !important;
    right: 14px !important;
    z-index: 500 !important;
    pointer-events: none;
    display: flex;
    justify-content: center;
  }
  .map-floating-bottom-hud > * {
    pointer-events: auto;
  }

  /* Compact Map Legend HUD on Mobile */
  .map-mobile-legend {
    position: absolute !important;
    top: 68px !important;
    right: 12px !important;
    z-index: 450 !important;
    padding: 6px 10px !important;
    font-size: 10px !important;
    background: rgba(14, 17, 23, 0.88) !important;
    backdrop-filter: blur(12px) !important;
    border-radius: 10px !important;
  }

  /* Master-Detail Job Queue View on Mobile */
  #job-subview-console {
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
  }

  #jobs-master-pane {
    width: 100% !important;
    height: 100% !important;
    border-right: none !important;
    padding-bottom: calc(var(--mobile-nav-height) + var(--safe-bottom) + 40px) !important;
  }

  #jobs-inspector-pane {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 9500 !important;
    background: #0a0c10 !important;
    display: flex !important;
    flex-direction: column !important;
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  #jobs-inspector-pane.mobile-inspector-open {
    transform: translateX(0) !important;
  }

  /* Kanban Pipeline on Mobile */
  #job-subview-kanban .kanban-columns-container {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: calc(var(--mobile-nav-height) + var(--safe-bottom) + 40px) !important;
    gap: 12px !important;
  }

  #job-subview-kanban .kanban-column {
    min-width: 82vw !important;
    scroll-snap-align: center !important;
  }

  /* Autopilot Radar on Mobile */
  #job-subview-radar {
    flex-direction: column !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: calc(var(--mobile-nav-height) + var(--safe-bottom) + 40px) !important;
  }

  #job-subview-radar .radar-left-pane,
  #job-subview-radar .radar-right-pane {
    width: 100% !important;
    border-right: none !important;
  }

  /* CV & Cover Letter Studio A4 Scaling on Mobile */
  #cv-preview-stage,
  #cl-preview-stage,
  #letter-preview-stage {
    padding: 14px 8px calc(var(--mobile-nav-height) + var(--safe-bottom) + 45px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .cv-document-sheet,
  .letter-document-sheet {
    width: 820px !important;
    min-width: 820px !important;
    max-width: 820px !important;
    transform: scale(var(--doc-scale, 0.44)) !important;
    transform-origin: top center !important;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.8) !important;
    border-radius: 12px !important;
    margin: 0 auto !important;
    flex-shrink: 0 !important;
  }

  /* Sidebar Drawer on Mobile — Full height sliding panel */
  #app-sidebar {
    width: 100% !important;
    max-width: 320px !important;
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    height: 100% !important;
    height: 100dvh !important;
    padding-top: max(calc(env(safe-area-inset-top, 0px) + 24px), 52px) !important;
    padding-bottom: max(calc(env(safe-area-inset-bottom, 0px) + 20px), 32px) !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-shadow: 20px 0 80px rgba(0, 0, 0, 0.95) !important;
    z-index: 99999 !important;
    background: #09090b !important;
  }
  #sidebar-backdrop {
    z-index: 99998 !important;
  }

  /* Modals take full screen with comfortable touch padding & sticky actions */
  [id^="modal-"],
  .ob-shell,
  .auth-shell {
    padding: 0 !important;
  }

  [id^="modal-"] > div,
  .ob-shell > div,
  .auth-shell > div {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    margin: 0 !important;
    border: none !important;
    display: flex !important;
    flex-direction: column !important;
    background: #0d1017 !important;
    overflow: hidden !important;
  }

  /* Sticky modal top headers across all modals (pushed safely below iPhone notch / status bar) */
  [id^="modal-"] > div > div:first-child,
  .modal-sticky-header,
  .ob-shell .ob-header {
    padding-top: max(calc(env(safe-area-inset-top, 0px) + 28px), 52px) !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
    padding-bottom: 14px !important;
    flex-shrink: 0 !important;
  }

  /* Modal scrollable middle body */
  [id^="modal-"] > div > div:nth-child(2) {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Sticky modal bottom action footers */
  [id^="modal-"] > div > div:last-child,
  .modal-sticky-footer,
  .ob-shell .ob-footer {
    padding-bottom: max(calc(env(safe-area-inset-bottom, 0px) + 16px), 28px) !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
    flex-shrink: 0 !important;
  }

  /* Canvas responsive scaling */
  #live-browser-canvas {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    touch-action: none;
  }
}

