/* ================================================================
   Resume Builder v2 CSS — Toolixa
   Builder UI + 7 Resume Templates
   ================================================================ */

/* ==== HERO ==== */
.rb-hero {
  background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
  padding: 1.75rem 1.5rem 1.25rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  margin-top: 68px;
}
.rb-hero h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--text);
  margin: 0 0 .25rem;
  letter-spacing: -0.03em;
}
.rb-hero p { font-size: .875rem; color: var(--text-muted); margin: 0; }
.rb-hero-badge {
  display: inline-block;
  background: rgba(67,56,202,.1);
  color: var(--primary);
  font-size: .75rem;
  font-weight: 700;
  padding: .25rem .75rem;
  border-radius: 20px;
  margin-bottom: .625rem;
  letter-spacing: .03em;
}

/* ==== CONTROLS BAR ==== */
.rb-controls-bar {
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 68px;
  z-index: 100;
  padding: .5rem 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.rb-controls-inner {
  display: flex;
  align-items: center;
  gap: .5rem .75rem;
  flex-wrap: wrap;
  max-width: 1600px;
  margin: 0 auto;
}
.rb-ctrl-group { display: flex; align-items: center; gap: .35rem; }
.rb-ctrl-label {
  font-size: .65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}
.rb-ctrl-div { border-left: 1px solid var(--border); padding-left: .625rem; margin-left: .1rem; }
.rb-ctrl-actions { margin-left: auto; display: flex; align-items: center; gap: .4rem; }

/* Template chips */
.rb-tpl-chips { display: flex; gap: .3rem; flex-wrap: nowrap; overflow-x: auto; }
.rb-tpl-chip {
  padding: .28rem .6rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: white;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}
.rb-tpl-chip:hover { border-color: var(--primary); color: var(--primary); }
.rb-tpl-chip.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Color swatches */
.rb-color-row { display: flex; align-items: center; gap: .28rem; flex-wrap: nowrap; }
.rb-swatch {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 1.5px rgba(0,0,0,.18);
  cursor: pointer;
  transition: transform .15s;
  flex-shrink: 0;
}
.rb-swatch:hover { transform: scale(1.25); }
.rb-swatch.active { box-shadow: 0 0 0 2px white, 0 0 0 4px rgba(0,0,0,.35); }
.rb-custom-color {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  padding: 1px;
  background: none;
  flex-shrink: 0;
}

/* Font selector */
.rb-font-select {
  padding: .3rem .5rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: .8rem;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  background: white;
}

/* Auto-save indicator */
.rb-autosave {
  font-size: .72rem;
  color: #16a34a;
  font-weight: 700;
  opacity: 0;
  transition: opacity .3s;
  white-space: nowrap;
}
.rb-autosave.show { opacity: 1; }

/* Action buttons */
.rb-btn-action {
  padding: .3rem .7rem;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: white;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: all .15s;
  white-space: nowrap;
}
.rb-btn-action:hover { background: var(--bg-alt); }
.rb-btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.rb-btn-primary:hover { background: #3730a3; }
.rb-btn-danger { color: #ef4444; border-color: #fecaca; }
.rb-btn-danger:hover { background: #fef2f2; }

/* ==== MAIN BUILDER LAYOUT ==== */
.rb-builder {
  display: grid;
  grid-template-columns: 400px 1fr;
  min-height: calc(100vh - 160px);
}

.rb-left {
  background: #f8fafc;
  border-right: 1px solid var(--border);
  padding: .875rem;
  display: flex;
  flex-direction: column;
  gap: .625rem;
  overflow-y: auto;
  height: calc(100vh - 160px);
  position: sticky;
  top: 115px;
}

.rb-right {
  display: flex;
  flex-direction: column;
  background: #dde3ed;
}

/* ==== PREVIEW PANEL ==== */
.rb-preview-bar {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: .5rem 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}
.rb-zoom-row { display: flex; align-items: center; gap: .4rem; }
.rb-zoom-btn {
  width: 26px; height: 26px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: white;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit;
  color: var(--text);
}
.rb-zoom-btn:hover { background: var(--bg-alt); }
.rb-zoom-label { font-size: .78rem; font-weight: 700; color: var(--text-muted); min-width: 38px; text-align: center; }
.rb-preview-right-actions { margin-left: auto; }

.rb-preview-scroll {
  flex: 1;
  overflow: auto;
  padding: 2rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.rb-preview-scaler {
  transform-origin: top center;
  display: inline-block;
}

/* ==== CARDS ==== */
.rb-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.rb-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .7rem .9rem;
  cursor: pointer;
  font-size: .825rem;
  font-weight: 700;
  color: var(--text);
  user-select: none;
  transition: background .15s;
}
.rb-card-header:hover { background: #f8fafc; }
.rb-toggle-icon { font-size: .7rem; color: var(--text-muted); transition: transform .2s; }
.rb-card.rb-collapsed .rb-toggle-icon { transform: rotate(-90deg); }
.rb-card.rb-collapsed .rb-card-body { display: none; }
.rb-card-body { padding: .75rem .9rem .9rem; }

/* ==== FORM ELEMENTS ==== */
.rb-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  margin-bottom: .5rem;
}
.rb-fg {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.rb-label {
  font-size: .68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.rb-input {
  width: 100%;
  padding: .48rem .625rem;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: .835rem;
  font-family: inherit;
  color: var(--text);
  transition: border-color .15s;
  outline: none;
  box-sizing: border-box;
  background: white;
}
.rb-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(67,56,202,.07); }
.rb-ta { min-height: 72px; resize: vertical; line-height: 1.5; }
.rb-select { cursor: pointer; }
.rb-select-sm { flex-shrink: 0; }
.rb-check-fg { flex-direction: row; align-items: center; }
.rb-check-fg label { display: flex; align-items: center; gap: .4rem; font-size: .8rem; cursor: pointer; color: var(--text); }
.rb-checkbox { margin: 0; }
.rb-hint { font-size: .72rem; color: var(--text-muted); margin-top: .25rem; }

/* Entries */
.rb-entries { display: flex; flex-direction: column; gap: .4rem; margin-bottom: .4rem; }
.rb-entry {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.rb-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .55rem .7rem;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  background: #f8fafc;
  user-select: none;
}
.rb-entry.rb-ce .rb-entry-body { display: none; }
.rb-entry.rb-ce .rb-entry-arrow { transform: rotate(-90deg); }
.rb-entry-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-entry-actions { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; }
.rb-entry-arrow { font-size: .65rem; color: var(--text-muted); transition: transform .2s; }
.rb-entry-body { padding: .65rem .7rem; display: flex; flex-direction: column; gap: .45rem; }

.rb-del-btn {
  width: 19px; height: 19px;
  border-radius: 50%;
  border: 1px solid #fecaca;
  background: #fff5f5;
  color: #ef4444;
  font-size: .65rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit;
  flex-shrink: 0;
}
.rb-del-btn:hover { background: #ef4444; color: white; border-color: #ef4444; }

.rb-add-btn {
  width: 100%;
  padding: .45rem;
  border: 1.5px dashed var(--border);
  border-radius: 7px;
  background: transparent;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.rb-add-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(67,56,202,.03); }
.rb-add-btn-sm {
  padding: .48rem .875rem;
  border: 1.5px solid var(--primary);
  border-radius: 7px;
  background: var(--primary);
  color: white;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Skills */
.rb-skill-input-row { display: flex; gap: .4rem; margin-bottom: .4rem; }
.rb-skill-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.rb-skill-tag {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  padding: .2rem .5rem;
  background: rgba(67,56,202,.08);
  border: 1px solid rgba(67,56,202,.2);
  border-radius: 6px;
  font-size: .76rem;
  font-weight: 600;
  color: var(--primary);
}
.rb-skill-tag button {
  border: none; background: none; cursor: pointer;
  color: inherit; font-size: .85rem; line-height: 1; padding: 0; font-family: inherit;
}

/* Simple items, flex rows */
.rb-simple-item { display: flex; gap: .4rem; align-items: center; margin-bottom: .3rem; }
.rb-simple-item .rb-input { flex: 1; }
.rb-flex-row { display: flex; gap: .4rem; align-items: center; margin-bottom: .35rem; }
.rb-flex-row .rb-input { flex: 1; min-width: 0; }

/* Buttons */
.rb-btn-sm {
  padding: .28rem .65rem;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: white;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: all .15s;
}
.rb-btn-sm:hover { background: var(--bg-alt); }

/* ==== SECTION ORDER ==== */
.rb-order-list { display: flex; flex-wrap: wrap; gap: .35rem; }
.rb-order-item {
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: .3rem .55rem;
  background: #f1f5f9;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: .76rem;
  font-weight: 600;
  color: var(--text);
  cursor: grab;
  user-select: none;
  transition: all .15s;
}
.rb-order-item:active { cursor: grabbing; }
.rb-order-item.dragging { opacity: .35; }
.rb-order-item.drag-over { border-color: var(--primary); background: rgba(67,56,202,.07); transform: scale(1.04); }
.rb-order-handle { font-size: .9rem; color: var(--text-muted); line-height: 1; }

/* ==== PHOTO UPLOAD ==== */
.rb-photo-drop {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 1.1rem;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  min-height: 80px;
}
.rb-photo-drop:hover, .rb-photo-drop.drag-over { border-color: var(--primary); background: rgba(67,56,202,.03); }
.rb-photo-icon { font-size: 1.75rem; margin-bottom: .3rem; }
.rb-photo-text { font-size: .825rem; font-weight: 600; color: var(--text); margin-bottom: .2rem; }
.rb-photo-hint { font-size: .72rem; color: var(--text-muted); }
.rb-photo-preview { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 3px solid var(--border); margin: 0 auto .625rem; display: block; }
.rb-photo-actions { display: flex; justify-content: center; gap: .4rem; }

/* ==== MOBILE TABS ==== */
.rb-mobile-tabs {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: white;
  border-top: 1px solid var(--border);
  padding: .5rem;
  gap: .5rem;
}
.rb-mob-tab {
  flex: 1;
  padding: .7rem;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: white;
  font-size: .875rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: all .15s;
}
.rb-mob-tab.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ================================================================
   RESUME PREVIEW — Base styles shared by all templates
   ================================================================ */

.resume-preview {
  width: 794px;
  min-height: 1122px;
  background: white;
  box-shadow: 0 4px 40px rgba(0,0,0,.18);
  font-size: 10pt;
  line-height: 1.45;
  color: #1e293b;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  --rc: #4338ca;
}

.resume-preview * { box-sizing: border-box; }

.rt-section { margin-bottom: 1em; }
.rt-sec-title {
  font-size: .72em;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  border-bottom: 1.5px solid;
  padding-bottom: .2em;
  margin-bottom: .55em;
}
.rt-item { margin-bottom: .7em; }
.rt-item-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .1em; }
.rt-it { font-weight: 700; font-size: .93em; line-height: 1.2; }
.rt-io { font-size: .82em; color: #475569; margin-top: .1em; }
.rt-id { font-size: .78em; color: #64748b; white-space: nowrap; margin-left: .5em; flex-shrink: 0; }
.rt-tech { font-style: italic; }
.rt-idesc { margin-top: .3em; font-size: .85em; color: #334155; line-height: 1.5; }
.rt-idesc p, .rt-idesc ul { margin: 0; }
.rt-list { margin: .25em 0 0 1.2em; padding: 0; font-size: .85em; color: #334155; line-height: 1.5; }
.rt-list li { margin-bottom: .1em; }
.rt-chips { display: flex; flex-wrap: wrap; gap: .3em; }
.rt-chip { padding: .12em .48em; border: 1px solid; border-radius: 4px; font-size: .78em; font-weight: 600; }
.rt-lang-wrap { display: flex; flex-direction: column; gap: .2em; }
.rt-lang-item { display: flex; justify-content: space-between; font-size: .82em; align-items: center; }
.rt-ln { font-weight: 600; }
.rt-ll { color: #64748b; font-size: .9em; }
.rt-social-wrap { display: flex; flex-wrap: wrap; gap: .4em; }
.rt-social-link { font-size: .82em; text-decoration: none; font-weight: 600; }
.rt-refs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6em; }
.rt-ref-item { font-size: .85em; }
.rt-ref-c { font-size: .82em; color: #64748b; }
.rt-ci-item { display: inline; font-size: .82em; color: #475569; }
.rt-ci-item + .rt-ci-item::before { content: ' · '; }
.rt-link { text-decoration: none; font-weight: 600; }
.rt-summary { font-size: .9em; color: #334155; line-height: 1.6; margin: 0; }
.rt-custom { font-size: .88em; color: #334155; }
.rt-contact-row { display: flex; align-items: flex-start; gap: .4em; font-size: .8em; color: #334155; margin-bottom: .22em; }
.rt-photo-circle { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid; }
.rt-photo-wrap { display: flex; justify-content: center; margin-bottom: .75em; }

/* Sidebar shared */
.rt-sb-heading { font-size: .68em; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; margin: .8em 0 .3em; opacity: .8; }
.rt-sb-chips { display: flex; flex-wrap: wrap; gap: .28em; }
.rt-sb-chip { font-size: .72em; padding: .14em .42em; border-radius: 4px; font-weight: 600; border: 1px solid transparent; }
.rt-sb-link { display: block; font-size: .78em; color: #334155; text-decoration: none; margin-bottom: .18em; word-break: break-all; }

/* ================================================================
   TEMPLATE: MODERN (two-column sidebar left)
   ================================================================ */

.template-modern .rt-modern { display: flex; min-height: 1122px; }
.template-modern .rt-mod-sidebar {
  width: 210px;
  flex-shrink: 0;
  padding: 1.6em 1.1em;
  display: flex;
  flex-direction: column;
}
.template-modern .rt-mod-name { font-size: 1.15em; font-weight: 800; line-height: 1.2; word-break: break-word; margin-bottom: .15em; }
.template-modern .rt-mod-job { font-size: .8em; color: #475569; margin-bottom: .6em; }
.template-modern .rt-mod-divider { border: none; border-top: 1px solid; margin: .5em 0; }
.template-modern .rt-mod-contact { margin-bottom: .5em; }
.template-modern .rt-mod-main { flex: 1; padding: 1.6em 1.3em; }
.template-modern .rt-sb-heading { color: inherit; }

/* ================================================================
   TEMPLATE: PROFESSIONAL (single col, clean header)
   ================================================================ */

.template-professional .rt-professional { padding: 2em 2.5em; }
.template-professional .rt-prof-header { padding-bottom: 1em; margin-bottom: 1em; display: flex; align-items: center; gap: 1.2em; }
.template-professional .rt-prof-photo { width: 70px; height: 70px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.template-professional .rt-prof-info { flex: 1; }
.template-professional .rt-prof-name { font-size: 1.85em; font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin-bottom: .15em; }
.template-professional .rt-prof-title { font-size: .9em; color: #64748b; margin-bottom: .4em; }
.template-professional .rt-prof-contact { display: flex; flex-wrap: wrap; }

/* ================================================================
   TEMPLATE: CORPORATE (full-width header bar + two col)
   ================================================================ */

.template-corporate .rt-corporate {}
.template-corporate .rt-corp-header {
  display: flex;
  align-items: center;
  gap: 1.25em;
  padding: 1.2em 1.5em;
  color: white;
}
.template-corporate .rt-corp-photo { width: 68px; height: 68px; border-radius: 6px; object-fit: cover; border: 2px solid rgba(255,255,255,.4); flex-shrink: 0; }
.template-corporate .rt-corp-name { font-size: 1.65em; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.template-corporate .rt-corp-job { font-size: .88em; opacity: .82; margin-top: .15em; }
.template-corporate .rt-corp-contact { padding: .55em 1.5em; display: flex; flex-wrap: wrap; gap: .1em; }
.template-corporate .rt-corp-contact .rt-ci-item { font-size: .8em; }
.template-corporate .rt-corp-body { display: flex; min-height: 900px; }
.template-corporate .rt-corp-sidebar { width: 185px; flex-shrink: 0; padding: 1em; background: #f8fafc; border-right: 1px solid #e2e8f0; }
.template-corporate .rt-corp-main { flex: 1; padding: 1em 1.3em; }
.template-corporate .rt-corp-sh { font-size: .68em; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; margin: .8em 0 .3em; border-bottom: 1.5px solid; padding-bottom: .15em; }

/* ================================================================
   TEMPLATE: MINIMAL (ultra clean single col)
   ================================================================ */

.template-minimal .rt-minimal { padding: 2.75em 3em; }
.template-minimal .rt-min-header { margin-bottom: 1.5em; padding-bottom: 1em; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; gap: 1em; }
.template-minimal .rt-min-photo { width: 65px; height: 65px; border-radius: 50%; object-fit: cover; border: 2px solid; flex-shrink: 0; }
.template-minimal .rt-min-name { font-size: 2.2em; font-weight: 800; letter-spacing: -0.04em; color: #0f172a; line-height: 1; }
.template-minimal .rt-min-title { font-size: .95em; font-weight: 500; margin: .2em 0 .5em; }
.template-minimal .rt-min-contact { display: flex; flex-wrap: wrap; }
.template-minimal .rt-min-sec { margin-bottom: 1.3em; }
.template-minimal .rt-min-heading { font-size: .67em; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; margin-bottom: .7em; }
.template-minimal .rt-chip { background: #f1f5f9; border-color: #e2e8f0 !important; color: #475569 !important; border-radius: 3px; }

/* ================================================================
   TEMPLATE: CREATIVE (bold banner + sidebar)
   ================================================================ */

.template-creative .rt-creative {}
.template-creative .rt-crv-banner {
  display: flex;
  align-items: center;
  gap: 1.5em;
  padding: 1.5em 1.75em;
  color: white;
}
.template-creative .rt-crv-left { flex-shrink: 0; }
.template-creative .rt-crv-photo { width: 88px; height: 88px; border: 3px solid rgba(255,255,255,.5); }
.template-creative .rt-crv-initials {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 3px solid rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8em; font-weight: 800;
}
.template-creative .rt-crv-right { flex: 1; }
.template-creative .rt-crv-name { font-size: 2em; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.template-creative .rt-crv-title { font-size: .9em; opacity: .85; margin: .2em 0 .4em; }
.template-creative .rt-crv-contact .rt-ci-item { color: rgba(255,255,255,.88); }
.template-creative .rt-crv-body { display: flex; min-height: 850px; }
.template-creative .rt-crv-sidebar { width: 185px; flex-shrink: 0; padding: 1em; background: #f8fafc; border-right: 1px solid #e2e8f0; }
.template-creative .rt-crv-main { flex: 1; padding: 1em 1.3em; }
.template-creative .rt-crv-sh { font-size: .68em; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; margin: .8em 0 .3em; }

/* ================================================================
   TEMPLATE: ATS FRIENDLY (plain text, ATS-optimized)
   ================================================================ */

.template-ats .rt-ats { padding: 1.75em 2.25em; font-family: 'Times New Roman', Times, serif; }
.template-ats .rt-ats-name { font-size: 1.9em; font-weight: 700; text-align: center; color: #0f172a; }
.template-ats .rt-ats-title { font-size: 1em; text-align: center; color: #475569; margin: .15em 0 .2em; }
.template-ats .rt-ats-contact { text-align: center; font-size: .88em; color: #475569; margin-bottom: .15em; }
.template-ats .rt-ats-rule { border: none; border-top: 1.5px solid #0f172a; margin: .75em 0; }
.template-ats .rt-ats-sec { margin-bottom: .9em; }
.template-ats .rt-ats-sh { font-size: .88em; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid #1e293b; padding-bottom: .12em; margin-bottom: .45em; }
.template-ats .rt-ats-item { margin-bottom: .5em; }
.template-ats .rt-ats-ih { display: flex; justify-content: space-between; font-size: .88em; margin-bottom: .12em; flex-wrap: wrap; gap: .25em; }
.template-ats .rt-ats-date { font-weight: 400; color: #475569; }
.template-ats ul { margin: .25em 0 0 1.5em; padding: 0; }
.template-ats li { font-size: .88em; margin-bottom: .1em; }
.template-ats p { font-size: .88em; margin: 0; line-height: 1.5; }

/* ================================================================
   TEMPLATE: CLASSIC (centered header, all-caps sections)
   ================================================================ */

.template-classic .rt-classic { padding: 1.75em 2.25em; }
.template-classic .rt-cls-header {
  text-align: center;
  padding-bottom: .875em;
  margin-bottom: .875em;
  border-bottom: 2px solid #0f172a;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.template-classic .rt-cls-photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid; margin-bottom: .5em; }
.template-classic .rt-cls-name { font-size: 1.9em; font-weight: 800; color: #0f172a; letter-spacing: .06em; line-height: 1.1; }
.template-classic .rt-cls-title { font-size: .9em; color: #475569; margin: .2em 0 .4em; }
.template-classic .rt-cls-contact { display: flex; justify-content: center; flex-wrap: wrap; }
.template-classic .rt-cls-sec { margin-bottom: .9em; }
.template-classic .rt-cls-sh { font-size: .78em; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; border-bottom: 2px solid; padding-bottom: .18em; margin-bottom: .6em; }
.template-classic .rt-chip { background: #f8fafc; border-color: #cbd5e1 !important; color: #334155 !important; border-radius: 3px; font-weight: 600; }

/* ================================================================
   PRINT
   ================================================================ */

@media print {
  @page { size: A4; margin: 0; }
  body * { visibility: hidden !important; }
  #printArea, #printArea * { visibility: visible !important; }
  #printArea {
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    width: 210mm !important;
    z-index: 99999 !important;
    transform: none !important;
  }
  .resume-preview {
    width: 210mm !important;
    min-height: 297mm !important;
    box-shadow: none !important;
    font-size: 10pt !important;
  }
  #previewScaler { transform: none !important; }
}

/* ================================================================
   RESPONSIVE / MOBILE
   ================================================================ */

@media (max-width: 1024px) {
  .rb-builder { grid-template-columns: 340px 1fr; }
  .rb-left { width: 340px; }
}

@media (max-width: 860px) {
  .rb-builder { grid-template-columns: 1fr; }
  .rb-left { position: static; height: auto; max-height: none; border-right: none; border-bottom: 1px solid var(--border); }
  .rb-right { display: none; min-height: 70vh; }
  .rb-right.mob-show { display: flex; }
  .rb-left.mob-hide { display: none; }
  .rb-mobile-tabs { display: flex; }
  body { padding-bottom: 70px; }
  .rb-controls-inner { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .rb-ctrl-group { flex-shrink: 0; }
  .rb-preview-scroll { padding: 1rem; }
}

@media (max-width: 500px) {
  .rb-field-row { grid-template-columns: 1fr; }
  .rb-hero h1 { font-size: 1.35rem; }
}
