/* Company Profile Generator – rcgen-style.css v2.3 (plugin v1.0.0) */
/* Scoped ke #rcgen — tidak konflik dengan tema WP */

#rcgen *, #rcgen *::before, #rcgen *::after { box-sizing: border-box; }
#rcgen { margin: 0; padding: 0; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; line-height: 1.5; font-size: 15px; color: #1e293b; }
#rcgen ::placeholder { color: #c8d0dc; opacity: 1; }

/* ── WRAPPER ── */
#rcgen .cg-wrap { max-width: 1200px; margin: 0 auto; background: white; border-radius: 0; box-shadow: 0 4px 24px rgba(0,0,0,0.07); overflow: hidden; }

/* ── HEADER ── */
#rcgen .cg-header { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); padding: 22px 28px; text-align: center; }
#rcgen .cg-header h1 { font-size: 1.35rem; font-weight: 700; margin: 0; color: #f8fafc; letter-spacing: -0.01em; }
#rcgen .cg-header p { font-size: 0.8rem; color: #94a3b8; margin: 6px 0 0; }

/* ── TABS ── */
#rcgen .cg-tabs { background: #1e293b; display: flex; width: 100%; padding: 0; overflow-x: auto; scrollbar-width: none; }
#rcgen .cg-tabs::-webkit-scrollbar { display: none; }
#rcgen .cg-tab { flex: 1; min-width: 0; padding: 10px 4px; border: none; border-right: 1px solid #334155; background: transparent; color: #64748b; font-weight: 600; cursor: pointer; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; font-family: inherit; transition: all 0.15s; text-align: center; }
#rcgen .cg-tab:last-child { border-right: none; }
#rcgen .cg-tab:hover { background: #273549; color: #94a3b8; }
#rcgen .cg-tab.active { background: #c9a84c; color: #0f172a; font-weight: 800; border-radius: 9px 9px 0 0; }
#rcgen .cg-tab.filled:not(.active) { color: #7dd3fc; background: rgba(30,58,95,0.5); }
#rcgen .cg-tab .dot { position: absolute; top: 4px; right: 4px; width: 5px; height: 5px; border-radius: 50%; background: #22c55e; }

/* ── PROGRESS BAR ── */
#rcgen .cg-progress-bar { height: 3px; background: #0f172a; }
#rcgen .cg-progress-fill { height: 100%; background: linear-gradient(90deg, #c9a84c, #f0c040); transition: width 0.3s ease; }

/* ── FORM ── */
#rcgen .cg-form { padding: 24px; }
#rcgen .cg-page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 2px solid #e2e8f0; }
#rcgen .cg-page-kicker { font-size: 10px; font-weight: 700; color: #c9a84c; text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 3px; }
#rcgen .cg-page-title { font-size: 17px; font-weight: 800; color: #0f172a; margin: 0; }
#rcgen .cg-nav-btns { display: flex; gap: 7px; flex-shrink: 0; }
#rcgen .cg-nav-btn { padding: 7px 16px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; transition: all 0.15s; }
#rcgen .cg-nav-prev { border: 1px solid #e2e8f0; background: white; color: #475569; }
#rcgen .cg-nav-prev:hover { border-color: #94a3b8; }
#rcgen .cg-nav-next { border: none; background: #0f172a; color: white; }
#rcgen .cg-nav-next:hover { background: #1e293b; }

/* ── SECTION DIVIDER ── */
#rcgen .section-divider { height: 1px; background: #e2e8f0; margin: 20px 0 16px; }
#rcgen .sub-label { font-size: 10px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 8px; }

/* ── GRID ── */
#rcgen .g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
#rcgen .g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px 16px; }
#rcgen .span2 { grid-column: span 2; }
#rcgen .span3 { grid-column: span 3; }
#rcgen .g-25-75 { display: grid; grid-template-columns: 1fr 3fr; gap: 14px 12px; }

/* ── FIELD GROUP ── */
#rcgen .fg { display: flex; flex-direction: column; }
#rcgen .fg label { font-size: 10px; font-weight: 700; color: #64748b; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.4px; }
#rcgen .fg label .req { color: #ef4444; margin-left: 2px; }
#rcgen .fg input,
#rcgen .fg textarea,
#rcgen .fg select { width: 100%; padding: 9px 11px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 0.875rem; font-family: inherit; background: #fafbfc; color: #1e293b; outline: none; transition: border-color .15s, box-shadow .15s; }
#rcgen .fg input:focus,
#rcgen .fg textarea:focus,
#rcgen .fg select:focus { border-color: #2563a8; box-shadow: 0 0 0 3px rgba(37,99,168,0.1); background: white; }
#rcgen .fg textarea { resize: vertical; }
#rcgen .fg .hint { font-size: 0.7rem; color: #94a3b8; margin-top: 3px; }
#rcgen .mg { margin-bottom: 14px; }

/* Select: kontrol tertutup rapi + opsi tidak terpotong */
#rcgen .fg select {
  height: 40px;
  line-height: normal;
  padding: 0 34px 0 11px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%2364748b' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-color: #fafbfc;
  text-overflow: ellipsis;
}
/* Opsi di dalam dropdown: beri tinggi & warna agar terbaca penuh di semua browser */
#rcgen .fg select option { line-height: 1.6; padding: 6px 8px; color: #1e293b; background: #ffffff; white-space: normal; }
#rcgen .font-select { height: 40px; padding: 0 34px 0 11px; line-height: normal; }

/* ── WEBSITE HINT ── */
#rcgen .website-hint { font-size: 0.7rem; color: #94a3b8; margin-top: 5px; }
#rcgen .website-hint a { color: #2563eb; text-decoration: none; }
#rcgen .website-hint a:hover { text-decoration: underline; }

/* ── UPLOAD ── */
#rcgen .upload-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#rcgen .upload-btn { padding: 7px 14px; background: #0f172a; color: white; border: none; border-radius: 7px; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; font-family: inherit; }
#rcgen .upload-btn:hover { background: #1e293b; }
#rcgen .upload-status { font-size: 11px; }
#rcgen .upload-status.ok { color: #059669; }
#rcgen .upload-status.empty { color: #94a3b8; }
#rcgen .upload-clear { background: none; border: none; color: #ef4444; cursor: pointer; font-size: 12px; padding: 0; }

/* ── DYNAMIC CARDS ── */
#rcgen .dyn-card { border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px; margin-bottom: 10px; background: #fafbfc; }
#rcgen .dyn-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
#rcgen .dyn-card-label { font-size: 11px; font-weight: 700; color: #475569; }
#rcgen .btn-del-card { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; padding: 0; background: none; border: none; cursor: pointer; color: #ef4444; font-size: 20px; line-height: 1; font-family: inherit; transition: color .15s, transform .12s; }
#rcgen .btn-del-card:hover { color: #dc2626; transform: scale(1.15); }
#rcgen .btn-add-card, #rcgen .btn-add-line {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: #94a3b8; background: #fafbfc;
  border: 1.5px dashed #e9edf2; border-radius: 8px; cursor: pointer;
  padding: 7px 14px; font-family: inherit; font-weight: 600; margin-top: 4px;
  transition: border-color .15s, color .15s, background .15s;
}
#rcgen .btn-add-card:hover, #rcgen .btn-add-line:hover {
  color: #2563a8; border-color: #c7d6e8; background: #f4f8ff; text-decoration: none;
}

#rcgen .icon-select { font-size: 18px; padding: 7px 8px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fafbfc; cursor: pointer; width: 100%; height: auto; min-height: 38px; line-height: 1.4; }

/* ── MISI LIST ── */
#rcgen .misi-row { display: flex; gap: 6px; margin-bottom: 7px; align-items: center; }
#rcgen .misi-row input { flex: 1; }
#rcgen .misi-del { background: none; border: none; color: #ef4444; cursor: pointer; font-size: 14px; flex-shrink: 0; }
#rcgen .btn-add-misi { font-size: 11px; color: #2563eb; background: none; border: none; cursor: pointer; padding: 0; font-family: inherit; }

/* ── CLIENT LOGOS ── */
#rcgen .logo-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
#rcgen .logo-thumb { position: relative; border: 1px solid #e2e8f0; border-radius: 6px; padding: 4px; }
#rcgen .logo-thumb img { width: 64px; height: 44px; object-fit: contain; display: block; }
#rcgen .logo-thumb .logo-del { position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; background: #ef4444; color: white; border: none; border-radius: 50%; cursor: pointer; font-size: 10px; line-height: 18px; text-align: center; padding: 0; }
#rcgen .logo-add-btn { width: 64px; height: 52px; border: 2px dashed #cbd5e1; border-radius: 6px; background: #f8fafc; cursor: pointer; color: #64748b; font-size: 22px; display: flex; align-items: center; justify-content: center; }
#rcgen .logo-add-btn:hover { border-color: #94a3b8; }

/* ── TOC INFO ── */
#rcgen .toc-info { background: linear-gradient(135deg, #f0f9ff, #e0f2fe); border: 1.5px dashed #7dd3fc; border-radius: 12px; padding: 28px 24px; text-align: center; }
#rcgen .toc-info .toc-icon { font-size: 36px; margin-bottom: 10px; }
#rcgen .toc-info h3 { font-size: 15px; font-weight: 800; color: #0369a1; margin: 0 0 8px; }
#rcgen .toc-info p { font-size: 12px; color: #0284c7; line-height: 1.7; margin: 0; white-space: pre-line; }

/* ── STYLING PANEL ── */
#rcgen .template-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 14px; }
#rcgen .tpl-btn { border: 2px solid #e2e8f0; border-radius: 8px; padding: 8px 3px; cursor: pointer; background: white; text-align: center; transition: all .15s; }
#rcgen .tpl-btn:hover { border-color: #94a3b8; }
#rcgen .tpl-btn.active { border-color: #0f172a; background: #f0f9ff; }
#rcgen .tpl-dots { display: flex; justify-content: center; gap: 3px; margin-bottom: 5px; }
#rcgen .tpl-dot { width: 13px; height: 13px; border-radius: 50%; }
#rcgen .tpl-label { font-size: 9px; font-weight: 700; color: #475569; }
#rcgen .color-row { display: flex; gap: 8px; align-items: center; }
#rcgen .color-row input[type="color"] { width: 40px; height: 38px; border: 1px solid #e2e8f0; border-radius: 7px; cursor: pointer; padding: 2px; flex-shrink: 0; }
#rcgen .pattern-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
#rcgen .pat-btn { padding: 8px; border: 1px solid #e2e8f0; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 500; background: white; color: #475569; transition: all .15s; font-family: inherit; }
#rcgen .pat-btn:hover { border-color: #94a3b8; }
#rcgen .pat-btn.active { background: #0f172a; color: white; border-color: #0f172a; }

#rcgen .range-box { border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 12px; background: #fafbfc; }
#rcgen input[type="range"] { accent-color: #0f172a; cursor: pointer; width: 100%; display: block; }

/* ── ACTION BUTTON ── */
#rcgen .cg-actions { display: flex; gap: 10px; margin-top: 20px; padding-top: 20px; border-top: 2px solid #e2e8f0; }
#rcgen .btn-gen-pdf { flex: 1; padding: 13px 20px; border: none; border-radius: 10px; background: linear-gradient(135deg, #1a2744, #2563a8); color: white; font-weight: 800; font-size: 14px; cursor: pointer; font-family: inherit; letter-spacing: 0.02em; transition: filter .15s, transform .1s; box-shadow: 0 4px 16px rgba(37,99,168,0.35); }
#rcgen .btn-gen-pdf:hover { filter: brightness(1.1); transform: translateY(-1px); }
#rcgen .btn-gen-pdf:active { transform: translateY(0); }
#rcgen .btn-gen-pdf:disabled { background: #94a3b8; cursor: not-allowed; box-shadow: none; transform: none; }

/* ── QUICK GENERATE BAR ── */
#rcgen .quick-gen { background: rgba(201,168,76,0.1); border: 1px solid rgba(201,168,76,0.25); border-radius: 10px; padding: 10px 18px; margin: 0 24px 20px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: nowrap; }
#rcgen .quick-gen span { font-size: 12px; color: #b8861e; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#rcgen .quick-gen button { padding: 7px 16px; border: none; border-radius: 7px; background: #c9a84c; color: #0f172a; font-weight: 800; font-size: 12px; cursor: pointer; font-family: inherit; white-space: nowrap; flex-shrink: 0; }
#rcgen .quick-gen button:disabled { background: #94a3b8; cursor: not-allowed; color: white; }

/* ── STATUS ── */
#rcgen .cg-status { margin-top: 12px; padding: 10px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; text-align: center; display: none; }
#rcgen .cg-status.show { display: block; }
#rcgen .cg-status.info { background: #f0f9ff; color: #0369a1; }
#rcgen .cg-status.success { background: #f0fdf4; color: #15803d; }
#rcgen .cg-status.error { background: #fef2f2; color: #dc2626; }

/* ── FOOTER ── */
#rcgen .cg-footer { border-top: 1px solid #e2e8f0; padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; }
#rcgen .reset-btn { background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 12px; font-family: inherit; }
#rcgen .reset-btn:hover { color: #ef4444; }
#rcgen .draft-note { font-size: 11px; color: #94a3b8; }

/* ── ENGAGEMENT ── */
#rcgen .engage-section { margin: 0 24px 24px; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px 24px; background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); text-align: center; }
#rcgen .engage-title { font-size: 0.92rem; font-weight: 700; color: #0f172a; margin-bottom: 16px; }
#rcgen .engage-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; }
#rcgen .engage-col { background: white; border-radius: 10px; padding: 16px; border: 1px solid #e2e8f0; display: flex; flex-direction: column; justify-content: center; }
#rcgen .engage-col-title { font-size: 0.78rem; font-weight: 700; color: #475569; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.3px; }
#rcgen .rating-placeholder { background: #f8fafc; border: 2px dashed #e2e8f0; border-radius: 8px; padding: 8px 16px; font-size: 0.75rem; color: #94a3b8; display: flex; align-items: center; justify-content: flex-start; text-align: left; min-height: 70px; }
#rcgen .rating-placeholder .rmp-rating-widget,
#rcgen .rating-placeholder .rmp-rating-wrapper { text-align: left !important; margin-left: 0 !important; }
#rcgen .engage-hint { font-size: 0.72rem; color: #94a3b8; }
#rcgen .share-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
#rcgen .share-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 9px 8px; border-radius: 8px; border: 1px solid #d1d5db; font-size: 0.78rem; font-weight: 600; cursor: pointer; text-decoration: none; font-family: inherit; background: #f1f5f9; color: #475569; transition: background .15s, color .15s, border-color .15s, transform .1s; }
#rcgen .share-btn:hover { background: #334155; color: white; border-color: #334155; transform: translateY(-1px); }
#rcgen .engage-tools-hint { text-align: center; margin-top: 10px; }
#rcgen .ext-hint { font-weight: 500; color: #94a3b8; text-transform: none; letter-spacing: 0; font-size: 10px; }
@media (max-width: 700px){
  #rcgen .engage-cols { grid-template-columns: 1fr; }
}

/* Info hint — style sama seperti upload hint */
#rcgen .info-hint {
  font-size: 0.7rem;
  color: #94a3b8;
  margin: 0 0 12px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

/* Website hint — samakan dengan .hint */
#rcgen .website-hint {
  font-size: 0.7rem !important;
  color: #94a3b8 !important;
  margin-top: 4px;
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}
#rcgen .website-hint b { font-weight: 600; color: #64748b; }
#rcgen .website-hint a { color: #2563eb; text-decoration: none; font-weight: 400; }
#rcgen .website-hint a:hover { text-decoration: underline; }

/* Footer: draft kiri, reset kanan */
#rcgen .cg-footer {
  flex-direction: row !important;
  justify-content: space-between !important;
}

/* Jabatan di struktur — read-only display */
#rcgen .role-display {
  padding: 9px 11px;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  font-size: 0.875rem;
  background: #f8fafc;
  color: #94a3b8;
  font-style: italic;
  min-height: 38px;
  display: flex;
  align-items: center;
}

/* Rating wrapper — pastikan terlihat dan tidak ter-override */
#rcgen-rating-wrap { display: block !important; }
#rcgen .engage-col .rmp-rating-wrapper { margin: 0; }

/* Range box height — sama dengan font-select */
#rcgen .range-box {
  display: flex;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 20px;
  background: #fafbfc;
  height: 38px;
  min-height: 38px;
}
#rcgen .range-box input[type="range"] {
  width: 100%;
  margin: 0;
}

/* Mobile fixes */
@media (max-width: 700px) {
  /* kontak: website full width */
  #rcgen .contact-website { grid-column: span 2; }
  /* facebook hidden di mobile */
  #rcgen .contact-facebook { display: none !important; }
  /* whatsapp & email tetap terlihat — override jika ada display:none */
  #rcgen .contact-phone,
  #rcgen .contact-email { display: flex !important; }
}

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  #rcgen .cg-form { padding: 14px; }
  #rcgen .g2 { grid-template-columns: 1fr 1fr; }
  #rcgen .g3 { grid-template-columns: 1fr 1fr; }
  #rcgen .span2 { grid-column: span 2; }
  #rcgen .g-25-75 { grid-template-columns: 1fr 3fr; }
  #rcgen .template-grid { grid-template-columns: repeat(3, 1fr); }
  #rcgen .engage-section { margin: 0 14px 20px; }
  #rcgen .engage-cols { grid-template-columns: 1fr 1fr; }
  #rcgen .quick-gen { margin: 0 14px 16px; padding: 8px 12px; }
  #rcgen .quick-gen span { font-size: 11px; }
  #rcgen .cg-footer { display: flex; flex-direction: row; justify-content: space-between; align-items: center; padding: 12px 14px; }
  
  /* Mobile: Website full width, YouTube + Instagram grid, LinkedIn + TikTok grid */
  #rcgen .contact-website { grid-column: span 2; }
  #rcgen .contact-facebook { display: none !important; }
}

@media (max-width: 500px) {
  #rcgen .g2 { grid-template-columns: 1fr 1fr; }
  #rcgen .g3 { grid-template-columns: 1fr; }
  #rcgen .span2 { grid-column: span 2; }
  #rcgen .cg-tab { font-size: 9px; padding: 8px 2px; }
  #rcgen .template-grid { grid-template-columns: repeat(3, 1fr); }
  #rcgen .pattern-grid { grid-template-columns: repeat(2, 1fr); }
  #rcgen .engage-cols { grid-template-columns: 1fr; }
  #rcgen .g2.media-grid { grid-template-columns: 1fr 1fr; }
  #rcgen .quick-gen { gap: 6px; }
  #rcgen .quick-gen span { font-size: 10px; }
  #rcgen .quick-gen button { padding: 7px 10px; font-size: 11px; }
  #rcgen .engage-cols .share-btns { grid-template-columns: repeat(3, 1fr) !important; }
  
  /* Mobile contact layout */
  #rcgen .contact-website { grid-column: span 2; }
  #rcgen .contact-facebook { display: none !important; }
}

@media (max-width: 380px) {
  #rcgen .cg-tab { font-size: 8px; }
  #rcgen .cg-nav-btn { padding: 6px 10px; font-size: 11px; }
  #rcgen .template-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── v1.1.3: Contact closing extra spacing ── */
#rcgen .contact-closing-spaced { margin-top: 22px; }

/* ── v1.1.3: Footer link (Riwayat) ── */
#rcgen .history-link { font-size: 12px; color: #2563eb; text-decoration: none; font-weight: 600; }
#rcgen .history-link:hover { text-decoration: underline; color: #1d4ed8; }

/* ── v1.1.3: MODAL (history + qris) ── */
#rcgen .cg-modal { position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center; padding: 16px; }
#rcgen .cg-modal[hidden] { display: none !important; }
#rcgen .cg-modal-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,0.62); backdrop-filter: blur(2px); }
#rcgen .cg-modal-box { position: relative; background: #fff; border-radius: 14px; max-width: 560px; width: 100%; max-height: 90vh; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.35); display: flex; flex-direction: column; animation: cpgenModalIn .18s ease-out; }
@keyframes cpgenModalIn { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
#rcgen .cg-modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 20px; border-bottom: 1px solid #e2e8f0; background: linear-gradient(135deg, #f8fafc, #f1f5f9); }
#rcgen .cg-modal-head h3 { margin: 0; font-size: 15px; font-weight: 800; color: #0f172a; line-height: 1.35; }
#rcgen .cg-modal-close { background: none; border: none; font-size: 26px; line-height: 1; color: #94a3b8; cursor: pointer; padding: 0 4px; font-family: inherit; }
#rcgen .cg-modal-close:hover { color: #0f172a; }
#rcgen .cg-modal-body { padding: 18px 20px 20px; overflow-y: auto; }
#rcgen .cg-modal-sub { font-size: 12px; color: #64748b; margin: 0 0 12px; }

/* History list */
#rcgen .history-list { display: flex; flex-direction: column; gap: 8px; }
#rcgen .history-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fafbfc; }
#rcgen .history-info { min-width: 0; flex: 1; }
#rcgen .history-name { font-size: 13px; font-weight: 700; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#rcgen .history-meta { font-size: 11px; color: #94a3b8; margin-top: 2px; }
#rcgen .history-actions { display: flex; gap: 6px; flex-shrink: 0; }
#rcgen .history-btn { padding: 6px 10px; border-radius: 7px; border: 1px solid #e2e8f0; background: #fff; color: #334155; font-size: 11px; font-weight: 700; cursor: pointer; font-family: inherit; }
#rcgen .history-btn.primary { background: #0f172a; color: #fff; border-color: #0f172a; }
#rcgen .history-btn.primary:hover { background: #1e293b; }
#rcgen .history-btn.danger { color: #dc2626; }
#rcgen .history-btn.danger:hover { background: #fee2e2; }
#rcgen .history-empty { text-align: center; padding: 30px 10px; color: #94a3b8; font-size: 13px; }
#rcgen .history-hint { margin-top: 14px !important; text-align: center; }

/* QRIS Modal */
#rcgen .cg-modal-qris { max-width: 420px; }
#rcgen .qris-body { text-align: center; }
#rcgen .qris-wrap { position: relative; display: inline-block; margin: 4px auto 14px; }
#rcgen .qris-img { width: 100%; max-width: 280px; height: auto; display: block; border-radius: 10px; border: 1px solid #e2e8f0; background: #fff; }
#rcgen .qris-download { position: absolute; bottom: 10px; right: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: #0f172a; color: #fff; font-size: 12px; font-weight: 700; text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,0.25); transition: transform .12s, background .15s; }
#rcgen .qris-download:hover { background: #c9a84c; color: #0f172a; transform: translateY(-1px); }
#rcgen .qris-note { font-size: 12px; color: #475569; line-height: 1.55; margin: 6px 0 0; }

/* ── v1.1.4: SUCCESS / THANK-YOU MODAL ── */
#rcgen .cg-modal-success { max-width: 440px; }
#rcgen .cg-modal-success .success-close { position: absolute; top: 12px; right: 14px; background: none; border: none; font-size: 26px; line-height: 1; color: #cbd5e1; cursor: pointer; padding: 0 4px; font-family: inherit; z-index: 2; }
#rcgen .cg-modal-success .success-close:hover { color: #0f172a; }
#rcgen .success-body { text-align: center; padding: 30px 26px 24px; }
#rcgen .success-emoji { font-size: 46px; line-height: 1; margin-bottom: 6px; animation: cpgenPop .35s ease-out; }
@keyframes cpgenPop { 0% { transform: scale(0.4); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
#rcgen .success-title { font-size: 19px; font-weight: 800; color: #0f172a; margin: 0 0 10px; }
#rcgen .success-desc { font-size: 13px; color: #475569; line-height: 1.6; margin: 0 0 6px; }
#rcgen .success-desc b { color: #0f172a; }
#rcgen .success-tag { display: inline-block; margin-top: 4px; font-weight: 800; color: #c9a84c; }
#rcgen .success-share-label { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.4px; margin: 20px 0 10px; }
#rcgen .success-share-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 4px; }
#rcgen .success-share-btns .share-btn { padding: 10px 6px; font-size: 0.74rem; }
#rcgen .success-share-btns .share-wa:hover { background: #25d366; border-color: #25d366; color: #fff; }
#rcgen .success-share-btns .share-tg:hover { background: #229ed9; border-color: #229ed9; color: #fff; }
#rcgen .success-share-btns .share-fb:hover { background: #1877f2; border-color: #1877f2; color: #fff; }
#rcgen .success-share-btns .share-x:hover  { background: #0f172a; border-color: #0f172a; color: #fff; }
#rcgen .success-share-btns .share-li:hover { background: #0a66c2; border-color: #0a66c2; color: #fff; }
#rcgen .success-dismiss { margin-top: 16px; background: none; border: none; color: #94a3b8; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; }
#rcgen .success-dismiss:hover { color: #0f172a; }
@media (max-width: 460px){
#rcgen .success-share-btns { grid-template-columns: repeat(3, 1fr) !important; }
  #rcgen .success-share-btns .share-btn { padding: 9px 4px; font-size: 0.68rem; gap: 4px; }
  #rcgen .success-share-btns .share-btn svg { width: 13px; height: 13px; }
}

/* ════════════════════════════════════════════════════════════
   RESUME / CV GENERATOR — komponen tambahan (v1.0.0)
   ════════════════════════════════════════════════════════════ */

/* ── Header brand: subjudul ATS ── */
#rcgen .cg-header .ats-pill {
  display: inline-block; margin-top: 8px; padding: 3px 12px; border-radius: 999px;
  background: rgba(34,197,94,0.15); color: #bbf7d0; font-size: 10px; font-weight: 800;
  letter-spacing: 0.4px; text-transform: uppercase;
}

/* ── TEMPLATE GALLERY (18 model) ── */
#rcgen .tpl-cat-label { font-size: 10px; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: 0.6px; margin: 4px 0 8px; display: flex; align-items: center; gap: 8px; }
#rcgen .tpl-cat-label .line { flex: 1; height: 1px; background: #e2e8f0; }
#rcgen .tpl-cat-label .ats-mini { color: #16a34a; }

#rcgen .resume-tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
#rcgen .rtpl { border: 2px solid #e2e8f0; border-radius: 10px; padding: 0; cursor: pointer; background: #fff; overflow: hidden; transition: all .15s; position: relative; text-align: left; font-family: inherit; }
#rcgen .rtpl:hover { border-color: #94a3b8; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.08); }
#rcgen .rtpl.active { border-color: #0f172a; box-shadow: 0 0 0 3px rgba(15,23,42,0.12); }
#rcgen .rtpl-thumb { width: 100%; height: 92px; background: #f8fafc; display: block; border-bottom: 1px solid #eef2f7; }
#rcgen .rtpl-thumb svg { display: block; width: 100%; height: 100%; }
#rcgen .rtpl-meta { padding: 7px 9px 8px; }
#rcgen .rtpl-name { font-size: 11px; font-weight: 800; color: #0f172a; line-height: 1.2; }
#rcgen .rtpl-tag { font-size: 9px; font-weight: 700; margin-top: 3px; display: inline-block; }
#rcgen .rtpl-tag.ats { color: #16a34a; }
#rcgen .rtpl-tag.creative { color: #b8861e; }
#rcgen .rtpl .rtpl-check { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; background: #0f172a; color: #fff; font-size: 12px; line-height: 20px; text-align: center; opacity: 0; transform: scale(.6); transition: all .15s; }
#rcgen .rtpl.active .rtpl-check { opacity: 1; transform: scale(1); }

/* ── SKILL / LANGUAGE rows ── */
#rcgen .skill-row, #rcgen .lang-row { display: grid; grid-template-columns: 1fr 150px 30px; gap: 8px; margin-bottom: 7px; align-items: center; }
#rcgen .skill-row .skl-del, #rcgen .lang-row .lng-del { background: none; border: none; color: #ef4444; cursor: pointer; font-size: 16px; }

@media (max-width: 500px){
  #rcgen .skill-row, #rcgen .lang-row { grid-template-columns: 1fr 100px 24px; }
}

/* ── ATS callout box ── */
/* ── INFO TOOLTIP (badge ikon "i" yang jelas tappable) ── */
#rcgen .info-tip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 19px; height: 19px; padding: 0;
  border: none; border-radius: 50%; background: #e0ecff; color: #2563a8;
  cursor: pointer; flex-shrink: 0; font-family: inherit; line-height: 1;
  transition: background .15s, color .15s, transform .12s; box-shadow: 0 1px 2px rgba(37,99,168,0.15);
}
#rcgen .info-tip svg { display: block; }
#rcgen .info-tip:hover, #rcgen .info-tip:focus, #rcgen .info-tip.show { background: #2563a8; color: #fff; outline: none; transform: translateY(-1px); }

/* tooltip mengambang (diposisikan via JS, clamp ke tepi layar) */
#rcgen-tip-pop {
  position: fixed; z-index: 99999; width: 270px; max-width: calc(100vw - 24px);
  background: #0f172a; color: #f1f5f9; font-size: 11.5px; font-weight: 500; line-height: 1.55;
  padding: 11px 13px; border-radius: 10px; box-shadow: 0 10px 30px rgba(15,23,42,0.32);
  opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .16s, transform .16s;
  pointer-events: none; text-align: left;
}
#rcgen-tip-pop.show { opacity: 1; visibility: visible; transform: translateY(0); }
#rcgen-tip-pop .tip-arrow { position: absolute; width: 0; height: 0; border: 7px solid transparent; }
#rcgen-tip-pop.below .tip-arrow { top: -14px; border-bottom-color: #0f172a; }
#rcgen-tip-pop.above .tip-arrow { bottom: -14px; border-top-color: #0f172a; }

/* ── density toggle reuse range-box ── */
#rcgen .opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
@media (max-width: 500px){ #rcgen .opt-grid { grid-template-columns: 1fr; } }

/* ── SKILL / LANG input styling (konsisten dgn .fg) ── */
#rcgen .skill-row input, #rcgen .skill-row select,
#rcgen .lang-row input, #rcgen .lang-row select {
  width: 100%; height: 40px; box-sizing: border-box;
  border: 1px solid #e2e8f0; border-radius: 8px;
  font-size: 0.875rem; font-family: inherit; background-color: #fafbfc; color: #1e293b;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
#rcgen .skill-row input, #rcgen .lang-row input { padding: 0 11px; line-height: normal; }
#rcgen .skill-row select, #rcgen .lang-row select {
  padding: 0 30px 0 11px; line-height: normal;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%2364748b' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center;
}
#rcgen .skill-row select option, #rcgen .lang-row select option { line-height: 1.6; padding: 6px 8px; color: #1e293b; background: #ffffff; }
#rcgen .skill-row input:focus, #rcgen .lang-row input:focus,
#rcgen .skill-row select:focus, #rcgen .lang-row select:focus {
  border-color: #2563a8; box-shadow: 0 0 0 3px rgba(37,99,168,0.1); background-color: #fff;
}

/* ── OUTPUT: kertas A4 dikunci ── */
#rcgen .paper-fixed {
  display: flex; align-items: center; gap: 8px; padding: 9px 11px;
  border: 1px dashed #cbd5e1; border-radius: 8px; background: #f8fafc;
  font-size: 0.85rem; color: #334155; font-weight: 600;
}
#rcgen .paper-fixed .paper-badge {
  margin-left: auto; font-size: 9px; font-weight: 800; letter-spacing: .5px;
  text-transform: uppercase; color: #16a34a; background: #dcfce7;
  padding: 2px 7px; border-radius: 99px;
}

/* ── VOICE INPUT (mic clean tanpa kotak, ala chat box) ── */
#rcgen .voice-wrap { position: relative; width: 100%; }
#rcgen .voice-wrap > input,
#rcgen .voice-wrap > textarea { width: 100%; padding-right: 38px; }
#rcgen .voice-mic {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  width: 26px; height: 26px; padding: 0; border: none; border-radius: 50%;
  background: transparent; color: #94a3b8; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .15s, background .15s; z-index: 2;
}
#rcgen .voice-wrap-ta .voice-mic { top: 9px; transform: none; }
#rcgen .voice-mic svg { width: 18px; height: 18px; display: block; }
#rcgen .voice-mic:hover { color: #2563a8; background: rgba(37,99,168,0.08); }
#rcgen .voice-mic.listening { color: #ef4444; background: rgba(239,68,68,0.10); animation: rcgenMicPulse 1.1s ease-in-out infinite; }
@keyframes rcgenMicPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,.45); }
  50%     { box-shadow: 0 0 0 5px rgba(239,68,68,0); }
}

/* tombol lanjut ke desain di bawah form isian: ikut style cg-nav-prev, rata kanan */
#rcgen .cg-actions .btn-goto-bottom { margin-left: auto; }

/* baris note (*) di sebelah tombol Lanjut: Atur Desain */
#rcgen .cg-actions-isian { align-items: stretch; gap: 12px; }
#rcgen .action-note {
  flex: 1; display: flex; align-items: center; gap: 9px;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 0 14px; font-size: 11.5px; line-height: 1.45; color: #475569;
}
#rcgen .action-note b { color: #334155; }
#rcgen .action-note .req { color: #dc2626; font-weight: 700; }
#rcgen .action-note-ico { flex-shrink: 0; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #e0ecff; color: #2563a8; font-size: 13px; font-weight: 700; }
#rcgen .cg-actions-isian .btn-goto-bottom { margin-left: 0; flex-shrink: 0; align-self: stretch; display: inline-flex; align-items: center; }
@media (max-width: 560px){
  #rcgen .cg-actions-isian { gap: 8px; }
  #rcgen .cg-actions-isian .action-note { padding: 8px 10px; font-size: 11px; line-height: 1.4; }
  #rcgen .cg-actions-isian .btn-goto-bottom { padding-left: 12px; padding-right: 12px; font-size: 11px; text-align: center; max-width: 38%; }
}

/* ── LAMPIRAN (attachments untuk halaman tambahan) ── */
#rcgen .attach-upload { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
#rcgen .attach-upload input[type="file"] { font-size: 0.8rem; }
#rcgen .attach-hint-inline { font-size: 0.7rem; color: #94a3b8; }
#rcgen .attach-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
#rcgen .attach-item { position: relative; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; background: #f8fafc; }
#rcgen .attach-item img { width: 100%; height: 84px; object-fit: cover; display: block; }
#rcgen .attach-item .attach-cap { font-size: 0.62rem; color: #64748b; padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#rcgen .attach-item .attach-del { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(15,23,42,0.78); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
#rcgen .attach-item .attach-del:hover { background: #ef4444; }
