/* ══════════════════════════════════════════════════════
   ats-pro.css
   · Fora do #cv  → visual temtudinho (dark, DM Mono, accent azul)
   · Dentro do #cv → ATS puro: coluna única, branco, zero decoração
   ══════════════════════════════════════════════════════ */

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

@page {
  size: A4;
  margin: 0;
}

:root {
  /* Site temtudinho */
  --tt-ink: #0d0f14;
  --tt-accent: #2a6dd9;
  --tt-border: rgba(240, 243, 248, 0.1);
  --tt-card-bg: rgba(240, 243, 248, 0.04);

  /* Modelo ATS (usadas dentro de #cv) */
  --ink: #1a1a1a;
  --muted: #555555;
  --rule: #1a1a1a;
  --rule-light: #cccccc;
  --paper: #ffffff;
  --ui-accent: #2a6dd9; /* hint de edição — usamos o azul do site */
  --ui-muted: #7a7570;
}

/* ─── BODY — fundo dark do site ────────────────────── */
body {
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  background: var(--tt-ink);
  background-image:
    linear-gradient(rgba(240, 243, 248, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 243, 248, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  color: var(--ink);
  padding-top: 56px;
  padding-bottom: 70px;
  min-height: 100vh;
}

/* ─── BACK NAVBAR ───────────────────────────────────── */
.back-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(13, 15, 20, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--tt-border);
}

.back-nav-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.back-nav-logo {
  font-family: "Playfair Display", serif;
  font-weight: 900;
  font-size: 1.1rem;
  color: rgba(240, 243, 248, 0.88);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.back-nav-logo span {
  color: var(--tt-accent);
}

.back-nav-sep {
  color: var(--tt-border);
  font-size: 1rem;
}

.back-nav-label {
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(240, 243, 248, 0.35);
}

.back-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(240, 243, 248, 0.55);
  background: none;
  border: 1px solid var(--tt-border);
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border-radius: 3px;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.back-nav-btn:hover {
  color: rgba(240, 243, 248, 0.9);
  border-color: rgba(240, 243, 248, 0.25);
}

/* ─── TOAST ──────────────────────────────────────────── */
.saved-toast {
  position: fixed;
  top: 68px;
  right: 1.5rem;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #6ee7a0;
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  border-radius: 3px;
  opacity: 0;
  transform: translateY(-4px);
  transition:
    opacity 0.25s,
    transform 0.25s;
  z-index: 999;
  pointer-events: none;
}
.saved-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ─── TOOLBAR ────────────────────────────────────────── */
.toolbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(13, 15, 20, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--tt-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 2rem;
  z-index: 100;
}

.toolbar-hint {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "DM Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240, 243, 248, 0.25);
}
.toolbar-hint svg {
  stroke: rgba(240, 243, 248, 0.25);
  flex-shrink: 0;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.toolbar-btn-save {
  background: var(--tt-card-bg);
  color: rgba(240, 243, 248, 0.7);
  border: 1px solid var(--tt-border);
}
.toolbar-btn-save:hover {
  background: rgba(240, 243, 248, 0.08);
  color: rgba(240, 243, 248, 0.95);
}
.toolbar-btn-print {
  background: var(--tt-accent);
  color: #fff;
}
.toolbar-btn-print:hover {
  background: #3a7de9;
}
.toolbar-btn-print:active {
  transform: scale(0.97);
}
.toolbar-btn-reset {
  background: transparent;
  color: rgba(240, 243, 248, 0.25);
  border: 1px solid rgba(240, 243, 248, 0.08);
  font-size: 0.58rem;
}
.toolbar-btn-reset:hover {
  color: rgba(240, 243, 248, 0.55);
  border-color: rgba(240, 243, 248, 0.18);
}

/* ══════════════════════════════════════════════════════
   A PARTIR DAQUI: tudo dentro do #cv
   ATS Pro — coluna única, branco, zero decoração
   FILOSOFIA: nenhuma cor, fonte legível por OCR/parser
══════════════════════════════════════════════════════ */

/* ── CV WRAPPER ── */
#cv {
  width: 210mm;
  min-height: 297mm;
  margin: 2rem auto;
  background: var(--paper);
  padding: 18mm 18mm 16mm;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ── EDIT HINTS (azul discreto — não interfere na leitura ATS) ── */
#cv [contenteditable]:focus {
  outline: 1.5px solid rgba(42, 109, 217, 0.4);
  outline-offset: 1px;
  border-radius: 1px;
}
#cv [contenteditable]:hover:not(:focus) {
  background: rgba(42, 109, 217, 0.04);
  border-radius: 1px;
}

/* ── HEADER ── */
.cv-header {
  margin-bottom: 0;
  text-align: left;
}

.cv-name {
  font-family: "Source Serif 4", "Georgia", serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 3pt;
  border: none;
  outline: none;
}

.cv-title {
  font-family: "Source Sans 3", sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.01em;
  margin-bottom: 7pt;
}

.cv-contacts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 4pt;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.cv-contact {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.cv-contact-sep {
  color: var(--rule-light);
  user-select: none;
  padding: 0 2pt;
}
.cv-header-add-row {
  margin-top: 4pt;
}

/* ── DIVIDER ── */
.cv-divider {
  border: none;
  border-top: 1.5pt solid var(--rule);
  margin: 8pt 0 0;
}

/* ── SECTIONS ── */
.cv-section {
  margin-top: 14pt;
}

.cv-section-title {
  font-family: "Source Serif 4", "Georgia", serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  padding-bottom: 3pt;
  border-bottom: 0.75pt solid var(--rule);
  margin-bottom: 7pt;
}

/* ── OBJETIVO ── */
.cv-objective {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
  font-weight: 400;
}
.cv-objective strong {
  font-weight: 600;
}

/* ── EXPERIÊNCIA ── */
.cv-exp {
  margin-bottom: 10pt;
  position: relative;
}
.cv-exp:last-child {
  margin-bottom: 0;
}
.cv-exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8pt;
  margin-bottom: 3pt;
}
.cv-exp-left {
  flex: 1;
}
.cv-exp-role {
  font-family: "Source Sans 3", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
.cv-exp-company {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 1px;
}
.cv-exp-period {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
  padding-top: 1px;
}
.cv-bullets {
  margin: 3pt 0 0 13pt;
  padding: 0;
}
.cv-bullets li {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 2px;
  position: relative;
}
.cv-bullets li:last-child {
  margin-bottom: 0;
}

/* ── FORMAÇÃO ── */
.cv-edu {
  margin-bottom: 7pt;
  position: relative;
}
.cv-edu:last-child {
  margin-bottom: 0;
}
.cv-edu-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8pt;
}
.cv-edu-left {
  flex: 1;
}
.cv-edu-degree {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
.cv-edu-school {
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
}
.cv-edu-year {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
  padding-top: 1px;
}

/* ── HABILIDADES ── */
.cv-skills-grid {
  display: flex;
  flex-direction: column;
  gap: 4pt;
}
.cv-skill-group {
  display: flex;
  align-items: baseline;
  gap: 6pt;
  font-size: 13px;
  line-height: 1.5;
  position: relative;
}
.cv-skill-label {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 110pt;
}
.cv-skill-label::after {
  content: ":";
}
.cv-skill-items {
  color: var(--ink);
  font-weight: 400;
}

/* ── IDIOMAS ── */
#lang-list {
  display: flex;
  flex-direction: column;
  gap: 3pt;
}
.cv-lang {
  display: flex;
  align-items: center;
  gap: 5pt;
  font-size: 13px;
  position: relative;
}
.cv-lang-name {
  font-weight: 600;
  color: var(--ink);
  min-width: 110pt;
}
.cv-lang-sep {
  color: var(--rule-light);
  user-select: none;
}
.cv-lang-level {
  color: var(--muted);
  font-weight: 400;
}

/* ── CURSOS ── */
.cv-course {
  margin-bottom: 5pt;
  position: relative;
}
.cv-course:last-child {
  margin-bottom: 0;
}
.cv-course-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8pt;
}
.cv-course-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1pt;
}
.cv-course-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.cv-course-inst {
  font-size: 12px;
  color: var(--muted);
}
.cv-course-year {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
}

/* ── CONTROLES DINÂMICOS ── */
.dyn-block {
  position: relative;
}
.dyn-block:hover .dyn-remove {
  display: flex;
  align-items: center;
  justify-content: center;
}
.dyn-remove {
  display: none;
  position: absolute;
  top: 0;
  right: -20px;
  background: #e53e3e;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
  cursor: pointer;
  z-index: 10;
  padding: 0;
}

.li-remove {
  display: none;
  background: none;
  border: none;
  color: #e53e3e;
  cursor: pointer;
  font-size: 12px;
  padding: 0 0 0 4px;
  vertical-align: middle;
  line-height: 1;
}
.cv-bullets li:hover .li-remove {
  display: inline;
}

.dyn-add-btn {
  background: none;
  border: 1px dashed var(--rule-light);
  color: var(--ui-muted);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 2px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.dyn-add-btn:hover {
  border-color: var(--tt-accent);
  color: var(--tt-accent);
}

.dyn-add-row {
  margin-top: 5pt;
}
.exp-inline-controls {
  margin-top: 4pt;
}

/* ── PRINT ── */
@media print {
  @page {
    size: A4;
    margin: 0;
  }

  html,
  body {
    background: white !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    padding: 0 !important;
    margin: 0 !important;
    width: 210mm;
  }

  body > *:not(#cv) {
    display: none !important;
  }

  #cv {
    display: block !important;
    visibility: visible !important;
    width: 210mm;
    min-height: auto;
    margin: 0 !important;
    padding: 18mm 18mm 16mm !important;
    box-shadow: none !important;
    overflow: visible !important;
    position: static !important;
  }
}

/* ── RESPONSIVE ── */
@media (max-width: 760px) {
  #cv {
    width: 100%;
    padding: 6mm 5mm 8mm;
    margin: 1rem auto;
    box-shadow: none;
  }
  .cv-exp-header,
  .cv-edu-header,
  .cv-course-header {
    flex-direction: column;
    gap: 2pt;
  }
  .cv-exp-period,
  .cv-edu-year,
  .cv-course-year {
    text-align: left;
  }
}

/* ─── Botão formulário guiado ─── */
.back-nav-form-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--tt-accent);
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border-radius: 3px;
  transition: background 0.2s;
}
.back-nav-form-btn:hover {
  background: #3a7de9;
}
