/* Feature Specification — Phase 5 (igen-sme/phase5.php). Existing palette only. */

.p5-muted{color:#5b6b8f}
.p5-small{font-size:12.5px}
.p5-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:9px 16px;border:1px solid #2563eb;border-radius:6px;background:#2563eb;color:#fff;font-family:inherit;font-size:14px;font-weight:600;line-height:1.2;text-decoration:none;cursor:pointer}
.p5-btn:hover{background:#1e3a8a;border-color:#1e3a8a;color:#fff}
.p5-btn:disabled{opacity:.55;cursor:not-allowed}
.p5-btn--ghost{background:#fff;color:#0b1b3f;border-color:#dbe5f3}
.p5-btn--ghost:hover{background:#eef3fb;color:#0b1b3f;border-color:#dbe5f3}
.p5-btn:focus-visible,.p5-link:focus-visible,.p5-cmp:focus-visible,.p5-x:focus-visible{outline:2px solid #2563eb;outline-offset:2px}
.p5-link{background:none;border:0;padding:4px;color:#2563eb;font-family:inherit;font-size:13px;cursor:pointer}

/* ---------- Modal + toast ---------- */
.p5-ov{position:fixed;inset:0;z-index:100000;display:grid;place-items:center;padding:16px;background:rgba(11,27,63,.55)}
.p5-modal{width:min(560px,100%);max-height:calc(100vh - 32px);display:flex;flex-direction:column;border-radius:6px;background:#fff;color:#0b1b3f;box-shadow:0 20px 50px rgba(11,27,63,.35)}
.p5-modal--wide{width:min(900px,100%)}
.p5-mh{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 18px;border-bottom:1px solid #dbe5f3}
.p5-mh b{font-size:16px}
.p5-x{width:32px;height:32px;border:0;border-radius:6px;background:#eef3fb;color:#0b1b3f;cursor:pointer}
.p5-mb{padding:16px 18px;overflow:auto}
.p5-toast{position:fixed;left:50%;bottom:24px;z-index:100001;transform:translateX(-50%);max-width:calc(100% - 32px);padding:10px 16px;border-radius:6px;background:#0e1b3d;color:#fff;font-size:14px;box-shadow:0 10px 26px rgba(11,27,63,.32)}

/* ---------- Forms ---------- */
.p5-form{display:flex;flex-direction:column;gap:12px}
.p5-fl{display:flex;flex-direction:column;gap:5px;min-width:0}
.p5-fl>span{font-size:13px;font-weight:600;color:#0b1b3f}
.p5-fl input,.p5-fl select,.p5-fl textarea,.p5-reply textarea,.p5-ask__f input{width:100%;min-width:0;box-sizing:border-box;padding:9px 11px;border:1px solid #dbe5f3;border-radius:6px;background:#fff;color:#0b1b3f;font-family:inherit;font-size:14px}
.p5-fl textarea{min-height:96px;resize:vertical}
.p5-fl input:focus,.p5-fl select:focus,.p5-fl textarea:focus,.p5-reply textarea:focus,.p5-ask__f input:focus{outline:2px solid #2563eb;outline-offset:0;border-color:#2563eb}
.p5-r2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.p5-act{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.p5-err{margin:0;padding:8px 10px;border-radius:6px;background:#fff1e6;color:#c2410c;font-size:13px}
.p5-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;opacity:0}
.p5-done h3{margin:0 0 8px}
.p5-chips{display:flex;flex-wrap:wrap;gap:8px}
.p5-chips label{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid #dbe5f3;border-radius:6px;background:#f5f8fe;font-size:13px;cursor:pointer}
.p5-chips label:has(input:checked){border-color:#2563eb;background:#dbe7ff}

/* ---------- RC-04 Compare ---------- */
.p5-cmp{display:inline-flex;align-items:center;gap:6px;cursor:pointer}
.p5-cmp.on{color:#2563eb}
.p5-cmp--card{position:relative;z-index:2;margin:8px 14px 12px;padding:6px 10px;border:1px solid rgba(255,255,255,.28);border-radius:6px;background:transparent;color:#fff;font-family:inherit;font-size:12.5px;font-weight:600}
.p5-cmp--card:hover{border-color:#fff}
.p5-cmp--card.on{background:rgba(59,130,246,.18);border-color:#93c5fd;color:#c7d8ff}
.p5-tray{position:fixed;left:50%;bottom:16px;z-index:9990;transform:translateX(-50%);display:flex;align-items:center;gap:12px;flex-wrap:wrap;max-width:calc(100% - 32px);padding:10px 12px;border-radius:6px;background:#0e1b3d;color:#fff;box-shadow:0 10px 26px rgba(11,27,63,.32)}
.p5-tray ul{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:0;padding:0}
.p5-tray li{display:inline-flex;align-items:center;gap:4px;max-width:180px;padding:4px 4px 4px 10px;border-radius:6px;background:#1a2c5c;font-size:13px}
.p5-tray li span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.p5-tray li button{flex:none;width:24px;height:24px;border:0;border-radius:6px;background:transparent;color:#b4c2de;cursor:pointer}
.p5-tray__a{display:flex;align-items:center;gap:6px}
.p5-tray .p5-link{color:#b4c2de}
.p5-cmpt{overflow-x:auto}
.p5-cmpt table{width:100%;min-width:560px;border-collapse:collapse;font-size:13.5px}
.p5-cmpt th,.p5-cmpt td{padding:10px;border-bottom:1px solid #eef3fb;text-align:left;vertical-align:top}
.p5-cmpt tbody th{width:150px;color:#5b6b8f;font-weight:600}
.p5-cmpt thead th a{display:flex;flex-direction:column;align-items:flex-start;gap:4px;color:#0b1b3f;text-decoration:none}
.p5-cmpt thead small{color:#5b6b8f;font-weight:400}
.p5-av{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;overflow:hidden;background:#0e1b3d;color:#fff;font-weight:600}
.p5-av img{width:100%;height:100%;object-fit:cover}

/* ---------- NF-19 Ask about this expert ---------- */
.p5-ask__f{display:flex;gap:8px}
.p5-ask__f input{flex:1}
.p5-ask__out{margin-top:10px}
.p5-ask__n{margin:10px 0 0}
.p5-ans blockquote{margin:0 0 8px;padding:10px 12px;border-left:3px solid #2563eb;border-radius:0 6px 6px 0;background:#f5f8fe}
.p5-ans blockquote p{margin:0 0 4px;color:#0b1b3f}
.p5-ans cite{font-style:normal;font-size:12px;font-weight:600;color:#5b6b8f}
.p5-ans--none{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;border-radius:6px;background:#f5f8fe}
.p5-ans--none p{margin:0}

/* ---------- NF-10 / NF-35 Proposal + threads ---------- */
.p5-prop{margin:0 0 12px;padding:12px;border:1px solid #dbe5f3;border-radius:6px;background:#f5f8fe}
.p5-prop p{margin:6px 0}
.p5-st{color:#2563eb;font-weight:600}
.p5-thread{display:flex;flex-direction:column;gap:8px;max-height:340px;overflow:auto;list-style:none;margin:0 0 12px;padding:0}
.p5-thread li{max-width:85%;padding:8px 12px;border-radius:6px;background:#eef3fb}
.p5-thread li.me{align-self:flex-end;background:#dbe7ff}
.p5-thread li div{display:flex;gap:8px;align-items:baseline;font-size:12.5px}
.p5-thread time{color:#5b6b8f}
.p5-thread li p{margin:4px 0 0;font-size:14px}
.p5-reply{display:flex;gap:8px;align-items:flex-end}
.p5-reply textarea{flex:1;resize:vertical}

/* ---------- NF-13 Endorsements ---------- */
.igp2 .p5-end{list-style:none;margin:0;padding:0}
.igp2 .p5-end li{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid #eef3fb}
.igp2 .p5-end li:last-child{border-bottom:0}
.igp2 .p5-end small{color:#5b6b8f}
.igp2 .p5-end p{margin:4px 0 0}

/* ---------- NF-06 Languages ---------- */
.igp2 .p5-langs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 14px}
.igp2 .p5-langs a{padding:5px 12px;border:1px solid #dbe5f3;border-radius:6px;background:#fff;color:#0b1b3f;font-size:13px;text-decoration:none}
.igp2 .p5-langs a[aria-current]{background:#0e1b3d;border-color:#0e1b3d;color:#fff}
.igp2 .p5-i18n__h{font-size:17px;font-weight:600}
.igp2 .p5-i18n[dir="rtl"]{text-align:right}
.igp2 .p5-i18n__n{text-align:left;color:#5b6b8f;font-size:12px}

/* ---------- NF-24 WhatsApp · Studio ---------- */
.igp2 .p5-wa{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;margin-top:8px;box-sizing:border-box;text-decoration:none}
.p5-studio{margin:0 0 16px}
.p5-sel select{width:100%;margin-top:6px;padding:8px 10px;border:1px solid #dbe5f3;border-radius:6px;background:#fff;font:inherit}

@media (max-width:640px){
	.p5-r2{grid-template-columns:1fr}
	.p5-ask__f,.p5-reply{flex-direction:column;align-items:stretch}
	.p5-tray{bottom:8px;width:calc(100% - 16px);max-width:none;justify-content:space-between}
	.p5-mb{padding:14px}
}
