/* ═══════════════════════════════════════════════
   RPG Map Editor v2 + Staff Management
   ═══════════════════════════════════════════════ */

/* ── Editor Layout ── */
.rpge-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 42px; padding: 0 10px;
  background: #0c0c1a; border-bottom: 1px solid rgba(255,215,0,0.12);
  border-radius: 14px 14px 0 0;
}
.rpge-toolbar-left, .rpge-toolbar-right { display: flex; align-items: center; gap: 4px; }
.rpge-toolbar-sep { width: 1px; height: 20px; background: rgba(255,255,255,0.08); margin: 0 6px; }
.rpge-title { font-size: 0.72rem; font-weight: 700; color: #ffd700; letter-spacing: 0.08em; margin-right: 4px; }

.rpge-tool-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 4px 10px; border: none; background: transparent;
  color: #999; font-size: 0.72rem; cursor: pointer; border-radius: 5px; transition: all 0.12s;
}
.rpge-tool-btn:hover { color: #fff; background: rgba(255,255,255,0.06); }
.rpge-tool-btn svg { flex-shrink: 0; }

.rpge-save-btn {
  padding: 5px 14px; border: 1px solid rgba(255,215,0,0.3); background: rgba(255,215,0,0.06);
  color: #ffd700; font-size: 0.73rem; font-weight: 600; border-radius: 6px; cursor: pointer; transition: all 0.15s;
}
.rpge-save-btn:hover { background: rgba(255,215,0,0.15); border-color: #ffd700; }

.rpge-body { display: flex; height: calc(100% - 42px); overflow: hidden; }

/* Left panel */
.rpge-left-panel {
  width: 170px; flex-shrink: 0; background: #0a0a18;
  border-right: 1px solid rgba(255,255,255,0.05); padding: 10px 0; overflow-y: auto;
}

.rpge-panel-title {
  padding: 4px 12px 6px; font-size: 0.68rem; font-weight: 700; color: #888;
  text-transform: uppercase; letter-spacing: 0.06em;
}

.rpge-filter-row {
  display: flex; align-items: center; gap: 6px; padding: 4px 12px; cursor: pointer;
  font-size: 0.75rem; color: #bbb; transition: background 0.1s;
}
.rpge-filter-row:hover { background: rgba(255,255,255,0.03); }
.rpge-filter-row input { accent-color: #ffd700; width: 14px; height: 14px; }
.rpge-filter-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.rpge-filter-count { margin-left: auto; color: #555; font-size: 0.65rem; }

.rpge-shortcuts { padding: 0 12px; }
.rpge-shortcuts div { font-size: 0.68rem; color: #555; margin: 3px 0; }
.rpge-shortcuts kbd {
  display: inline-block; padding: 1px 5px; border-radius: 3px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  font-size: 0.62rem; color: #888; font-family: monospace; margin-right: 4px;
}

/* Canvas */
.rpge-canvas-area { flex: 1; position: relative; overflow: hidden; background: #080816; }
#rpge-canvas { display: block; width: 100%; height: calc(100% - 28px); cursor: crosshair; }
.rpge-hud {
  height: 28px; display: flex; align-items: center; padding: 0 10px;
  background: rgba(0,0,0,0.5); font-size: 0.68rem; color: #666;
}

/* Right panel */
.rpge-right-panel {
  width: 240px; flex-shrink: 0; background: #0a0a18;
  border-left: 1px solid rgba(255,255,255,0.05); overflow-y: auto;
}
.rpge-right-panel::-webkit-scrollbar { width: 3px; }
.rpge-right-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); }

/* Object list */
.rpge-obj-list { max-height: 280px; overflow-y: auto; }
.rpge-obj-row {
  display: flex; align-items: center; gap: 6px; padding: 3px 10px;
  font-size: 0.72rem; color: #999; cursor: pointer; transition: background 0.1s;
}
.rpge-obj-row:hover { background: rgba(255,255,255,0.03); }
.rpge-obj-row.active { background: rgba(255,215,0,0.08); color: #ffd700; }
.rpge-obj-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.rpge-obj-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rpge-obj-coord { color: #444; font-size: 0.62rem; font-family: monospace; }

/* Properties box */
.rpge-props-box {
  margin: 8px; padding: 10px; background: rgba(255,215,0,0.03);
  border: 1px solid rgba(255,215,0,0.1); border-radius: 8px;
}
.rpge-props-head { font-size: 0.82rem; font-weight: 700; }
.rpge-props-type { font-size: 0.65rem; color: #555; margin-bottom: 8px; text-transform: uppercase; }
.rpge-prow { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.rpge-plabel { font-size: 0.65rem; color: #666; font-weight: 600; width: 28px; flex-shrink: 0; }
.rpge-pinput {
  flex: 1; padding: 4px 6px; border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.3); color: #ddd; font-size: 0.75rem;
  border-radius: 4px; outline: none; box-sizing: border-box;
}
.rpge-pinput:focus { border-color: #ffd700; }
.rpge-pnum { width: 70px; flex: none; }
.rpge-props-actions { display: flex; gap: 4px; margin-top: 8px; }

.rpge-action-btn {
  padding: 3px 10px; border: 1px solid rgba(255,255,255,0.1); background: transparent;
  color: #bbb; font-size: 0.68rem; border-radius: 5px; cursor: pointer; transition: all 0.12s;
}
.rpge-action-btn:hover { border-color: rgba(255,255,255,0.3); color: #fff; }
.rpge-action-danger { color: #ef4444; border-color: rgba(239,68,68,0.2); }
.rpge-action-danger:hover { border-color: #ef4444; }

/* Version cards */
.rpge-vcard { margin-bottom: 6px; padding: 8px; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06); border-radius: 6px; font-size: 0.75rem; color: #ccc; }
.rpge-vcard.active { border-color: rgba(255,215,0,0.25); }
.rpge-vbadge { font-size: 0.58rem; font-weight: 700; color: #ffd700; background: rgba(255,215,0,0.1); padding: 1px 5px; border-radius: 3px; }

/* ── Room Builder ── */
.rpge-room-style {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  cursor: pointer; border-radius: 6px; font-size: 0.75rem; color: #aaa;
  border: 1px solid transparent; transition: all 0.12s; margin-bottom: 4px;
}
.rpge-room-style:hover { background: rgba(255,255,255,0.03); color: #ddd; }
.rpge-room-style.active {
  background: rgba(255,215,0,0.06); border-color: rgba(255,215,0,0.2); color: #ffd700;
}

/* ═══════════════════════════════════════════════
   Staff Management
   ═══════════════════════════════════════════════ */
.staff-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.staff-agents-bar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
}
.staff-chip {
  font-size: 0.7rem; padding: 3px 10px; border-radius: 14px;
  border: 1px solid rgba(255,215,0,0.2); color: #ccc; background: rgba(255,215,0,0.04);
}
.staff-chip.assigned { border-color: rgba(34,197,94,0.4); color: #22c55e; background: rgba(34,197,94,0.06); }

.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }

.staff-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; transition: border-color 0.15s;
}
.staff-card:hover { border-color: rgba(255,255,255,0.12); }

.staff-card-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.staff-avatar {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.staff-name { font-size: 0.95rem; font-weight: 600; color: #fff; }
.staff-meta { font-size: 0.72rem; color: var(--muted); }
.staff-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 6px currentColor; }

.staff-field { margin-bottom: 10px; }
.staff-field > label {
  display: block; font-size: 0.68rem; color: var(--muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px;
}
.staff-input {
  width: 100%; padding: 7px 10px;
  border: 1px solid var(--border); background: var(--sidebar);
  color: #fff; font-size: 0.8rem; border-radius: 8px; outline: none;
  box-sizing: border-box; transition: border-color 0.15s;
}
.staff-input:focus { border-color: var(--accent); }
.staff-select option { background: #1a1a2e; color: #fff; padding: 6px; }
.staff-desc { min-height: 50px; resize: vertical; font-family: inherit; }
.staff-agent-detail { font-size: 0.7rem; color: var(--muted); margin-top: 4px; }

.staff-actions {
  display: flex; gap: 6px; padding-top: 10px; border-top: 1px solid var(--border);
}
.staff-btn {
  padding: 5px 14px; border: 1px solid var(--border); background: transparent;
  color: #ccc; font-size: 0.75rem; border-radius: 7px; cursor: pointer; transition: all 0.15s;
}
.staff-btn:hover { border-color: var(--accent); color: #fff; }
.staff-btn-danger { color: #ef4444; border-color: rgba(239,68,68,0.25); }
.staff-btn-danger:hover { border-color: #ef4444; }
