/* ═══════════════════════════════════════════════
   NPC SHEET
   ═══════════════════════════════════════════════ */

/* ── Main scroll ── */
.npc-wrap { overflow-y:auto; height:calc(100vh - 31px); }

/* ── Section (reuse CS section style) ── */
.npc-section { margin-bottom:0; }
.npc-section-head { display:flex; align-items:center; cursor:pointer; padding:7px 14px; background:#111; color:#fff; font-family:var(--head); font-size:9px; letter-spacing:2px; text-transform:uppercase; user-select:none; }
.npc-section-head .toggle { margin-left:auto; font-size:10px; opacity:0.6; }
.npc-section-body { padding:14px; display:flex; flex-direction:column; gap:10px; }
.npc-section-body.collapsed { display:none; }

/* ── Identity ── */
.npc-id-grid { display:flex; gap:14px; align-items:flex-start; flex-wrap:wrap; }
.npc-id-photo { width:100px; height:120px; border:2px solid #111; display:flex; align-items:center; justify-content:center; cursor:pointer; overflow:hidden; flex-shrink:0; position:relative; }
.npc-id-photo img { width:100%; height:100%; object-fit:cover; }
.npc-id-photo .ph-text { font-family:var(--head); font-size:9px; letter-spacing:2px; color:#bbb; position:absolute; }
.npc-id-fields { flex:1; min-width:180px; display:flex; flex-direction:column; gap:7px; }
.npc-field { display:flex; flex-direction:column; gap:2px; }
.npc-field label { font-family:var(--head); font-size:8px; letter-spacing:1px; color:var(--text2); text-transform:uppercase; }
.npc-field input, .npc-field select { font-family:var(--mono); font-size:11px; border:none; border-bottom:1.5px solid #111; padding:3px 2px; background:#fff; width:100%; box-sizing:border-box; }
.npc-field input:focus, .npc-field select:focus { outline:none; border-bottom-color:#3a7bd5; }
.npc-field textarea { font-family:var(--mono); font-size:11px; border:1px solid #ddd; padding:6px; resize:vertical; min-height:60px; width:100%; box-sizing:border-box; background:#fafafa; }
.npc-field textarea:focus { outline:none; border-color:#111; background:#fff; }

/* ── Stats + Skills block ── */
.npc-ss-layout { display:flex; gap:16px; flex-wrap:wrap; }
.npc-stats-col { flex-shrink:0; min-width:160px; }
.npc-skills-col { flex:1; min-width:200px; }

.npc-stats-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin-bottom:10px; }
.npc-stat-box { display:flex; flex-direction:column; align-items:center; border:1px solid #e0e0e0; padding:4px; }
.npc-stat-box .slabel { font-family:var(--head); font-size:8px; letter-spacing:1px; color:var(--text2); }
.npc-stat-box input { font-family:var(--mono); font-size:15px; font-weight:bold; border:none; width:44px; text-align:center; background:transparent; }
.npc-stat-box input:focus { outline:none; }

.npc-sa-box { border:1px solid #b8860b; padding:6px; background:#fdfaf0; margin-bottom:6px; }
.npc-sa-box .sa-label { font-family:var(--head); font-size:8px; letter-spacing:1px; color:#b8860b; }
.npc-sa-box .sa-name { font-family:var(--head); font-size:10px; color:#111; margin-top:2px; }
.npc-sa-box input { font-family:var(--mono); font-size:12px; font-weight:bold; border:none; border-bottom:1.5px solid #b8860b; width:40px; text-align:center; background:transparent; }
.npc-sa-box input:focus { outline:none; }

.npc-skills-header { display:flex; align-items:center; gap:8px; margin-bottom:8px; flex-wrap:wrap; }
.npc-skills-header input[type="text"] { font-family:var(--mono); font-size:10px; border:none; border-bottom:1px solid #ddd; padding:3px 6px; flex:1; min-width:120px; background:#fafafa; }
.npc-skills-header input[type="text"]:focus { outline:none; border-bottom-color:#111; background:#fff; }

.npc-skill-row { display:flex; align-items:center; gap:6px; padding:3px 0; border-bottom:1px solid #f5f5f5; }
.npc-skill-name { font-family:var(--mono); font-size:10px; flex:1; color:#333; }
.npc-skill-name.role-skill { color:#111; font-weight:600; }
.npc-skill-stat { font-family:var(--head); font-size:8px; letter-spacing:0.5px; color:#aaa; width:32px; text-align:right; }
.npc-skill-val { font-family:var(--mono); font-size:11px; font-weight:bold; border:none; border-bottom:1px solid transparent; width:32px; text-align:center; background:transparent; }
.npc-skill-val:focus { outline:none; border-bottom-color:#111; }
.npc-skill-rm { color:#ddd; cursor:pointer; font-size:12px; flex-shrink:0; }
.npc-skill-rm:hover { color:var(--red); }

.npc-add-skill-wrap { position:relative; }
.npc-add-skill-input { font-family:var(--mono); font-size:10px; border:none; border-bottom:1px solid #ddd; padding:4px 6px; width:100%; box-sizing:border-box; background:#fafafa; }
.npc-add-skill-input:focus { outline:none; border-bottom-color:#111; background:#fff; }
.npc-add-skill-results { position:absolute; left:0; right:0; top:100%; background:#fff; border:1px solid #111; border-top:none; z-index:100; max-height:180px; overflow-y:auto; box-shadow:0 4px 12px rgba(0,0,0,0.15); }
.npc-add-skill-result { padding:5px 10px; cursor:pointer; font-family:var(--mono); font-size:10px; border-bottom:1px solid #f0f0f0; display:flex; justify-content:space-between; }
.npc-add-skill-result:hover { background:#f5f5f5; }
.npc-add-skill-stat { font-family:var(--head); font-size:8px; color:#888; }

/* ── Cyberware search ── */
.npc-cyber-search-wrap { position:relative; display:flex; gap:6px; align-items:center; margin-bottom:8px; }
.npc-cyber-search { font-family:var(--mono); font-size:10px; border:none; border-bottom:1px solid #ddd; padding:4px 6px; flex:1; background:#fafafa; }
.npc-cyber-search:focus { outline:none; border-bottom-color:#111; background:#fff; }
.npc-cyber-results { position:absolute; left:0; right:0; top:100%; background:#fff; border:1px solid #111; border-top:none; z-index:100; max-height:200px; overflow-y:auto; box-shadow:0 4px 12px rgba(0,0,0,0.15); }
.npc-cyber-result { padding:5px 10px; cursor:pointer; border-bottom:1px solid #f0f0f0; }
.npc-cyber-result:hover { background:#f5f5f5; }
.npc-cyber-result-name { font-family:var(--head); font-size:10px; }
.npc-cyber-result-sub { font-family:var(--mono); font-size:8px; color:#888; }

/* ── Gear (inventory) search ── */
.npc-gear-search-wrap { position:relative; display:flex; gap:6px; align-items:center; margin-bottom:8px; }
.npc-gear-search { font-family:var(--mono); font-size:10px; border:none; border-bottom:1px solid #ddd; padding:4px 6px; flex:1; background:#fafafa; }
.npc-gear-search:focus { outline:none; border-bottom-color:#111; background:#fff; }
.npc-gear-results { position:absolute; left:0; right:0; top:100%; background:#fff; border:1px solid #111; border-top:none; z-index:100; max-height:200px; overflow-y:auto; box-shadow:0 4px 12px rgba(0,0,0,0.15); }
.npc-gear-result { padding:5px 10px; cursor:pointer; border-bottom:1px solid #f0f0f0; }
.npc-gear-result:hover { background:#f5f5f5; }
.npc-gear-result-name { font-family:var(--head); font-size:10px; }
.npc-gear-result-sub { font-family:var(--mono); font-size:8px; color:#888; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ── Cyberware (reuse CS styles mostly) ── */
.npc-cyber-simple { display:flex; flex-direction:column; gap:6px; }
.npc-cyber-item { display:flex; align-items:center; gap:8px; padding:5px 8px; border:1px solid #f0f0f0; background:#fafafa; }
.npc-cyber-item-name { font-family:var(--mono); font-size:11px; flex:1; }
.npc-cyber-item-type { font-family:var(--head); font-size:8px; letter-spacing:0.5px; color:#888; }
.npc-cyber-item-hc { font-family:var(--head); font-size:9px; color:var(--red); }
.npc-cyber-rm { color:#ddd; cursor:pointer; font-size:12px; }
.npc-cyber-rm:hover { color:var(--red); }
.npc-hc-total { font-family:var(--mono); font-size:11px; color:var(--red); font-weight:bold; }

/* ── Weapons ── */
.npc-weap-table { width:100%; border-collapse:collapse; font-family:var(--mono); font-size:10px; }
.npc-weap-table th { font-family:var(--head); font-size:8px; letter-spacing:1px; color:#fff; background:#333; padding:4px 6px; text-align:left; white-space:nowrap; }
.npc-weap-table td { padding:4px 6px; border-bottom:1px solid #f0f0f0; vertical-align:middle; }
.npc-weap-table td input { font-family:var(--mono); font-size:10px; border:none; background:transparent; width:100%; }
.npc-weap-table td input:focus { outline:none; border-bottom:1px solid #111; }
.npc-weap-search-wrap { position:relative; display:flex; gap:6px; align-items:center; margin-bottom:8px; }
.npc-weap-search { font-family:var(--mono); font-size:10px; border:none; border-bottom:1px solid #ddd; padding:4px 6px; flex:1; background:#fafafa; }
.npc-weap-search:focus { outline:none; border-bottom-color:#111; background:#fff; }
.npc-weap-results { position:absolute; left:0; right:0; top:100%; background:#fff; border:1px solid #111; border-top:none; z-index:100; max-height:200px; overflow-y:auto; box-shadow:0 4px 12px rgba(0,0,0,0.15); }
.npc-weap-result { padding:5px 8px; cursor:pointer; border-bottom:1px solid #f0f0f0; }
.npc-weap-result:hover { background:#f5f5f5; }
.npc-weap-result-name { font-family:var(--head); font-size:10px; }
.npc-weap-result-dmg { font-family:var(--mono); font-size:9px; color:#888; }

/* ── Fashion & Armor (SP display) ── */
.npc-armor-layout { display:flex; gap:16px; flex-wrap:wrap; align-items:flex-start; }
.npc-armor-body { position:relative; width:120px; height:225px; flex-shrink:0; }
.npc-armor-body img { position:absolute; top:4px; left:50%; transform:translateX(-50%); height:212px; pointer-events:none; opacity:0.15; }
.npc-sp-overlay { position:absolute; padding:1px 4px; font-family:var(--head); font-size:8px; letter-spacing:0.5px; color:#fff; text-shadow:0 1px 2px rgba(0,0,0,0.7); white-space:nowrap; pointer-events:none; background:rgba(58,123,213,0.55); }
.npc-sp-overlay.empty { background:rgba(0,0,0,0.08); color:transparent; }
.npc-armor-items { flex:1; min-width:180px; }
.npc-armor-search-wrap { position:relative; display:flex; gap:6px; align-items:center; margin-bottom:8px; }
.npc-armor-search { font-family:var(--mono); font-size:10px; border:none; border-bottom:1px solid #ddd; padding:4px 6px; flex:1; background:#fafafa; }
.npc-armor-search:focus { outline:none; border-bottom-color:#111; background:#fff; }
.npc-armor-results { position:absolute; left:0; right:0; top:100%; background:#fff; border:1px solid #111; border-top:none; z-index:100; max-height:200px; overflow-y:auto; box-shadow:0 4px 12px rgba(0,0,0,0.15); }
.npc-armor-result { padding:6px 10px; cursor:pointer; border-bottom:1px solid #f0f0f0; }
.npc-armor-result:hover { background:#f5f5f5; }
.npc-armor-result-name { font-family:var(--head); font-size:10px; }
.npc-armor-result-sp { font-family:var(--head); font-size:9px; color:#3a7bd5; font-weight:bold; }
.npc-armor-result-notes { font-family:var(--mono); font-size:8px; color:#aaa; display:block; }
.npc-armor-item-row { display:flex; align-items:center; gap:6px; padding:4px 0; border-bottom:1px solid #f5f5f5; }
.npc-armor-item-name { font-family:var(--mono); font-size:10px; flex:1; }
.npc-armor-item-sp { font-family:var(--head); font-size:9px; color:#3a7bd5; font-weight:bold; width:40px; text-align:center; border:none; border-bottom:1px solid transparent; background:transparent; }
.npc-armor-item-sp:focus { outline:none; border-bottom-color:#3a7bd5; }
.npc-armor-loc-checks { display:flex; gap:3px; flex-wrap:wrap; }
.npc-armor-loc-check { display:flex; flex-direction:column; align-items:center; gap:1px; cursor:pointer; }
.npc-armor-loc-check input { margin:0; cursor:pointer; }
.npc-armor-loc-check span { font-family:var(--head); font-size:7px; letter-spacing:0.5px; color:#aaa; text-transform:uppercase; }
.npc-armor-rm { color:#ddd; cursor:pointer; font-size:12px; }
.npc-armor-rm:hover { color:var(--red); }

/* ── Inventory ── */
.npc-inv-row { display:flex; align-items:center; gap:8px; padding:4px 0; border-bottom:1px solid #f5f5f5; }
.npc-inv-name { font-family:var(--mono); font-size:10px; flex:1; }
.npc-inv-notes { font-family:var(--mono); font-size:9px; color:#888; flex:1; }
.npc-inv-rm { color:#ddd; cursor:pointer; font-size:12px; }
.npc-inv-rm:hover { color:var(--red); }
.npc-inv-add { display:flex; gap:6px; margin-top:6px; }
.npc-inv-add input { font-family:var(--mono); font-size:10px; border:none; border-bottom:1px solid #ddd; padding:4px 6px; flex:1; background:#fafafa; }
.npc-inv-add input:focus { outline:none; border-bottom-color:#111; background:#fff; }

/* ── Vehicles ── */
.npc-veh-row { display:flex; align-items:center; gap:8px; padding:5px 8px; border:1px solid #f0f0f0; background:#fafafa; }
.npc-veh-name { font-family:var(--mono); font-size:11px; flex:1; }
.npc-veh-type { font-family:var(--head); font-size:8px; color:#888; }
.npc-veh-notes { font-family:var(--mono); font-size:9px; color:#888; }
.npc-veh-rm { color:#ddd; cursor:pointer; font-size:12px; }
.npc-veh-rm:hover { color:var(--red); }
.npc-veh-search-wrap { position:relative; display:flex; gap:6px; align-items:center; margin-bottom:8px; }
.npc-veh-search { font-family:var(--mono); font-size:10px; border:none; border-bottom:1px solid #ddd; padding:4px 6px; flex:1; background:#fafafa; }
.npc-veh-search:focus { outline:none; border-bottom-color:#111; background:#fff; }
.npc-veh-results { position:absolute; left:0; right:0; top:100%; background:#fff; border:1px solid #111; border-top:none; z-index:100; max-height:200px; overflow-y:auto; box-shadow:0 4px 12px rgba(0,0,0,0.15); }
.npc-veh-result { padding:5px 8px; cursor:pointer; border-bottom:1px solid #f0f0f0; }
.npc-veh-result:hover { background:#f5f5f5; }
.npc-veh-result-name { font-family:var(--head); font-size:10px; }
.npc-veh-result-type { font-family:var(--mono); font-size:9px; color:#888; }

/* ── Notes ── */
.npc-notes { font-family:var(--mono); font-size:11px; border:1px solid #ddd; padding:10px; resize:vertical; min-height:100px; width:100%; box-sizing:border-box; background:#fafafa; }
.npc-notes:focus { outline:none; border-color:#111; background:#fff; }

/* ── Shared ── */
.npc-add-btn { margin-top:6px; }
.npc-empty-hint { font-family:var(--mono); font-size:10px; color:#bbb; padding:6px 0; }
