/* =====================================================================
   FORMULIR GENERATOR — gaya tampilan (simpan di: public/css/formulir-generator.css)
   ===================================================================== */
#formulirApp { max-width: 1320px; margin: 0 auto; color: #e2e8f0; }
#formulirApp label { display: block; font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 5px; }
#formulirApp input, #formulirApp select, #formulirApp textarea, #formulirApp button { box-sizing: border-box; font-family: inherit; }
#formulirApp .fx-paper label { text-transform: none; letter-spacing: 0; color: #1e293b; font-size: 12px; }
#formulirApp .fx-paper .fx-opts label { color: #0f172a; font-weight: 500; font-size: 12.5px; margin: 0; display: inline-flex; }
#formulirApp .fx-paper input, #formulirApp .fx-paper select, #formulirApp .fx-paper textarea { font-family: Arial, Helvetica, sans-serif; }
.fmg-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.fmg-head h3 { font-size: 1.3rem; font-weight: 800; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fmg-head p { color: #94a3b8; font-size: 14px; margin: 0; max-width: 900px; line-height: 1.55; }
.fmg-beta { font-size: 10px; letter-spacing: .08em; background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; padding: 3px 8px; border-radius: 999px; }
.fmg-card { background: #1e293b; border: 1px solid rgba(255,255,255,.1); border-radius: 18px; padding: 22px; }
.fmg-pad { padding: 16px; margin-bottom: 12px; }
.fmg-card h4 { margin: 0 0 10px; font-size: 14px; color: #e0f2fe; }
.fmg-mt { margin-top: 16px !important; } .fmg-mt2 { margin-top: 14px; }
.fmg-info { background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.45); color: #a7f3d0; padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 12px; }
.fmg-hint { color: #94a3b8; font-size: 12px; line-height: 1.5; }
.fmg-link { background: none; border: 0; color: #7dd3fc; font-weight: 700; cursor: pointer; padding: 0; text-decoration: underline; font-size: inherit; }
.fmg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fmg-chip { background: rgba(56,189,248,.12); border: 1px solid rgba(56,189,248,.4); color: #bae6fd; padding: 7px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: .2s; }
.fmg-chip:hover { background: rgba(56,189,248,.25); transform: translateY(-1px); }
.fmg-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.fmg-bidang { display: grid; grid-template-columns: 280px 1fr; gap: 10px; }
#formulirApp .fmg-type { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid rgba(148,163,184,.3); border-radius: 12px; cursor: pointer; text-transform: none; letter-spacing: 0; margin: 0; transition: .2s; }
#formulirApp .fmg-type:has(input:checked) { border-color: #38bdf8; background: rgba(56,189,248,.09); box-shadow: 0 0 0 1px #38bdf8 inset; }
.fmg-type input { display: none; }
.fmg-type .ic { font-size: 22px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(148,163,184,.12); flex: none; }
.fmg-type b { display: block; color: #f1f5f9; font-size: 13.5px; }
.fmg-type small { display: block; color: #94a3b8; font-weight: 500; font-size: 11.5px; }
.fmg-ta { min-height: 96px; resize: vertical; }
.fmg-ta-sm { min-height: 74px; resize: vertical; width: 100%; }
.fmg-file { font-size: 13px; color: #cbd5e1; margin-bottom: 10px; max-width: 100%; }
.fmg-file::file-selector-button { margin-right: 10px; padding: 7px 12px; border: 0; border-radius: 8px; background: #2563eb; color: #fff; font-weight: 600; cursor: pointer; }
.fmg-kopset { border: 1px solid rgba(148,163,184,.22); border-radius: 12px; padding: 10px 14px; margin: 6px 0 16px; }
.fmg-kopset summary { cursor: pointer; font-weight: 800; color: #cbd5e1; font-size: 13px; }
.fmg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 14px; margin-top: 12px; }
.fmg-full { grid-column: 1 / -1; }
.fmg-sw { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
#formulirApp .fmg-sw label { display: flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid rgba(148,163,184,.3); border-radius: 10px; cursor: pointer; text-transform: none; letter-spacing: 0; font-size: 13px; color: #e2e8f0; margin: 0; }
#formulirApp .fmg-sw label.on { border-color: #38bdf8; background: rgba(56,189,248,.1); }
.fmg-sw input { display: none; } .fmg-sw i { width: 16px; height: 16px; border-radius: 5px; box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.fmg-logo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fmg-logo { height: 40px; width: 40px; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px; margin-bottom: 10px; }
#formulirApp .fmg-check { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 13px; color: #e2e8f0; font-weight: 600; cursor: pointer; margin: 0; }
.fmg-check input { width: 16px; height: 16px; accent-color: #38bdf8; }
.fmg-btn-main { background: linear-gradient(135deg, #0ea5e9, #6366f1); color: #fff; border: 0; padding: 11px 20px; border-radius: 12px; font-weight: 800; cursor: pointer; transition: .2s; font-size: 14px; }
.fmg-btn-main:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(56,189,248,.7); }
.fmg-wide { width: 100%; padding: 14px; font-size: 15px; margin-top: 6px; }
.fmg-btn-ghost { background: rgba(148,163,184,.12); border: 1px solid rgba(148,163,184,.35); color: #e2e8f0; padding: 8px 12px; border-radius: 10px; font-weight: 700; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.fmg-btn-ghost:hover { border-color: #38bdf8; color: #fff; }
.fmg-btn-dl { background: linear-gradient(135deg, #10b981, #059669); color: #fff; border: 0; padding: 9px 16px; border-radius: 10px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.fmg-btn-dl:disabled { opacity: .6; cursor: wait; }
.fmg-bar { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; background: #1e293b; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; position: sticky; top: 0; z-index: 5; }
.fmg-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.fmg-seg { display: flex; background: rgba(2,6,23,.6); border: 1px solid rgba(148,163,184,.3); border-radius: 10px; padding: 3px; }
.fmg-seg button { background: none; border: 0; color: #94a3b8; font-weight: 800; font-size: 12.5px; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.fmg-seg button.on { background: linear-gradient(135deg, #0ea5e9, #6366f1); color: #fff; }
.fmg-res { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; align-items: start; }
.fmg-side { position: sticky; top: 70px; }
.fmg-rules { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: #cbd5e1; line-height: 1.45; }
.fmg-rules b { color: #f1f5f9; }
.fmg-stage { background: #0b1220; border-radius: 16px; padding: 18px 12px; overflow-x: auto; min-width: 0; }
/* animasi papan klip terisi */
.fmg-loader { display: flex; align-items: center; gap: 18px; margin-top: 12px; padding: 14px 18px; border-radius: 16px; border: 1px solid rgba(56,189,248,.35); background: linear-gradient(135deg, rgba(14,165,233,.12), rgba(99,102,241,.12)); }
.fmg-clip { position: relative; width: 58px; height: 72px; flex: none; border-radius: 8px; background: #f8fafc; box-shadow: 0 0 0 4px #4f46e5, 0 10px 20px -8px rgba(79,70,229,.7); }
.fmg-clip .cl { position: absolute; left: 50%; top: -9px; width: 26px; height: 12px; transform: translateX(-50%); background: #94a3b8; border-radius: 4px; box-shadow: inset 0 -3px 0 #64748b; }
.fmg-clip b { position: absolute; left: 9px; height: 5px; border-radius: 3px; background: #0ea5e9; width: 0; animation: fmgline 2.4s infinite ease-in-out; }
.fmg-clip .l1 { top: 14px; } .fmg-clip .l2 { top: 26px; animation-delay: .4s; background: #6366f1; } .fmg-clip .l3 { top: 38px; animation-delay: .8s; } .fmg-clip .l4 { top: 50px; animation-delay: 1.2s; background: #10b981; }
@keyframes fmgline { 0% { width: 0; opacity: 1; } 45% { width: 40px; } 85% { width: 40px; opacity: 1; } 100% { width: 40px; opacity: 0; } }
.fmg-clip .pen { position: absolute; width: 6px; height: 22px; background: linear-gradient(#f59e0b 70%, #334155 70%); border-radius: 2px; top: 6px; left: 46px; transform: rotate(35deg); animation: fmgpen 2.4s infinite ease-in-out; }
@keyframes fmgpen { 0%, 100% { top: 6px; left: 12px; } 45% { top: 6px; left: 48px; } 50% { top: 18px; left: 12px; } 70% { top: 30px; left: 46px; } 75% { top: 42px; left: 12px; } 95% { top: 42px; left: 46px; } }
.fmg-ld { flex: 1; min-width: 0; }
.fmg-ld-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.fmg-ld-top span { color: #e0f2fe; font-weight: 700; font-size: 14px; }
.fmg-ld-top b { font-size: 22px; font-weight: 900; color: #7dd3fc; text-shadow: 0 0 14px rgba(56,189,248,.55); font-variant-numeric: tabular-nums; }
.fmg-ld-bar { height: 10px; border-radius: 10px; background: rgba(148,163,184,.18); overflow: hidden; }
.fmg-ld-bar i { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, #0ea5e9, #6366f1, #10b981); transition: width .4s; }
@media (prefers-reduced-motion: reduce) { .fmg-clip b, .fmg-clip .pen { animation: none; width: 40px; } }
@media (max-width: 1100px) { .fmg-res { grid-template-columns: 1fr; } .fmg-side { position: static; } .fmg-types { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .fmg-types, .fmg-grid, .fmg-bidang { grid-template-columns: 1fr; } .fmg-bar { position: static; } .fmg-btns { margin-left: 0; } }

.fmg-change { border: 1px solid rgba(34,197,94,.5); background: rgba(34,197,94,.1); border-radius: 10px; padding: 9px 11px; margin-bottom: 10px; font-size: 12.5px; color: #d1fae5; }
.fmg-change.bad { border-color: rgba(245,158,11,.55); background: rgba(245,158,11,.1); color: #fde68a; }
.fmg-change small { display: block; color: #94a3b8; font-style: italic; margin: 2px 0 4px; }
.fmg-change ul { margin: 4px 0; padding-left: 18px; }
.fmg-added { margin-top: 4px; color: #cbd5e1; }
.fmg-added b { color: #fff; }
