/* ============================================================
   Resume Builder Pro — v3.2 Clean Redesign
   Libre Baskerville + Inter — underline inputs, generous space
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600&family=Inter:wght@300;400;500;600&display=swap');

/* ── Tokens ── */
#rbp {
  --a:         #1a3557;
  --a2:        #1e4a8a;
  --a-faint:   rgba(26,53,87,.06);
  --a-soft:    rgba(26,53,87,.12);
  --ink:       #0d1b2a;
  --ink2:      #2d3f53;
  --muted:     #64778a;
  --subtle:    #96a8b8;
  --border:    #dde4ed;
  --bg:        #f0f3f8;
  --white:     #ffffff;
  --card-bg:   #f8fafc;
  --ok:        #0a7c4e;
  --warn:      #a05a00;
  --err:       #a01a1a;
  --ok-bg:     #edfaf4;
  --warn-bg:   #fff8ed;
  --err-bg:    #fef2f2;
  --ui:        'Inter', system-ui, sans-serif;
  --serif:     'Cormorant Garamond', Georgia, serif;
  --rv:        #1a3557;
}

/* ── Full-width breakout ── */
#rbp {
  position: relative; left: 50%;
  width: 100vw !important; max-width: 100vw !important;
  margin-left: -50vw !important; margin-right: -50vw !important;
}
#rbp *, #rbp *::before, #rbp *::after { box-sizing: border-box; margin: 0; padding: 0; }
#rbp { font-family: var(--ui); color: var(--ink); background: var(--bg); }


/* ============================================================
   TOPBAR
   ============================================================ */
.rb-bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 54px; padding: 0 28px; background: var(--a);
  position: sticky; top: 0; z-index: 300; gap: 20px;
}
.rb-bar-l { display: flex; align-items: center; gap: 18px; }
.rb-bar-r { display: flex; align-items: center; gap: 10px; }

.rb-bar-icon { opacity: .6; flex-shrink: 0; }
.rb-bar-name { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.9); white-space: nowrap; letter-spacing: -.1px; }

/* Template tabs */
.rb-tmpl-group { display: flex; background: rgba(0,0,0,.2); border-radius: 30px; padding: 3px; gap: 1px; }
.rb-tmpl {
  padding: 5px 15px; border-radius: 24px; border: none;
  background: transparent; color: rgba(255,255,255,.45);
  font-family: var(--ui); font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all .18s;
}
.rb-tmpl:hover  { color: rgba(255,255,255,.75); }
.rb-tmpl.active { background: rgba(255,255,255,.16); color: #fff; }

/* ATS pill */
.rb-ats-pill {
  display: flex; align-items: center; gap: 5px;
  background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px; padding: 5px 13px;
  font-family: var(--ui); font-size: 12px; font-weight: 500;
  color: rgba(255,255,255,.6); transition: all .3s;
}
.rb-ats-pill.ok   { color: #6EE7B7; border-color: rgba(110,231,183,.35); background: rgba(10,124,78,.22); }
.rb-ats-pill.warn { color: #FCD34D; border-color: rgba(252,211,77,.3);   background: rgba(160,90,0,.2); }
.rb-ats-pill.poor { color: #FCA5A5; border-color: rgba(252,165,165,.3);  background: rgba(160,26,26,.2); }

.rb-btn-ghost {
  padding: 7px 16px; border-radius: 6px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.8); font-family: var(--ui); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all .15s;
}
.rb-btn-ghost:hover { background: rgba(255,255,255,.18); color: #fff; }

.rb-btn-solid {
  padding: 8px 18px; border-radius: 6px;
  background: #fff; border: none; color: var(--a);
  font-family: var(--ui); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.rb-btn-solid:hover { background: #eef3ff; }


/* ============================================================
   WORKSPACE LAYOUT
   ============================================================ */
.rb-workspace {
  display: grid;
  grid-template-columns: 168px 1fr 52%;
  height: calc(100vh - 80px);
  overflow: hidden;
}


/* ============================================================
   SIDE NAV — clean dots + labels
   ============================================================ */
.rb-sidenav {
  background: var(--white); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 24px 0 20px; gap: 2px; overflow-y: auto; scrollbar-width: none;
}
.rb-sidenav::-webkit-scrollbar { display: none; }

.rb-navbtn {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px; border: none; background: none;
  cursor: pointer; border-left: 3px solid transparent;
  font-family: var(--ui); text-align: left; width: 100%;
  transition: background .12s, border-color .12s;
}
.rb-navbtn:hover { background: var(--a-faint); }
.rb-navbtn.active { background: var(--a-faint); border-left-color: var(--a); }

.rb-navdot {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg); border: 1.5px solid var(--border);
  color: var(--subtle); font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all .2s;
}
.rb-navbtn.active .rb-navdot { background: var(--a); color: #fff; border-color: var(--a); box-shadow: 0 2px 8px rgba(26,53,87,.3); }
.rb-navbtn.done .rb-navdot   { background: var(--ok); color: #fff; border-color: transparent; font-size: 10px; }

.rb-navlabel { font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.rb-navbtn.active .rb-navlabel { color: var(--a); font-weight: 600; }
.rb-navbtn.done .rb-navlabel   { color: var(--ink2); }

/* Color picker section */
.rb-nav-colors { margin: 20px 14px 0; }
.rb-nav-colors-title { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--subtle); margin-bottom: 10px; }
.rb-swatches { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.rb-sw {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid transparent; cursor: pointer;
  transition: transform .15s, outline .1s;
}
.rb-sw.active, .rb-sw:hover { outline: 2.5px solid var(--ink); transform: scale(1.2); }
#rb-color-pick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border); cursor: pointer; padding: 2px; background: none; }


/* ============================================================
   FORM PANEL — generous, breathable
   ============================================================ */
.rb-form-panel {
  background: var(--white); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
}

.rb-step { display: none; flex-direction: column; height: 100%; overflow: hidden; }
.rb-step.active { display: flex; }

/* Step intro — the "chapter heading" feel */
.rb-step-intro {
  padding: 32px 40px 20px; flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.rb-step-num-big {
  font-family: var(--serif); font-size: 13px; font-weight: 400;
  color: var(--subtle); letter-spacing: 2px; margin-bottom: 6px;
}
.rb-step-intro h2 {
  font-size: 22px; font-weight: 600; color: var(--ink);
  letter-spacing: -.4px; margin-bottom: 6px;
}
.rb-step-intro p { font-size: 13.5px; color: var(--muted); line-height: 1.55; }

/* Scrollable form content */
.rb-line-form {
  flex: 1; overflow-y: auto; padding: 28px 40px 24px;
  display: flex; flex-direction: column; gap: 20px;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}

/* ── UNDERLINE FIELDS — the key UX change ── */
.rb-line-row { display: flex; gap: 32px; }
.rb-line-row-2 > .rb-line-field { flex: 1; }
.rb-line-row-3 > .rb-line-field { flex: 1; }

.rb-line-field {
  display: flex; flex-direction: column-reverse; gap: 0;
  position: relative; padding-bottom: 2px;
  border-bottom: 1.5px solid var(--border);
  transition: border-color .2s;
}
.rb-line-field:focus-within { border-color: var(--a); }
.rb-line-field:focus-within label { color: var(--a); }

.rb-line-field label {
  font-size: 10px; font-weight: 600; color: var(--subtle);
  text-transform: uppercase; letter-spacing: .8px;
  padding: 0 0 3px; transition: color .2s;
  display: flex; align-items: center; justify-content: space-between;
  pointer-events: none;
}
.rb-line-field input,
.rb-line-field textarea,
.rb-line-field select {
  border: none; outline: none; padding: 10px 0 6px;
  font-size: 15px; font-family: var(--ui); color: var(--ink);
  background: transparent; width: 100%; resize: none;
  line-height: 1.5; -webkit-appearance: none;
}
.rb-line-field input::placeholder,
.rb-line-field textarea::placeholder { color: #b8c4d0; font-size: 14px; }
.rb-line-field select { cursor: pointer; color: var(--ink); }
.rb-line-field select option { color: var(--ink); }

/* Tall textarea fields */
.rb-line-field-tall { border-bottom: 1.5px solid var(--border); }
.rb-line-field-tall textarea { min-height: 110px; font-size: 14px; }

/* Opt label */
.rb-opt { font-size: 9px; color: var(--subtle); font-weight: 400; text-transform: none; letter-spacing: 0; }
.rb-wordcount { font-size: 10px; color: var(--subtle); font-weight: 400; text-transform: none; letter-spacing: 0; }

/* JD block */
.rb-jd-block {
  background: #f7f9fc; border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px;
}
.rb-jd-label {
  font-size: 11px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .6px;
  display: flex; align-items: center; gap: 10px;
}
.rb-jd-badge {
  font-size: 9.5px; padding: 3px 9px; border-radius: 20px;
  background: var(--a); color: #fff; letter-spacing: .3px; font-weight: 700;
  text-transform: none;
}
.rb-jd-block textarea {
  border: none; outline: none; background: transparent;
  font-family: var(--ui); font-size: 13px; color: var(--ink2);
  resize: vertical; min-height: 80px; line-height: 1.55; width: 100%;
}
.rb-jd-block textarea::placeholder { color: #b8c4d0; }

/* Tip box */
.rb-tip-inline {
  background: #f0fdf9; border: 1px solid #a7f3d0;
  border-radius: 10px; padding: 14px 16px;
  font-size: 13px; color: var(--ink2); line-height: 1.6;
}
.rb-tip-inline-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--a); margin-bottom: 8px;
}
.rb-tip-inline ul { padding-left: 16px; }
.rb-tip-inline li { margin-bottom: 4px; }

/* Section divider */
.rb-section-divider {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 700; color: var(--ink2);
  text-transform: uppercase; letter-spacing: .6px;
  padding-top: 8px;
}
.rb-section-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.rb-section-divider em { font-style: normal; font-weight: 400; font-size: 10px; color: var(--subtle); text-transform: none; letter-spacing: 0; }

/* Tag input */
.rb-tag-zone {
  background: var(--bg); border-radius: 10px;
  padding: 14px 16px; min-height: 56px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  cursor: text; transition: box-shadow .15s;
}
.rb-tag-zone:focus-within { box-shadow: 0 0 0 2px var(--a-soft); }
.rb-tag-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--a-faint); color: var(--a);
  border: 1px solid var(--a-soft); border-radius: 4px;
  padding: 5px 10px; font-size: 12.5px; font-weight: 500;
  animation: popIn .15s ease;
}
.rb-tag-rm { background: none; border: none; cursor: pointer; color: var(--a); opacity: .5; font-size: 14px; padding: 0; line-height: 1; transition: opacity .1s; }
.rb-tag-rm:hover { opacity: 1; }
.rb-tag-input { border: none; outline: none; background: transparent; font-size: 14px; font-family: var(--ui); color: var(--ink); padding: 4px 2px; min-width: 160px; }
.rb-tag-input::placeholder { color: var(--subtle); }

/* JD suggestions */
.rb-jd-suggestions { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 13px 15px; }
.rb-jd-sug-label { font-size: 10.5px; font-weight: 700; color: var(--warn); margin-bottom: 9px; text-transform: uppercase; letter-spacing: .4px; }
.rb-jd-sug-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rb-jd-sug-chip { font-size: 12px; padding: 5px 11px; border-radius: 4px; background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; cursor: pointer; font-weight: 500; transition: background .1s; }
.rb-jd-sug-chip:hover { background: #fde68a; }

/* Cards — clean, no clutter */
.rb-card-list { display: flex; flex-direction: column; gap: 16px; }
.rb-card {
  border: 1.5px solid var(--border); border-radius: 12px;
  padding: 20px 20px 16px;
  background: var(--card-bg); position: relative;
  display: flex; flex-direction: column; gap: 18px;
  animation: slideDown .2s ease;
}
.rb-card-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--a); margin-bottom: -4px; }
.rb-card-del {
  position: absolute; top: 14px; right: 14px;
  background: none; border: none; cursor: pointer;
  color: var(--border); padding: 5px; border-radius: 5px;
  display: flex; align-items: center; transition: color .15s, background .15s;
}
.rb-card-del:hover { color: var(--err); background: var(--err-bg); }

/* Add button */
.rb-add-row-btn {
  display: flex; align-items: center; gap: 8px;
  border: 1.5px dashed var(--border); border-radius: 8px;
  padding: 12px 18px; font-size: 13.5px; font-weight: 500;
  color: var(--muted); background: none; cursor: pointer; width: 100%;
  transition: all .15s; font-family: var(--ui);
}
.rb-add-row-btn:hover { background: var(--a-faint); border-color: var(--a); color: var(--a); }

/* ── STEP FOOTER — the Continue button dominates ── */
.rb-step-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 40px; border-top: 1px solid var(--border);
  background: var(--white); flex-shrink: 0;
}
.rb-back {
  font-size: 13px; font-weight: 500; color: var(--muted);
  background: none; border: none; cursor: pointer;
  font-family: var(--ui); transition: color .15s; padding: 8px 0;
}
.rb-back:hover { color: var(--ink); }

/* The big Continue button */
.rb-continue {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: 8px; border: none;
  background: var(--a); color: #fff;
  font-family: var(--ui); font-size: 15px; font-weight: 600;
  cursor: pointer; letter-spacing: -.1px;
  transition: background .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 4px 16px rgba(26,53,87,.28);
}
.rb-continue:hover { background: var(--a2); box-shadow: 0 6px 24px rgba(26,53,87,.38); }
.rb-continue:active { transform: translateY(1px); }
.rb-continue svg { flex-shrink: 0; }
.rb-continue-success { background: var(--ok); box-shadow: 0 4px 16px rgba(10,124,78,.28); }
.rb-continue-success:hover { filter: brightness(1.08); }

/* ATS card */
.rb-ats-card { background: var(--card-bg); border: 1.5px solid var(--border); border-radius: 14px; padding: 22px; }
.rb-ats-score-row { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.rb-ats-big { font-size: 52px; font-weight: 300; color: var(--a); font-family: var(--ui); line-height: 1; letter-spacing: -3px; }
.rb-ats-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.rb-ats-sub   { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.rb-ats-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: var(--white); border: 1px solid var(--border); margin-bottom: 8px; }
.rb-ats-dot { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: #fff; }
.ats-ok   { background: var(--ok); }
.ats-warn { background: var(--warn); }
.ats-fail { background: var(--err); }
.rb-ats-lbl { font-size: 13px; font-weight: 500; color: var(--ink); flex: 1; }
.rb-ats-val { font-size: 12px; color: var(--muted); }

/* Export block */
.rb-export-block { display: flex; gap: 12px; }
.rb-export-main {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px; border-radius: 10px; border: none;
  background: var(--a); color: #fff;
  font-family: var(--ui); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all .15s;
  box-shadow: 0 4px 16px rgba(26,53,87,.25);
}
.rb-export-main:hover { background: var(--a2); }
.rb-export-print {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 22px; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--white);
  color: var(--ink2); font-family: var(--ui); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all .15s;
}
.rb-export-print:hover { background: var(--bg); }

.rb-save-note {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12.5px; color: var(--muted); line-height: 1.5;
  padding: 12px 14px; background: var(--card-bg);
  border-radius: 8px; border: 1px solid var(--border);
}


/* ============================================================
   PREVIEW PANEL
   ============================================================ */
.rb-preview-panel {
  display: flex; flex-direction: column;
  background: #d0d8e8; overflow: hidden;
}
.rb-preview-chrome {
  padding: 9px 22px; font-size: 10px; font-weight: 700;
  letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted);
  background: var(--white); border-bottom: 1px solid var(--border);
}
.rb-preview-scroll {
  flex: 1; overflow-y: auto; padding: 28px 22px;
  display: flex; justify-content: center;
  scrollbar-width: thin; scrollbar-color: rgba(0,0,0,.15) transparent;
}


/* ============================================================
   RESUME PAGE
   ============================================================ */
.rb-page {
  background: #fff; width: 100%; max-width: 820px; min-height: 1060px;
  box-shadow: 0 24px 64px rgba(0,0,0,.18), 0 4px 20px rgba(0,0,0,.08);
  font-family: Georgia, 'Times New Roman', serif;
  color: #1a1f2e; font-size: 10.5pt; line-height: 1.55;
}

.rv-header { padding: 38px 46px 24px; }
.rv-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 40px; font-weight: 600; color: var(--rv);
  letter-spacing: -.5px; line-height: 1.05;
}
.rv-title { font-family: 'Inter', sans-serif; font-size: 12.5px; color: #64748B; margin-top: 5px; letter-spacing: .2px; }
.rv-contacts { display: flex; flex-wrap: wrap; gap: 5px 20px; margin-top: 13px; font-family: 'Inter', sans-serif; font-size: 10px; color: #475569; }
.rv-contact-item { display: flex; align-items: center; gap: 6px; }
.rv-contact-item::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--rv); flex-shrink: 0; opacity: .7; }
.rv-rule { height: 2.5px; background: var(--rv); border-radius: 2px; margin-top: 18px; opacity: .9; }

.rv-sec { padding: 15px 46px; border-bottom: 1px solid #EEF1F7; }
.rv-sec:last-child { border-bottom: none; }
.rv-sec-label { font-family: 'Inter', sans-serif; font-size: 8.5px; font-weight: 700; letter-spacing: 2.2px; text-transform: uppercase; color: var(--rv); border-bottom: 1.5px solid var(--rv); padding-bottom: 6px; margin-bottom: 11px; opacity: .9; }
.rv-summary { font-size: 10.5pt; line-height: 1.7; color: #374151; }
.rv-skills-row { display: flex; flex-wrap: wrap; font-family: 'Inter', sans-serif; font-size: 9px; color: #475569; }
.rv-skill-chip { padding: 1px 11px; border-right: 1px solid #CBD5E1; line-height: 2; }
.rv-skill-chip:last-child { border-right: none; }

.rv-comp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 30px; }
.rv-comp-title { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 9.5px; color: var(--rv); }
.rv-comp-desc  { font-family: 'Inter', sans-serif; font-size: 9px; color: #4B5563; line-height: 1.55; margin-top: 2px; }

.rv-exp-entry { margin-bottom: 14px; }
.rv-exp-entry:last-child { margin-bottom: 0; }
.rv-exp-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rv-exp-title { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 10.5px; color: #0F172A; }
.rv-exp-dates { font-family: 'Inter', sans-serif; font-size: 9px; color: #94A3B8; white-space: nowrap; }
.rv-exp-co    { font-family: 'Inter', sans-serif; font-style: italic; font-size: 10px; color: var(--rv); margin-top: 2px; opacity: .85; }
.rv-exp-bullets { padding-left: 15px; margin-top: 5px; font-size: 10pt; color: #374151; line-height: 1.65; }
.rv-exp-bullets li { margin-bottom: 2px; }

.rv-edu-entry { margin-bottom: 10px; }
.rv-edu-row   { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.rv-edu-degree { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 10.5px; }
.rv-edu-year   { font-family: 'Inter', sans-serif; font-size: 9px; color: #94A3B8; white-space: nowrap; }
.rv-edu-school { font-family: 'Inter', sans-serif; font-style: italic; font-size: 9.5px; color: var(--rv); opacity: .8; }
.rv-edu-honors { font-family: 'Inter', sans-serif; font-size: 9px; color: #64748B; margin-top: 1px; }

.rv-add-entry { margin-bottom: 8px; }
.rv-add-row   { display: flex; justify-content: space-between; align-items: baseline; }
.rv-add-title { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 10.5px; }
.rv-add-dates { font-family: 'Inter', sans-serif; font-size: 9px; color: #94A3B8; }
.rv-add-org   { font-family: 'Inter', sans-serif; font-style: italic; font-size: 9.5px; color: var(--rv); opacity: .8; }

.rv-cert-entry, .rv-pub-entry { font-family: 'Inter', sans-serif; font-size: 10px; color: #374151; margin-bottom: 5px; }
.rv-cert-name   { font-weight: 700; color: #0F172A; }
.rv-cert-issuer { color: #64748B; }
.rv-lang-wrap   { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.rv-lang-entry  { font-family: 'Inter', sans-serif; font-size: 10px; }
.rv-lang-name   { font-weight: 700; color: #0F172A; }
.rv-lang-level  { color: #64748B; }

/* ── Modern template ── */
.rb-page.tmpl-modern .rv-header { background: var(--rv); padding-bottom: 26px; }
.tmpl-modern .rv-name { color: #fff; }
.tmpl-modern .rv-title { color: rgba(255,255,255,.65); }
.tmpl-modern .rv-contacts { color: rgba(255,255,255,.75); }
.tmpl-modern .rv-contact-item::before { background: rgba(255,255,255,.5); }
.tmpl-modern .rv-rule { background: rgba(255,255,255,.2); }

/* ── Classic template ── */
.rb-page.tmpl-classic .rv-header { text-align: center; border-bottom: 2px solid var(--rv); padding-bottom: 20px; }
.tmpl-classic .rv-name { font-size: 32px; letter-spacing: 3px; text-transform: uppercase; font-weight: 400; }
.tmpl-classic .rv-contacts { justify-content: center; }
.tmpl-classic .rv-rule { display: none; }


/* ============================================================
   STATUS BAR
   ============================================================ */
.rb-statusbar { padding: 5px 24px; font-size: 12px; color: var(--subtle); background: var(--white); border-top: 1px solid var(--border); min-height: 26px; font-family: var(--ui); transition: color .2s; }
.rb-statusbar.ok   { color: var(--ok); }
.rb-statusbar.err  { color: var(--err); }
.rb-statusbar.info { color: var(--a2); }


/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes slideDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
@keyframes popIn     { from { transform:scale(.8); opacity:0; }        to { transform:scale(1); opacity:1; } }


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) { .rb-workspace { grid-template-columns: 160px 1fr 48%; } }
@media (max-width: 980px) {
  .rb-workspace { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; height: auto; }
  .rb-sidenav { flex-direction: row; border-right: none; border-bottom: 1px solid var(--border); padding: 0; overflow-x: auto; scrollbar-width: none; }
  .rb-navbtn  { border-left: none !important; border-bottom: 3px solid transparent; padding: 10px 14px; }
  .rb-navbtn.active { border-bottom-color: var(--a) !important; }
  .rb-nav-colors { display: none; }
  .rb-form-panel { border-right: none; }
  .rb-preview-panel { min-height: 600px; }
  .rv-comp-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .rb-line-row { flex-direction: column; gap: 20px; }
  .rb-step-intro { padding: 22px 24px 16px; }
  .rb-line-form { padding: 20px 24px; }
  .rb-step-footer { padding: 16px 24px; }
  .rv-header { padding: 20px 22px 16px; }
  .rv-sec { padding: 12px 22px; }
  .rb-tmpl-group { display: none; }
}


/* ============================================================
   PRINT
   ============================================================ */
@media print {
  body > * { display: none !important; }
  #rbp { display: block !important; width: 100% !important; left: 0 !important; margin: 0 !important; }
  .rb-bar, .rb-sidenav, .rb-form-panel, .rb-preview-chrome, .rb-statusbar { display: none !important; }
  .rb-workspace { display: block !important; height: auto !important; }
  .rb-preview-panel { display: block !important; height: auto !important; overflow: visible !important; background: #fff !important; }
  .rb-preview-scroll { padding: 0 !important; display: block !important; }
  .rb-page { box-shadow: none !important; max-width: 100% !important; }
}

/* ============================================================
   UX DESIGN REFRESH — v3.3 Premium Builder Layout
   Cleaner app shell, stronger hierarchy, better spacing/responsive
   ============================================================ */
#rbp {
  --bg: #eef2f7;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --border: #d9e2ec;
  --ink: #102033;
  --muted: #68788a;
  --subtle: #9aa8b6;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(26,53,87,.10), transparent 34rem),
    linear-gradient(135deg, #f7f9fc 0%, #e9eef6 100%);
}

.rb-bar {
  height: 64px;
  padding: 0 clamp(18px, 2vw, 34px);
  background: rgba(16, 32, 51, .96);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(16, 32, 51, .20);
}
.rb-bar-name { font-size: 15px; letter-spacing: .01em; }
.rb-bar-icon { opacity: .85; color: #fff; }
.rb-tmpl-group { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.10); }
.rb-tmpl { padding: 7px 16px; }
.rb-tmpl.active { background: #fff; color: var(--a); box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.rb-btn-ghost, .rb-btn-solid { border-radius: 999px; }
.rb-btn-solid { padding-inline: 20px; }

.rb-workspace {
  grid-template-columns: 96px minmax(420px, 500px) minmax(520px, 1fr);
  height: calc(100vh - 64px);
  gap: 18px;
  padding: 18px;
  overflow: hidden;
}

.rb-sidenav,
.rb-form-panel,
.rb-preview-panel {
  border: 1px solid rgba(217,226,236,.9);
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(16,32,51,.08);
  overflow: hidden;
}

.rb-sidenav {
  align-items: center;
  background: rgba(255,255,255,.88);
  padding: 18px 10px;
  gap: 8px;
  border-right: 1px solid rgba(217,226,236,.9);
}
.rb-navbtn {
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border-left: none;
  border-radius: 18px;
  position: relative;
}
.rb-navbtn.active { background: var(--a-faint); border-left-color: transparent; }
.rb-navdot {
  width: 34px;
  height: 34px;
  font-size: 12px;
  background: #fff;
}
.rb-navlabel {
  position: absolute;
  left: 66px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  background: #102033;
  color: #fff !important;
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(16,32,51,.22);
  z-index: 20;
}
.rb-navbtn:hover .rb-navlabel { opacity: 1; }
.rb-nav-colors {
  margin: auto 0 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.rb-nav-colors-title { text-align: center; }
.rb-swatches { justify-content: center; }

.rb-form-panel { background: rgba(255,255,255,.94); border-right: 1px solid rgba(217,226,236,.9); }
.rb-step-intro {
  padding: 34px 36px 22px;
  background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
}
.rb-step-num-big {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ui);
  font-weight: 700;
  color: var(--a);
  letter-spacing: .14em;
}
.rb-step-num-big::after {
  content: '';
  display: block;
  width: 34px;
  height: 1px;
  background: var(--a-soft);
}
.rb-step-intro h2 { font-size: 25px; letter-spacing: -.035em; }
.rb-step-intro p { max-width: 56ch; }
.rb-line-form { padding: 30px 36px 28px; gap: 22px; }
.rb-line-row { gap: 22px; }
.rb-line-field {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px 8px;
  flex-direction: column;
  box-shadow: 0 1px 0 rgba(16,32,51,.03);
}
.rb-line-field:focus-within {
  border-color: var(--a);
  box-shadow: 0 0 0 4px var(--a-faint);
}
.rb-line-field label { order: -1; padding-bottom: 0; }
.rb-line-field input,
.rb-line-field textarea,
.rb-line-field select { padding: 7px 0 0; }
.rb-line-field-tall textarea { min-height: 120px; }
.rb-card, .rb-jd-block, .rb-tip-inline, .rb-tag-zone, .rb-ats-card, .rb-save-note {
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(16,32,51,.05);
}
.rb-card { background: #fff; padding: 22px; }
.rb-add-row-btn { border-radius: 16px; padding: 15px 18px; justify-content: center; }
.rb-step-footer { padding: 18px 36px; background: rgba(255,255,255,.96); }
.rb-continue { border-radius: 999px; padding: 14px 24px; }

.rb-preview-panel {
  background:
    linear-gradient(180deg, rgba(255,255,255,.40), rgba(255,255,255,.05)),
    #cfd9e8;
}
.rb-preview-chrome {
  padding: 12px 22px;
  background: rgba(255,255,255,.88);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rb-preview-chrome::after {
  content: '8.5 × 11 in';
  font-size: 10px;
  font-weight: 600;
  color: var(--subtle);
  letter-spacing: .08em;
}
.rb-preview-scroll { padding: 34px 26px; align-items: flex-start; }
.rb-page {
  max-width: 760px;
  min-height: 984px;
  transform-origin: top center;
  border-radius: 2px;
  box-shadow: 0 28px 80px rgba(16,32,51,.24), 0 2px 8px rgba(16,32,51,.10);
}

@media (max-width: 1180px) {
  .rb-workspace { grid-template-columns: 84px minmax(390px, 470px) minmax(420px, 1fr); gap: 14px; padding: 14px; }
  .rb-page { transform: scale(.92); }
}
@media (max-width: 980px) {
  .rb-workspace { display: flex; flex-direction: column; height: auto; min-height: calc(100vh - 64px); overflow: visible; }
  .rb-sidenav { flex-direction: row; justify-content: flex-start; min-height: 78px; padding: 10px; overflow-x: auto; }
  .rb-navbtn { flex: 0 0 54px; }
  .rb-navlabel { display: none; }
  .rb-nav-colors { display: none; }
  .rb-form-panel, .rb-preview-panel { min-height: 620px; }
  .rb-page { transform: none; }
}
@media (max-width: 640px) {
  .rb-bar { flex-wrap: wrap; height: auto; min-height: 64px; padding-block: 10px; }
  .rb-bar-l, .rb-bar-r { width: 100%; justify-content: space-between; }
  .rb-workspace { padding: 10px; gap: 10px; }
  .rb-sidenav, .rb-form-panel, .rb-preview-panel { border-radius: 18px; }
  .rb-step-intro, .rb-line-form, .rb-step-footer { padding-left: 20px; padding-right: 20px; }
  .rb-line-field { padding: 10px 12px 8px; }
}
