/* ===========================================
   LAYOUT STYLES — APP CHROME ONLY
   Template styles live in:
     template-1.css  template-2.css
     template-3.css  template-4.css
   =========================================== */

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

   body {
     font-family: 'Inter', sans-serif;
     background: #f9fafb;
     min-height: 100vh;
     overflow: hidden;
   }
   
   /* ── Main Layout ─────────────────────────────────────────────────── */
   
   .main-layout { display: flex; height: calc(100vh - 72px); }
   
   .left-panel {
     width: 40%; display: flex; flex-direction: column;
     background: white; border-right: 1px solid #e5e7eb;
   }
   
   .left-content { display: flex; flex: 1; overflow: hidden; }
   
   /* ── Nav Panel ───────────────────────────────────────────────────── */
   
   .nav-panel {
     background: #ffffff; border-right: 1px solid #e2e8f0;
     box-shadow: 2px 0 12px rgba(0,0,0,0.05);
     width: 220px; display: flex; flex-direction: column; flex-shrink: 0;
   }
   
   .nav-header { padding: 20px 16px; border-bottom: 1px solid #f1f5f9; }
   
   .nav-header h3 {
     font-size: 13px; font-weight: 700; color: #0f172a; letter-spacing: -0.02em;
   }
   
   .nav-status {
     font-size: 11px; font-weight: 600; color: #059669;
     background: #f0fdf4; border: 1px solid #d1fae5;
     border-radius: 20px; padding: 2px 10px;
     display: inline-block; margin-top: 6px;
   }
   
   .nav-menu {
     padding: 8px 0; display: flex; flex-direction: column;
     gap: 0; flex: 1; overflow-y: auto;
   }
   
   .nav-item {
     display: flex; flex-direction: row; align-items: center;
     gap: 12px; padding: 13px 20px;
     border-radius: 0; text-decoration: none; color: #64748b;
     transition: all 0.2s ease; border: none;
     border-left: 4px solid transparent;
     background: transparent; cursor: pointer;
     border-bottom: 1px solid #f8fafc;
   }
   
   .nav-item:hover { background: #f8fafc; border-left-color: #cbd5e1; color: #374151; }
   .nav-item.active { background: #f0fdf4; border-left-color: #10b981; color: #047857; }
   .nav-item.active .nav-text { color: #047857; font-weight: 700; }
   
   .nav-icon {
     font-size: 0; width: 36px; height: 36px; min-width: 36px;
     border-radius: 8px; background: #f1f5f9;
     display: flex; align-items: center; justify-content: center;
     flex-shrink: 0; transition: background 0.2s ease;
   }
   
   .nav-item.active .nav-icon { background: rgba(16,185,129,0.1); }
   
   .nav-icon::before {
     content: ''; display: block; width: 18px; height: 18px;
     background-color: #64748b; transition: background-color 0.2s ease;
     -webkit-mask-size: contain; -webkit-mask-repeat: no-repeat; -webkit-mask-position: center;
     mask-size: contain; mask-repeat: no-repeat; mask-position: center;
   }
   
   .nav-item:hover  .nav-icon::before { background-color: #475569; }
   .nav-item.active .nav-icon::before { background-color: #10b981; }
   
   /* Nav SVG icon masks */
   .nav-item:nth-child(1) .nav-icon::before {
     -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
     mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
   }
   .nav-item:nth-child(2) .nav-icon::before {
     -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cline x1='10' y1='9' x2='8' y2='9'/%3E%3C/svg%3E");
     mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cline x1='10' y1='9' x2='8' y2='9'/%3E%3C/svg%3E");
   }
   .nav-item:nth-child(3) .nav-icon::before {
     -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='7' width='20' height='14' rx='2' ry='2'/%3E%3Cpath d='M16 7V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2'/%3E%3Cline x1='8' y1='12' x2='16' y2='12'/%3E%3C/svg%3E");
     mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='7' width='20' height='14' rx='2' ry='2'/%3E%3Cpath d='M16 7V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2'/%3E%3Cline x1='8' y1='12' x2='16' y2='12'/%3E%3C/svg%3E");
   }
   .nav-item:nth-child(4) .nav-icon::before {
     -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 22 8.5 12 15 2 8.5 12 2'/%3E%3Cpath d='M6 11.5v5.5a6 6 0 0 0 12 0v-5.5'/%3E%3Cline x1='22' y1='8.5' x2='22' y2='14'/%3E%3C/svg%3E");
     mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 22 8.5 12 15 2 8.5 12 2'/%3E%3Cpath d='M6 11.5v5.5a6 6 0 0 0 12 0v-5.5'/%3E%3Cline x1='22' y1='8.5' x2='22' y2='14'/%3E%3C/svg%3E");
   }
   .nav-item:nth-child(5) .nav-icon::before {
     -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E");
     mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E");
   }
   
   .nav-text {
     font-size: 13px; font-weight: 600; color: #374151;
     line-height: 1.3; letter-spacing: -0.01em; transition: color 0.2s ease;
   }
   
   .nav-subtext { display: none; }
   
   .nav-footer { padding: 16px; border-top: 1px solid #f1f5f9; }
   
   .completion-bar {
     height: 5px; background: #f1f5f9; border-radius: 99px;
     overflow: hidden; margin-bottom: 10px;
   }
   
   .completion-fill {
     height: 100%; background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
     border-radius: 99px; transition: width 0.4s cubic-bezier(0.16,1,0.3,1);
     box-shadow: 0 0 8px rgba(16,185,129,0.4);
   }
   
   /* ── Form Panel ──────────────────────────────────────────────────── */
   
   .form-panel { flex: 1; padding: 20px; overflow-y: auto; }
   .form-panel::-webkit-scrollbar { width: 6px; }
   .form-panel::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }
   .form-panel::-webkit-scrollbar-thumb { background: #00b4d8; border-radius: 3px; }
   
   .form-section { margin-bottom: 24px; padding-bottom: 24px; display: none; }
   .form-section.active { display: block; }
   .form-section:last-child { border-bottom: none; margin-bottom: 0; }
   
   .form-section h2 {
     font-size: 10px; font-weight: 700; color: #8590a0;
     margin: 20px 0 40px 0; display: flex; align-items: center;
     gap: 8px; font-style: italic;
   }
   .form-section h2::before {
     content: ''; width: 4px; height: 18px;
     background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
     border-radius: 2px;
   }
   
   .form-group { margin-bottom: 16px; }
   .form-group label { display: block; font-size: 12px; color: #6b7280; margin-bottom: 6px; }
   
   .form-group input,
   .form-group textarea,
   .form-group select {
     width: 100%; padding: 10px;
     border: 1px solid #e5e7eb; border-radius: 6px;
     font-size: 13px; font-family: 'Inter', sans-serif;
     transition: border-color 0.3s;
   }
   
   .form-group input:focus,
   .form-group textarea:focus,
   .form-group select:focus { outline: none; border-color: #00b4d8; }
   
   .form-group textarea { resize: vertical; min-height: 70px; line-height: 1.4; overflow: hidden !important; }
   
   .char-count { font-size: 10px; color: #6b7280; text-align: right; margin-top: 4px; }
   .char-count.warning { color: #ef4444; font-weight: 600; }
   
   .form-row   { display: grid; grid-template-columns: 1fr 1fr;     gap: 8px; }
   .form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
   
   .repeater-item {
     background: #f9fafb; padding: 12px; border-radius: 6px;
     margin-bottom: 8px; position: relative; border: 1px solid #e5e7eb;
   }
   .repeater-item h4 { font-size: 13px; font-weight: 600; color: #1f2937; margin-bottom: 8px; }
   
   .remove-btn {
     position: absolute; top: 12px; right: 12px;
     background: #ef4444; color: white; border: none;
     width: 20px; height: 20px; border-radius: 50%;
     cursor: pointer; font-size: 14px; line-height: 1;
   }
   .remove-btn:hover { background: #dc2626; }
   
   .add-btn {
     width: 100%; padding: 8px;
     background: #f3f4f6; border: 1px dashed #d1d5db;
     border-radius: 6px; color: #6b7280; font-weight: 600;
     cursor: pointer; transition: all 0.3s; font-size: 13px;
   }
   .add-btn:hover { background: #e5e7eb; border-color: #00b4d8; color: #0077b6; }
   
   .checkbox-group { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
   .checkbox-group input[type="checkbox"] { width: 14px; height: 14px; }
   .checkbox-group label { margin: 0; font-size: 12px; color: #1f2937; }
   
   .bullet-hint { font-size: 11px; color: #6b7280; margin-top: 4px; }
   .bullet-hint code { background: #f3f4f6; padding: 1px 4px; border-radius: 3px; font-family: monospace; }
   
   /* ── Preview Panel ───────────────────────────────────────────────── */
   
   .preview-panel {
     width: 60%; background: #eceff1;
     display: flex; flex-direction: column; overflow: hidden;
   }
   
   .preview-content { flex: 1; padding: 20px; overflow-y: auto; position: relative; }
   .preview-content::-webkit-scrollbar { width: 8px; }
   .preview-content::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
   .preview-content::-webkit-scrollbar-thumb { background: #00b4d8; border-radius: 4px; }
   
   /* ── Resume Page Frame (shared by all templates) ─────────────────── */
   
   .resume-page {
     background: white;
     box-shadow: 0 4px 24px rgba(0,0,0,0.14);
     position: relative; overflow: hidden;
     box-sizing: border-box; margin-bottom: 40px; flex-shrink: 0;
   }
   
   .resume-page.a4 {
     width: 794px; height: 1123px;
     min-height: 1123px; max-height: 1123px;
   }
   
   .resume-page.letter {
     width: 816px; height: 1056px;
     min-height: 1056px; max-height: 1056px;
   }
   
   .page-content {
     padding: 57px; box-sizing: border-box;
     width: 100%; height: 100%; overflow: hidden;
   }
   
   /* Critical — prevents date bleeding on all templates */
   .item-header {
     display: flex; justify-content: space-between;
     align-items: baseline; margin-bottom: 2pt;
     width: 100%; box-sizing: border-box;
   }
   .item-header > div:first-child { flex: 1; min-width: 0; }
   
   /* Empty state */
   .empty-state {
     text-align: center; color: #6b7280;
     padding: 100px 30px; background: white;
     border-radius: 12px; margin: 20px;
   }
   .empty-state h3 { font-size: 16px; color: #6b7280; margin-bottom: 8px; }
   .empty-state p  { font-size: 13px; }
   
   /* ── Responsive ──────────────────────────────────────────────────── */
   
   @media (max-width: 1200px) {
     .main-layout { flex-direction: column; }
     .left-panel  { width: 100%; height: 60vh; }
     .preview-panel { width: 100%; height: 40vh; }
     .nav-panel { width: 200px; }
   }
   
   @media (max-width: 768px) {
     .left-content { flex-direction: column; }
     .nav-panel { display: none; }
   }
/* Job bullets as a real "•" character instead of a drawn dot. Chrome draws a
   disc marker as a shape, so the PDF's text had no bullet marks at all; with a
   text marker every reader (and ATS) sees "• Monitored cargo…" per bullet.
   Same look as the disc, in every template. */
.resume-page .achievement-list > li { list-style-type: "\2022\00a0\00a0"; }

/* ── Grouped skills (js/skills-format.js): one line per group, the name in bold.
      Every template uses these; a template can restyle them under its own class. ── */
.resume-page .skill-groups { font-size: inherit; line-height: 1.5; }
.resume-page .skill-groups .skill-group { margin: 0 0 2pt 0; }
.resume-page .skill-groups .skill-group:last-child { margin-bottom: 0; }
.resume-page .skill-groups .skill-group-label { font-weight: 700; }
.resume-page.template-9 .skill-groups { text-align: center; }
.resume-page.template-18 .skill-groups .skill-group-label { font-weight: 600; }
