/* 모듈 5: 기관 · 서식 · 매뉴얼 · AI 비서 */
.ph { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.ph .grow { flex: 1; }
input.in, textarea.in, select.in { height: 36px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font: inherit; background: #fff; min-width: 0; }
input.in:focus, textarea.in:focus, select.in:focus { outline: none; border-color: #93b4ff; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.mut { color: var(--mute); }
.err { color: #dc2626; }
.ob { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 7px; font-size: 12px; font-weight: 800; color: #fff; background: var(--oc, #1e3a8a); white-space: nowrap; }
.gl { text-decoration: underline dotted; cursor: help; }
.fbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.fbar .in { width: 260px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips .chip { cursor: pointer; background: #f1f5f9; color: #334155; }
.chip.on { background: var(--grad); color: #fff; }
.chip a { margin-left: 4px; cursor: pointer; }
/* 기관 */
.ins-match { padding: 16px 18px; margin-bottom: 16px; }
.ins-steps { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13px; color: var(--mute); }
.ins-steps b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 11px; margin-right: 6px; }
.ins-steps i { flex: 0 0 24px; height: 1px; background: var(--line); }
.ins-pick { position: relative; width: 340px; max-width: 100%; }
.ins-pick .in { width: 100%; }
.ins-hits { position: absolute; z-index: 30; top: 40px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(15,30,75,.16); max-height: 320px; overflow: auto; }
.ins-hits a { display: flex; flex-direction: column; padding: 8px 12px; cursor: pointer; }
.ins-hits a:hover { background: #f1f6ff; }
.ins-hits span { font-size: 12px; color: var(--mute); }
.ins-cust { display: flex; align-items: center; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
.ins-cust span { color: var(--mute); font-size: 13px; }
.chip.ex { background: #e0f2fe; color: #0369a1; }
.ins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ins-mc { border: 1px solid var(--line); border-top: 3px solid var(--oc); border-radius: 12px; padding: 10px 12px; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.ins-mc .h { display: flex; align-items: center; gap: 8px; }
.ins-mc .h em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--mute); }
.ins-mc.lv-ok .h b { color: #15803d; } .ins-mc.lv-ask .h b { color: #c2410c; } .ins-mc.lv-no .h b { color: #94a3b8; }
.ins-mc p { margin: 0; font-size: 12.5px; line-height: 1.5; word-break: keep-all; }
.ins-mc .a, .ins-od .a, .fm-d .a, .fr .a { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.ins-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.ins-oc { padding: 14px 16px; cursor: pointer; border-left: 4px solid var(--oc); transition: box-shadow .15s, transform .15s; }
.ins-oc:hover { box-shadow: 0 10px 24px rgba(37,99,235,.12); transform: translateY(-1px); }
.ins-oc .h { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.ins-oc p { margin: 0 0 8px; font-size: 13px; line-height: 1.55; color: #334155; word-break: keep-all; }
.tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tags span { font-size: 11.5px; padding: 2px 8px; border-radius: 8px; background: #f1f5f9; color: #475569; white-space: nowrap; }
.ins-od .lead { font-size: 14px; font-weight: 600; line-height: 1.6; word-break: keep-all; }
.ins-od dl, .fm-d dl { display: grid; grid-template-columns: 96px 1fr; gap: 6px 10px; font-size: 13px; }
.ins-od dt, .fm-d dt { color: var(--mute); }
.ins-od dd, .fm-d dd { margin: 0; word-break: keep-all; }
.ins-od h4, .fm-d h4, .ins-cmp h4 { margin: 14px 0 6px; font-size: 13.5px; }
.ins-od ol, .ins-od ul, .fm-st ol { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; }
.ins-tip { border: 1px solid #dbe6ff; background: #f6f9ff; border-radius: 10px; padding: 8px 10px; margin: 6px 0; font-size: 12.5px; }
.ins-tip .k { font-size: 11px; color: #2563eb; font-weight: 800; margin-right: 6px; }
.ins-tip p { margin: 4px 0 0; color: #334155; line-height: 1.5; }
.ins-cmp { padding: 14px 16px; overflow: auto; }
.ins-cmp table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ins-cmp th, .ins-cmp td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; word-break: keep-all; }
.ins-cmp th { background: #f5f8fc; font-size: 12px; color: var(--mute); white-space: nowrap; }
.ins-gl { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.ins-raw { display: flex; flex-direction: column; gap: 10px; }
.ins-orgs { display: flex; gap: 6px; flex-wrap: wrap; }
.ins-orgs a { padding: 4px 10px; border-radius: 8px; background: #f1f5f9; cursor: pointer; font-size: 12.5px; }
.ins-orgs a.on { background: var(--grad); color: #fff; }
.ins-rc { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.ins-rc .h { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ins-prods .pr { border-bottom: 1px solid var(--line); padding: 8px 0; font-size: 13px; }
.ins-prods .pr p { margin: 2px 0; color: #475569; }
.ins-br { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: #475569; }
/* 서식 */
.fm-cp { display: flex; gap: 8px; align-items: center; }
.fm-q { margin: 6px 0 10px; font-size: 16px; }
.fm-ps { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 14px; }
.fm-p { padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 5px; border-top: 3px solid var(--oc); transition: box-shadow .15s; }
.fm-p:hover { box-shadow: 0 10px 24px rgba(37,99,235,.12); }
.fm-p.on { outline: 2px solid #3b82f6; }
.fm-p .mut { font-size: 12px; word-break: keep-all; }
.fm-hint { padding: 12px 14px; background: #f6f9ff; border-radius: 12px; }
.fm-flow { display: flex; flex-direction: column; gap: 10px; }
.fm-st { display: flex; gap: 14px; padding: 14px 16px; }
.fm-st .n { flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; }
.fm-st .b { flex: 1; min-width: 0; }
.fm-st h3 { margin: 2px 0 8px; font-size: 15px; }
.fm-st h3 em { font-style: normal; font-size: 12px; color: var(--mute); margin-left: 6px; }
.ckl { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; }
.ckl label { display: flex; gap: 8px; align-items: center; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; cursor: pointer; }
.ckl label.on { background: #f0fdf4; border-color: #86efac; }
.fl .fi { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.fl .fi.low { opacity: .7; }
.fl .fi .t { flex: 1 1 320px; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.fl .fi .t b { word-break: keep-all; }
.fl .fi .t .mut { flex-basis: 100%; font-size: 12px; }
.fl .fi .dt { font-size: 11px; font-weight: 800; color: #2563eb; background: #eef4ff; padding: 1px 7px; border-radius: 6px; white-space: nowrap; }
.fl .fi .a { display: flex; gap: 6px; flex-wrap: wrap; }
.fm-st .tip { font-size: 13px; background: #fffbeb; border-radius: 9px; padding: 8px 10px; }
.fm-st details { margin-top: 8px; font-size: 13px; }
.fm-st .rl { display: block; padding: 3px 0; }
.lk { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.fm-all { display: flex; flex-direction: column; flex: 1; min-height: 420px; }
.fm-all .vt { flex: 1; min-height: 380px; }
.fr .warn { color: #c2410c; }
/* 매뉴얼 */
.man .vt { flex: 1; min-height: 0; }
.man-d .mdb { font-size: 14px; line-height: 1.7; word-break: keep-all; }
.man-d .mdb img { max-width: 100%; border-radius: 8px; margin: 6px 0; }
.man-d .mdb li { margin-left: 18px; }
.man-d .mdb blockquote { margin: 6px 0; padding: 6px 10px; border-left: 3px solid #93c5fd; background: #f6f9ff; }
.man-d .src { font-size: 12px; margin-top: 12px; }
.man-case { white-space: pre-wrap; font-size: 12.5px; }
/* AI 비서 */
.ai-fab { position: fixed; right: 22px; bottom: 22px; z-index: 60; height: 46px; padding: 0 20px; border: 0; border-radius: 23px; background: var(--grad); color: #fff; font-weight: 800; box-shadow: 0 10px 26px rgba(37,99,235,.35); cursor: pointer; }
.ai-panel { position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 420px; max-width: calc(100vw - 30px); height: 600px; max-height: calc(100vh - 40px); background: #fff; border-radius: 18px; box-shadow: 0 20px 50px rgba(15,30,75,.28); display: flex; flex-direction: column; overflow: hidden; }
.ai-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: linear-gradient(135deg, #0b1f4d, #1e3a8a 60%, #0e7490); color: #fff; }
.ai-h span { font-size: 12px; opacity: .8; }
.ai-h .x { margin-left: auto; background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 8px; padding: 4px 10px; cursor: pointer; }
.ai-b { flex: 1; overflow: auto; padding: 12px; background: #f7f9fc; }
.ai-m { margin-bottom: 10px; }
.ai-m .t { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; word-break: keep-all; }
.ai-m.me .t { background: var(--grad); color: #fff; border: 0; margin-left: 40px; }
.ai-ev { background: #fff; border: 1px solid #e3eaf5; border-radius: 10px; padding: 7px 10px; margin: 6px 0 0 8px; font-size: 12.5px; cursor: pointer; }
.ai-ev:hover { border-color: #93b4ff; }
.ai-ev .k { font-size: 11px; font-weight: 800; color: #2563eb; margin-right: 6px; }
.ai-ev .k-guide { color: #15803d; }
.ai-ev em { display: block; font-style: normal; color: var(--mute); font-size: 11.5px; }
.ai-ev p { margin: 3px 0 0; color: #475569; line-height: 1.5; }
.ai-f { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.ai-f .in { flex: 1; }
.ai-ex { font-size: 12.5px; color: var(--mute); }

/* ---- 2차 QA: 깨짐 수정 + 호버 포인트 ---- */
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--ink, #0f172a); white-space: nowrap; }
a.btn.pri { color: #fff; }
.fm-p .ob, .ins .ob, .card .ob { align-self: flex-start; width: auto; display: inline-flex; }
.fm-p { transition: box-shadow .15s, transform .15s, border-color .15s; }
.fm-p:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(37,99,235,.16), 0 0 0 1px rgba(59,130,246,.25); }
.fm-flow .a, .fm-d .a { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; flex-shrink: 0; }
.ins-cmp table { width: 100%; border-collapse: collapse; table-layout: auto; }
.ins-cmp th, .ins-cmp td { padding: 10px 10px; vertical-align: top; word-break: keep-all; }
.ins-cmp td:nth-child(1), .ins-cmp td:nth-child(6), .ins-cmp td:nth-child(7), .ins-cmp th:nth-child(6), .ins-cmp th:nth-child(7) { white-space: nowrap; }
.ins-cmp td:nth-child(2) { min-width: 150px; }
.ins-cmp td:nth-child(4) { min-width: 140px; }
.ins-cmp tbody tr { transition: background .12s; }
.ins-cmp tbody tr:hover { background: linear-gradient(90deg, rgba(59,130,246,.08), rgba(6,182,212,.04)); box-shadow: inset 3px 0 0 #3b82f6; }
.ins .card, .card.org, [class*="ins-org"] { transition: transform .15s, box-shadow .15s; }
.ins .card:hover, [class*="ins-org"]:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(15,30,80,.12), 0 0 0 1px rgba(59,130,246,.22); }
.tab { transition: color .12s, background .12s; border-radius: 8px 8px 0 0; }
.tab:hover { color: #2563eb; background: rgba(59,130,246,.06); }
@media (max-width: 1380px) { .fm-ps { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); } }}/* r7 매뉴얼 */
.man-img{max-width:100%;border:1px solid #e6eaf2;border-radius:8px;margin:6px 0;cursor:zoom-in;display:block}
.man-act{display:flex;gap:6px;justify-content:flex-end;margin:-4px 0 8px}
.man .chip.lock,.man .tag.lock{background:#fff4f4;color:#b42318;border-color:#f3c2c2}
.man .tag{display:inline-block;font-size:11px;padding:1px 6px;border-radius:6px;border:1px solid #dbe3f0;background:#f4f7fc;color:#334}
.man .tag.new{background:#eaf3ff;color:#1d5bd8;border-color:#c9dcfb}
.man .chip b{font-weight:600;opacity:.6;margin-left:2px}
.man-ed{display:flex;flex-direction:column;gap:10px;min-width:min(720px,92vw)}
.man-ed label{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:600}
.man-ed textarea{resize:vertical;font-family:inherit;line-height:1.55}
.man-imgs{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.man-th{position:relative}.man-th img{width:84px;height:64px;object-fit:cover;border-radius:6px;border:1px solid #e6eaf2}
.man-th a{position:absolute;top:-6px;right:-6px;background:#b42318;color:#fff;border-radius:50%;width:18px;height:18px;text-align:center;line-height:18px;font-size:12px;cursor:pointer}
.man-ed .row-end{display:flex;gap:8px;justify-content:flex-end}
.case-prog{display:flex;gap:12px;align-items:baseline;flex-wrap:wrap;padding:8px 12px;margin:0 0 8px;background:#f4f7fc;border:1px solid #e3e9f4;border-radius:10px;font-size:13px}
.case-d .case-amt{font-size:18px;font-weight:700;color:#1d5bd8;margin:4px 0 10px}
.case-d .case-s{margin:0 0 10px}.case-d .case-s b{display:block;font-size:12px;color:#5b6b85;margin-bottom:2px}.case-d .case-s p{margin:0;line-height:1.6}
.fm-embed{padding:0}
